1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-06-20 03:29:32 +00:00

Working on eliminating memcpy() statements when using classic structs. #197

This commit is contained in:
jespergravgaard 2021-07-27 19:11:14 +02:00
parent 5fec69e3f1
commit 1df68ee4d8
231 changed files with 2551 additions and 3962 deletions

View File

@ -51,6 +51,11 @@ public class StatementCallFinalize extends StatementBase implements StatementLVa
return initialAssignment;
}
@Override
public void setInitialAssignment(boolean initialAssignment) {
this.initialAssignment = initialAssignment;
}
@Override
public String toString(Program program, boolean aliveInfo) {
StringBuilder res = new StringBuilder();

View File

@ -13,4 +13,6 @@ public interface StatementLValue extends Statement {
boolean isInitialAssignment();
void setInitialAssignment(boolean initialAssignment);
}

View File

@ -111,6 +111,21 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
statementSequence.addStatement(statement);
}
Statement getPreviousStatement() {
ProcedureCompilation procedureCompilation = getCurrentProcedureCompilation();
if(procedureCompilation == null) {
Procedure initProc = getInitProc();
procedureCompilation = program.getProcedureCompilation(initProc.getRef());
}
final StatementSequence statementSequence = procedureCompilation.getStatementSequence();
List<Statement> statements = statementSequence.getStatements();
if(statements.size()==0)
return null;
else
return statements.get(statements.size()-1);
}
private Procedure getInitProc() {
// Statement outside procedure declaration - put into the _init procedure
Procedure initProc = program.getScope().getLocalProcedure(SymbolRef.INIT_PROC_NAME);
@ -421,7 +436,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
this.visit(ctx.stmtSeq());
}
addStatement(new StatementLabel(procExit.getRef(), StatementSource.procedureEnd(ctx), Comment.NO_COMMENTS));
if(Procedure.CallingConvention.PHI_CALL.equals(procedure.getCallingConvention()) && returnVar != null) {
if(Procedure.CallingConvention.PHI_CALL.equals(procedure.getCallingConvention()) && returnVar != null && returnVar.isKindPhiMaster()) {
addStatement(new StatementAssignment(returnVar.getVariableRef(), returnVar.getRef(), false, StatementSource.procedureEnd(ctx), Comment.NO_COMMENTS));
}
SymbolVariableRef returnVarRef = null;
@ -998,8 +1013,32 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
// Add comments to constant
variable.setComments(ensureUnusedComments(declComments));
} else if(!variable.isKindConstant() && !isStructMember) {
Statement initStmt = new StatementAssignment(variable.getVariableRef(), initValue, true, declSource, Comment.NO_COMMENTS);
addStatement(initStmt);
// The previous assignment of an intermediate variable that can be modified instead of creating a new statement
StatementLValue previousAssignment = null;
if(initValue instanceof VariableRef) {
VariableRef initVarRef = (VariableRef) initValue;
if(initVarRef.isIntermediate()) {
Statement previousStatement = getPreviousStatement();
if(previousStatement instanceof StatementLValue && ((StatementLValue) previousStatement).getlValue().equals(initVarRef)) {
previousAssignment = (StatementLValue) previousStatement;
}
}
}
Statement initStmt;
if(previousAssignment!=null) {
previousAssignment.setlValue(variable.getVariableRef());
previousAssignment.setInitialAssignment(true);
previousAssignment.setSource(declSource);
initStmt = previousAssignment;
} else {
initStmt = new StatementAssignment(variable.getVariableRef(), initValue, true, declSource, Comment.NO_COMMENTS);
addStatement(initStmt);
}
if(variable.getScope().getRef().equals(ScopeRef.ROOT)) {
// Add comments to variable for global vars
variable.setComments(ensureUnusedComments(declComments));

View File

@ -1,4 +1,5 @@
Setting inferred volatile on symbol affected by address-of main::bp = &main::b
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
@ -7,8 +8,7 @@ main: scope:[main] from __start
main::b = 0
to:main::@1
main::@1: scope:[main] from main main::@1
main::$0 = *main::bp + 1
main::c#0 = main::$0
main::c#0 = *main::bp + 1
main::SCREEN[main::b] = main::c#0
main::b = main::b + rangenext(0,$a)
main::$1 = main::b != rangelast(0,$a)
@ -31,7 +31,6 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
number~ main::$0
bool~ main::$1
constant byte* main::SCREEN = (byte*)$400
volatile byte main::b loadstore
@ -39,17 +38,13 @@ constant byte* main::bp = &main::b
byte main::c
byte main::c#0
Adding number conversion cast (unumber) 1 in main::$0 = *main::bp + 1
Adding number conversion cast (unumber) main::$0 in main::$0 = *main::bp + (unumber)1
Adding number conversion cast (unumber) 1 in main::c#0 = *main::bp + 1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$0 = *main::bp + 1
Alias main::c#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$1 [5] if(main::b!=rangelast(0,$a)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Resolved ranged next value [3] main::b = ++ main::b to ++

View File

@ -1,4 +1,5 @@
Inlined call call __init
Eliminating unused variable with no statement __start::__init1_$0
CONTROL FLOW GRAPH SSA
@ -145,8 +146,7 @@ void __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
__start::__init1_$0 = screen1 + $28
screen2#0 = __start::__init1_$0
screen2#0 = screen1 + $28
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
screen2#16 = phi( __start::__init1/screen2#0 )
@ -165,7 +165,6 @@ SYMBOL TABLE SSA
constant byte GREEN = 5
constant byte RED = 2
void __start()
byte*~ __start::__init1_$0
constant byte* cols = (byte*)$d800
void main()
byte main::a
@ -275,7 +274,7 @@ Adding number conversion cast (unumber) 1 in main::a#7 = main::a#17 >> 1
Adding number conversion cast (unumber) 6 in main::a#8 = main::a#18 ^ 6
Adding number conversion cast (unumber) 1 in main::a#9 = main::a#19 | 1
Adding number conversion cast (unumber) 1 in main::a#10 = main::a#20 & 1
Adding number conversion cast (unumber) $28 in __start::__init1_$0 = screen1 + $28
Adding number conversion cast (unumber) $28 in screen2#0 = screen1 + $28
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
@ -326,7 +325,7 @@ Alias main::i#21 = main::i#9
Alias main::a#20 = main::a#9
Alias main::i#10 = main::i#22
Alias test::i#11 = test::i#12 test::i#13
Alias screen2#0 = __start::__init1_$0 screen2#16 screen2#15 screen2#3 screen2#1
Alias screen2#0 = screen2#16 screen2#15 screen2#3 screen2#1
Successful SSA optimization Pass2AliasElimination
Identical Phi Values screen2#10 screen2#0
Identical Phi Values screen2#2 screen2#10

View File

@ -1,4 +1,6 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement circle::$1
Eliminating unused variable with no statement fill::$0
CONTROL FLOW GRAPH SSA
@ -51,8 +53,7 @@ circle: scope:[circle] from main::@2
circle::r#1 = phi( main::@2/circle::r#0 )
circle::y#0 = circle::r#1
circle::$0 = circle::r#1 << 1
circle::$1 = 3 - circle::$0
circle::p#0 = circle::$1
circle::p#0 = 3 - circle::$0
circle::x1#0 = 0
to:circle::@1
circle::@1: scope:[circle] from circle circle::@13
@ -245,8 +246,7 @@ fill: scope:[fill] from main main::@4
fill::val#4 = phi( main/fill::val#0, main::@4/fill::val#1 )
fill::size#2 = phi( main/fill::size#0, main::@4/fill::size#1 )
fill::start#2 = phi( main/fill::start#0, main::@4/fill::start#1 )
fill::$0 = fill::start#2 + fill::size#2
fill::end#0 = fill::$0
fill::end#0 = fill::start#2 + fill::size#2
fill::addr#0 = fill::start#2
to:fill::@1
fill::@1: scope:[fill] from fill fill::@2
@ -291,7 +291,6 @@ void __start()
constant byte* bitmask[] = { $80, $40, $20, $10, 8, 4, 2, 1 }
void circle(signed word circle::xc , signed word circle::yc , signed word circle::r)
signed word~ circle::$0
number~ circle::$1
signed word~ circle::$10
number~ circle::$11
signed word~ circle::$12
@ -403,7 +402,6 @@ signed word circle::yc#7
signed word circle::yc#8
signed word circle::yc#9
void fill(byte* fill::start , signed word fill::size , byte fill::val)
byte*~ fill::$0
bool~ fill::$1
byte* fill::addr
byte* fill::addr#0
@ -493,8 +491,7 @@ Adding number conversion cast (snumber) $a0 in circle::xc#0 = $a0
Adding number conversion cast (snumber) $64 in circle::yc#0 = $64
Adding number conversion cast (snumber) 5 in main::i#1 = main::i#4 + 5
Adding number conversion cast (snumber) 1 in circle::$0 = circle::r#1 << 1
Adding number conversion cast (snumber) 3 in circle::$1 = 3 - circle::$0
Adding number conversion cast (snumber) circle::$1 in circle::$1 = (snumber)3 - circle::$0
Adding number conversion cast (snumber) 3 in circle::p#0 = 3 - circle::$0
Adding number conversion cast (snumber) 0 in circle::$3 = circle::p#3 < 0
Adding number conversion cast (snumber) 2 in circle::$9 = circle::x1#3 << 2
Adding number conversion cast (snumber) 6 in circle::$11 = circle::$10 + 6
@ -593,7 +590,6 @@ Finalized signed number type (signed byte) 3
Finalized signed number type (signed word) $140
Finalized signed number type (signed byte) 7
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to signed word in circle::$1 = 3 - circle::$0
Inferred type updated to signed word in circle::$11 = circle::$10 + 6
Inferred type updated to signed word in circle::$4 = circle::y#3 - 1
Inferred type updated to signed word in circle::$8 = circle::$7 + $a
@ -603,7 +599,6 @@ Inferred type updated to signed word in plot::$12 = plot::$11 * $140
Inferred type updated to signed byte in plot::$13 = plot::x#9 & 7
Alias main::i#2 = main::i#3 main::i#4
Alias circle::y#0 = circle::r#1
Alias circle::p#0 = circle::$1
Alias circle::p#3 = circle::p#6 circle::p#4 circle::p#5
Alias circle::x1#14 = circle::x1#2 circle::x1#3 circle::x1#4
Alias circle::y#13 = circle::y#2 circle::y#14 circle::y#3
@ -635,7 +630,6 @@ Alias plot::x#7 = circle::$33
Alias plot::y#7 = circle::$34
Alias plot::x#8 = plot::x#9
Alias plot::y#8 = plot::y#9
Alias fill::end#0 = fill::$0
Alias fill::addr#0 = fill::start#2
Alias fill::val#2 = fill::val#3
Alias fill::addr#2 = fill::addr#3

View File

@ -1,4 +1,6 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement circle::$1
Eliminating unused variable with no statement fill::$0
CONTROL FLOW GRAPH SSA
@ -40,8 +42,7 @@ circle: scope:[circle] from main::@3
circle::r#1 = phi( main::@3/circle::r#0 )
circle::y#0 = circle::r#1
circle::$0 = circle::r#1 << 1
circle::$1 = 3 - circle::$0
circle::p#0 = circle::$1
circle::p#0 = 3 - circle::$0
circle::x1#0 = 0
to:circle::@1
circle::@1: scope:[circle] from circle circle::@13
@ -221,8 +222,7 @@ fill: scope:[fill] from main main::@2
fill::val#4 = phi( main/fill::val#0, main::@2/fill::val#1 )
fill::size#2 = phi( main/fill::size#0, main::@2/fill::size#1 )
fill::start#2 = phi( main/fill::start#0, main::@2/fill::start#1 )
fill::$0 = fill::start#2 + fill::size#2
fill::end#0 = fill::$0
fill::end#0 = fill::start#2 + fill::size#2
fill::addr#0 = fill::start#2
to:fill::@1
fill::@1: scope:[fill] from fill fill::@2
@ -267,7 +267,6 @@ void __start()
constant byte* bitmask[] = { $80, $40, $20, $10, 8, 4, 2, 1 }
void circle(signed word circle::xc , signed word circle::yc , signed word circle::r)
signed word~ circle::$0
number~ circle::$1
signed word~ circle::$10
number~ circle::$11
signed word~ circle::$12
@ -379,7 +378,6 @@ signed word circle::yc#7
signed word circle::yc#8
signed word circle::yc#9
void fill(byte* fill::start , signed word fill::size , byte fill::val)
byte*~ fill::$0
bool~ fill::$1
byte* fill::addr
byte* fill::addr#0
@ -451,8 +449,7 @@ Adding number conversion cast (snumber) $64 in circle::xc#0 = $64
Adding number conversion cast (snumber) $64 in circle::yc#0 = $64
Adding number conversion cast (snumber) $32 in circle::r#0 = $32
Adding number conversion cast (snumber) 1 in circle::$0 = circle::r#1 << 1
Adding number conversion cast (snumber) 3 in circle::$1 = 3 - circle::$0
Adding number conversion cast (snumber) circle::$1 in circle::$1 = (snumber)3 - circle::$0
Adding number conversion cast (snumber) 3 in circle::p#0 = 3 - circle::$0
Adding number conversion cast (snumber) 0 in circle::$3 = circle::p#3 < 0
Adding number conversion cast (snumber) 2 in circle::$9 = circle::x1#3 << 2
Adding number conversion cast (snumber) 6 in circle::$11 = circle::$10 + 6
@ -538,7 +535,6 @@ Finalized signed number type (signed byte) 3
Finalized signed number type (signed word) $140
Finalized signed number type (signed byte) 7
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to signed word in circle::$1 = 3 - circle::$0
Inferred type updated to signed word in circle::$11 = circle::$10 + 6
Inferred type updated to signed word in circle::$4 = circle::y#3 - 1
Inferred type updated to signed word in circle::$8 = circle::$7 + $a
@ -547,7 +543,6 @@ Inferred type updated to byte in plot::$1 = plot::$6 & 7
Inferred type updated to signed word in plot::$3 = plot::$2 * $140
Inferred type updated to signed byte in plot::$4 = plot::x#8 & 7
Alias circle::y#0 = circle::r#1
Alias circle::p#0 = circle::$1
Alias circle::p#3 = circle::p#6 circle::p#4 circle::p#5
Alias circle::x1#14 = circle::x1#2 circle::x1#3 circle::x1#4
Alias circle::y#13 = circle::y#2 circle::y#14 circle::y#3
@ -577,7 +572,6 @@ Alias plot::x#6 = circle::$30
Alias plot::y#6 = circle::$31
Alias plot::x#7 = circle::$33
Alias plot::y#7 = circle::$34
Alias fill::end#0 = fill::$0
Alias fill::addr#0 = fill::start#2
Alias fill::val#2 = fill::val#3
Alias fill::addr#2 = fill::addr#3

View File

@ -199,25 +199,23 @@ bitmap_line: {
.label y = 2
.label x = 8
.label x2 = $e
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z x2
sta.z abs_u16.w
lda.z x2+1
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
lda #<y2
sta.z abs_u16.w
lda #>y2
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// if(dx==0 && dy==0)
lda.z dx
@ -229,25 +227,23 @@ bitmap_line: {
jmp __b4
!__b4:
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z x2
sta.z sgn_u16.w
lda.z x2+1
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
lda #<y2
sta.z sgn_u16.w
lda #>y2
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// if(dx > dy)
lda.z dy+1
@ -259,6 +255,7 @@ bitmap_line: {
bcc __b2
!:
// unsigned int e = dx/2
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -333,6 +330,7 @@ bitmap_line: {
rts
__b2:
// unsigned int e = dy/2
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -1,5 +1,13 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement bitmap_clear::$1
Eliminating unused variable with no statement bitmap_line::$1
Eliminating unused variable with no statement bitmap_line::$3
Eliminating unused variable with no statement bitmap_line::$9
Eliminating unused variable with no statement bitmap_line::$11
Eliminating unused variable with no statement bitmap_line::$15
Eliminating unused variable with no statement bitmap_line::$20
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -96,8 +104,7 @@ bitmap_clear: scope:[bitmap_clear] from main::@2
bitmap_clear::bgcol#1 = phi( main::@2/bitmap_clear::bgcol#0 )
bitmap_clear::fgcol#1 = phi( main::@2/bitmap_clear::fgcol#0 )
bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
bitmap_clear::col#0 = bitmap_clear::$1
bitmap_clear::col#0 = bitmap_clear::$0 + bitmap_clear::bgcol#1
memset::str#0 = (void*)bitmap_screen#8
memset::c#0 = bitmap_clear::col#0
memset::num#0 = $3e8
@ -154,8 +161,7 @@ bitmap_line::@12: scope:[bitmap_line] from bitmap_line
bitmap_line::y1#2 = phi( bitmap_line/bitmap_line::y1#1 )
bitmap_line::y2#1 = phi( bitmap_line/bitmap_line::y2#4 )
abs_u16::return#5 = phi( bitmap_line/abs_u16::return#0 )
bitmap_line::$1 = abs_u16::return#5
bitmap_line::dx#0 = bitmap_line::$1
bitmap_line::dx#0 = abs_u16::return#5
bitmap_line::$2 = bitmap_line::y2#1 - bitmap_line::y1#2
abs_u16::w#1 = bitmap_line::$2
call abs_u16
@ -170,8 +176,7 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@12
bitmap_line::x2#4 = phi( bitmap_line::@12/bitmap_line::x2#7 )
bitmap_line::dx#1 = phi( bitmap_line::@12/bitmap_line::dx#0 )
abs_u16::return#6 = phi( bitmap_line::@12/abs_u16::return#1 )
bitmap_line::$3 = abs_u16::return#6
bitmap_line::dy#0 = bitmap_line::$3
bitmap_line::dy#0 = abs_u16::return#6
bitmap_line::$4 = bitmap_line::dx#1 == 0
bitmap_line::$5 = bitmap_line::dy#0 == 0
bitmap_line::$6 = bitmap_line::$4 && bitmap_line::$5
@ -201,8 +206,7 @@ bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@1
bitmap_line::y1#3 = phi( bitmap_line::@1/bitmap_line::y1#4 )
bitmap_line::y2#2 = phi( bitmap_line::@1/bitmap_line::y2#5 )
sgn_u16::return#5 = phi( bitmap_line::@1/sgn_u16::return#0 )
bitmap_line::$9 = sgn_u16::return#5
bitmap_line::sx#0 = bitmap_line::$9
bitmap_line::sx#0 = sgn_u16::return#5
bitmap_line::$10 = bitmap_line::y2#2 - bitmap_line::y1#3
sgn_u16::w#1 = bitmap_line::$10
call sgn_u16
@ -217,8 +221,7 @@ bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@14
bitmap_line::dy#1 = phi( bitmap_line::@14/bitmap_line::dy#6 )
bitmap_line::dx#2 = phi( bitmap_line::@14/bitmap_line::dx#7 )
sgn_u16::return#6 = phi( bitmap_line::@14/sgn_u16::return#1 )
bitmap_line::$11 = sgn_u16::return#6
bitmap_line::sy#0 = bitmap_line::$11
bitmap_line::sy#0 = sgn_u16::return#6
bitmap_line::$12 = bitmap_line::dx#2 > bitmap_line::dy#1
if(bitmap_line::$12) goto bitmap_line::@2
to:bitmap_line::@5
@ -242,8 +245,7 @@ bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#14 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#14 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dy#2 = phi( bitmap_line::@15/bitmap_line::dy#1 )
bitmap_line::$20 = bitmap_line::dy#2 / 2
bitmap_line::e1#0 = bitmap_line::$20
bitmap_line::e1#0 = bitmap_line::dy#2 / 2
to:bitmap_line::@9
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::sx#9 = phi( bitmap_line::@15/bitmap_line::sx#8 )
@ -253,8 +255,7 @@ bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#11 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#11 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dx#3 = phi( bitmap_line::@15/bitmap_line::dx#2 )
bitmap_line::$15 = bitmap_line::dx#3 / 2
bitmap_line::e#0 = bitmap_line::$15
bitmap_line::e#0 = bitmap_line::dx#3 / 2
to:bitmap_line::@6
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@7
bitmap_line::sx#5 = phi( bitmap_line::@5/bitmap_line::sx#9, bitmap_line::@7/bitmap_line::sx#10 )
@ -388,8 +389,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -603,7 +603,6 @@ word abs_u16::w#3
word abs_u16::w#4
void bitmap_clear(byte bitmap_clear::bgcol , byte bitmap_clear::fgcol)
number~ bitmap_clear::$0
number~ bitmap_clear::$1
byte bitmap_clear::bgcol
byte bitmap_clear::bgcol#0
byte bitmap_clear::bgcol#1
@ -689,26 +688,20 @@ byte* bitmap_init::yoffs#3
byte* bitmap_init::yoffs#4
void bitmap_line(word bitmap_line::x1 , word bitmap_line::y1 , word bitmap_line::x2 , word bitmap_line::y2)
word~ bitmap_line::$0
word~ bitmap_line::$1
word~ bitmap_line::$10
word~ bitmap_line::$11
bool~ bitmap_line::$12
number~ bitmap_line::$15
bool~ bitmap_line::$17
bool~ bitmap_line::$18
bool~ bitmap_line::$19
word~ bitmap_line::$2
number~ bitmap_line::$20
bool~ bitmap_line::$22
bool~ bitmap_line::$23
bool~ bitmap_line::$24
word~ bitmap_line::$3
bool~ bitmap_line::$4
bool~ bitmap_line::$5
bool~ bitmap_line::$6
bool~ bitmap_line::$7
word~ bitmap_line::$8
word~ bitmap_line::$9
word bitmap_line::dx
word bitmap_line::dx#0
word bitmap_line::dx#1
@ -922,7 +915,6 @@ void main()
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -1006,16 +998,13 @@ Adding number conversion cast (unumber) 7 in bitmap_init::$8 = bitmap_init::$7 =
Adding number conversion cast (unumber) $28*8 in bitmap_init::$10 = bitmap_init::yoffs#3 + $28*8
Adding number conversion cast (unumber) $10 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Adding number conversion cast (unumber) bitmap_clear::$0 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * (unumber)$10
Adding number conversion cast (unumber) bitmap_clear::$1 in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Adding number conversion cast (unumber) 0 in memset::c#1 = 0
Adding number conversion cast (unumber) $fff8 in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in bitmap_plot::$1 = bitmap_plot::x#4 & (unumber)$fff8
Adding number conversion cast (unumber) 0 in bitmap_line::$4 = bitmap_line::dx#1 == 0
Adding number conversion cast (unumber) 0 in bitmap_line::$5 = bitmap_line::dy#0 == 0
Adding number conversion cast (unumber) 2 in bitmap_line::$20 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) bitmap_line::$20 in bitmap_line::$20 = bitmap_line::dy#2 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::$15 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) bitmap_line::$15 in bitmap_line::$15 = bitmap_line::dx#3 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::e1#0 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) 2 in bitmap_line::e#0 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#2 > 0
Adding number conversion cast (unumber) $80 in abs_u16::$1 = abs_u16::$0 & $80
Adding number conversion cast (unumber) abs_u16::$1 in abs_u16::$1 = abs_u16::$0 & (unumber)$80
@ -1130,17 +1119,14 @@ Inferred type updated to byte in bitmap_init::$3 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_init::$5 = bitmap_init::$3 | bitmap_init::$4
Inferred type updated to byte in bitmap_init::$7 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Inferred type updated to byte in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Inferred type updated to word in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Inferred type updated to word in bitmap_line::$20 = bitmap_line::dy#2 / 2
Inferred type updated to word in bitmap_line::$15 = bitmap_line::dx#3 / 2
Inferred type updated to byte in abs_u16::$1 = abs_u16::$0 & $80
Inferred type updated to byte in sgn_u16::$1 = sgn_u16::$0 & $80
Inversing boolean not [9] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [8] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [29] bitmap_init::$9 = bitmap_init::$7 != 7 from [28] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [124] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [123] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [144] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [143] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [154] memset::$1 = memset::num#2 <= 0 from [153] memset::$0 = memset::num#2 > 0
Inversing boolean not [117] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [116] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [137] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [136] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [147] memset::$1 = memset::num#2 <= 0 from [146] memset::$0 = memset::num#2 > 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias bitmap_init::x#2 = bitmap_init::x#4
Alias bitmap_init::gfx#4 = bitmap_init::gfx#5
@ -1156,7 +1142,6 @@ Alias bitmap_screen#17 = bitmap_screen#18
Alias bitmap_init::yoffs#1 = bitmap_init::$10
Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
@ -1164,18 +1149,16 @@ Alias abs_u16::w#0 = bitmap_line::$0
Alias abs_u16::return#0 = abs_u16::return#5
Alias bitmap_line::y2#1 = bitmap_line::y2#4 bitmap_line::y2#8 bitmap_line::y2#5 bitmap_line::y2#2 bitmap_line::y2#11 bitmap_line::y2#10
Alias bitmap_line::x2#1 = bitmap_line::x2#7 bitmap_line::x2#4 bitmap_line::x2#2 bitmap_line::x2#11 bitmap_line::x2#10 bitmap_line::x2#9
Alias bitmap_line::dx#0 = bitmap_line::$1 bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias abs_u16::w#1 = bitmap_line::$2
Alias abs_u16::return#1 = abs_u16::return#6
Alias bitmap_line::dy#0 = bitmap_line::$3 bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias bitmap_line::dx#0 = bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias bitmap_line::dy#0 = bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias sgn_u16::w#0 = bitmap_line::$8
Alias sgn_u16::return#0 = sgn_u16::return#5
Alias bitmap_line::sx#0 = bitmap_line::$9 bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias sgn_u16::w#1 = bitmap_line::$10
Alias sgn_u16::return#1 = sgn_u16::return#6
Alias bitmap_line::sy#0 = bitmap_line::$11 bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::e1#0 = bitmap_line::$20
Alias bitmap_line::e#0 = bitmap_line::$15
Alias bitmap_line::sx#0 = bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias bitmap_line::sy#0 = bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::y#4 = bitmap_line::y#5
Alias bitmap_line::sy#1 = bitmap_line::sy#3 bitmap_line::sy#8
Alias bitmap_line::e#3 = bitmap_line::e#5
@ -1200,7 +1183,6 @@ Alias memset::return#2 = memset::str#2 memset::return#4 memset::return#3
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -2701,6 +2683,7 @@ bitmap_line: {
// bitmap_line::@5
__b5:
// [63] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -2825,6 +2808,7 @@ bitmap_line: {
// bitmap_line::@2
__b2:
// [80] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1
@ -3748,7 +3732,7 @@ bitmap_line: {
.label y = 2
.label x = 8
.label x2 = $e
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [46] abs_u16::w#0 = bitmap_line::x2#0 -- vwuz1=vwuz2
lda.z x2
sta.z abs_u16.w
@ -3758,16 +3742,15 @@ bitmap_line: {
// [103] phi from bitmap_line to abs_u16 [phi:bitmap_line->abs_u16]
// [103] phi abs_u16::w#2 = abs_u16::w#0 [phi:bitmap_line->abs_u16#0] -- register_copy
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [48] abs_u16::return#0 = abs_u16::return#4
// bitmap_line::@12
// unsigned int dx = abs_u16(x2-x1)
// [49] bitmap_line::dx#0 = abs_u16::return#0 -- vwuz1=vwuz2
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [50] call abs_u16
// [103] phi from bitmap_line::@12 to abs_u16 [phi:bitmap_line::@12->abs_u16]
// [103] phi abs_u16::w#2 = bitmap_line::y2#0 [phi:bitmap_line::@12->abs_u16#0] -- vwuz1=vwuc1
@ -3776,10 +3759,9 @@ bitmap_line: {
lda #>y2
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [51] abs_u16::return#1 = abs_u16::return#4
// bitmap_line::@13
// unsigned int dy = abs_u16(y2-y1)
// [52] bitmap_line::dy#0 = abs_u16::return#1
// if(dx==0 && dy==0)
// [53] if(bitmap_line::dx#0!=0) goto bitmap_line::@1 -- vwuz1_neq_0_then_la1
@ -3795,7 +3777,7 @@ bitmap_line: {
!__b4:
// bitmap_line::@1
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [55] sgn_u16::w#0 = bitmap_line::x2#0 -- vwuz1=vwuz2
lda.z x2
sta.z sgn_u16.w
@ -3805,16 +3787,15 @@ bitmap_line: {
// [110] phi from bitmap_line::@1 to sgn_u16 [phi:bitmap_line::@1->sgn_u16]
// [110] phi sgn_u16::w#2 = sgn_u16::w#0 [phi:bitmap_line::@1->sgn_u16#0] -- register_copy
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [57] sgn_u16::return#0 = sgn_u16::return#4
// bitmap_line::@14
// unsigned int sx = sgn_u16(x2-x1)
// [58] bitmap_line::sx#0 = sgn_u16::return#0 -- vwuz1=vwuz2
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [59] call sgn_u16
// [110] phi from bitmap_line::@14 to sgn_u16 [phi:bitmap_line::@14->sgn_u16]
// [110] phi sgn_u16::w#2 = bitmap_line::y2#0 [phi:bitmap_line::@14->sgn_u16#0] -- vwuz1=vwuc1
@ -3823,10 +3804,9 @@ bitmap_line: {
lda #>y2
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [60] sgn_u16::return#1 = sgn_u16::return#4
// bitmap_line::@15
// unsigned int sy = sgn_u16(y2-y1)
// [61] bitmap_line::sy#0 = sgn_u16::return#1
// if(dx > dy)
// [62] if(bitmap_line::dx#0>bitmap_line::dy#0) goto bitmap_line::@2 -- vwuz1_gt_vwuz2_then_la1
@ -3841,6 +3821,7 @@ bitmap_line: {
// bitmap_line::@5
// unsigned int e = dx/2
// [63] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -3956,6 +3937,7 @@ bitmap_line: {
__b2:
// unsigned int e = dy/2
// [80] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -180,25 +180,23 @@ bitmap_line: {
.label y = 4
.label x = $a
.label x2 = 2
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z x2
sta.z abs_u16.w
lda.z x2+1
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
lda #<y2
sta.z abs_u16.w
lda #>y2
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// if(dx==0 && dy==0)
lda.z dx
@ -210,25 +208,23 @@ bitmap_line: {
jmp __b4
!__b4:
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z x2
sta.z sgn_u16.w
lda.z x2+1
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
lda #<y2
sta.z sgn_u16.w
lda #>y2
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// if(dx > dy)
lda.z dy+1
@ -240,6 +236,7 @@ bitmap_line: {
bcc __b2
!:
// unsigned int e = dx/2
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -314,6 +311,7 @@ bitmap_line: {
rts
__b2:
// unsigned int e = dy/2
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -1,5 +1,13 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement bitmap_clear::$1
Eliminating unused variable with no statement bitmap_line::$1
Eliminating unused variable with no statement bitmap_line::$3
Eliminating unused variable with no statement bitmap_line::$9
Eliminating unused variable with no statement bitmap_line::$11
Eliminating unused variable with no statement bitmap_line::$15
Eliminating unused variable with no statement bitmap_line::$20
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -96,8 +104,7 @@ bitmap_clear: scope:[bitmap_clear] from main::@4
bitmap_clear::bgcol#1 = phi( main::@4/bitmap_clear::bgcol#0 )
bitmap_clear::fgcol#1 = phi( main::@4/bitmap_clear::fgcol#0 )
bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
bitmap_clear::col#0 = bitmap_clear::$1
bitmap_clear::col#0 = bitmap_clear::$0 + bitmap_clear::bgcol#1
memset::str#0 = (void*)bitmap_screen#8
memset::c#0 = bitmap_clear::col#0
memset::num#0 = $3e8
@ -154,8 +161,7 @@ bitmap_line::@12: scope:[bitmap_line] from bitmap_line
bitmap_line::y1#2 = phi( bitmap_line/bitmap_line::y1#1 )
bitmap_line::y2#1 = phi( bitmap_line/bitmap_line::y2#4 )
abs_u16::return#5 = phi( bitmap_line/abs_u16::return#0 )
bitmap_line::$1 = abs_u16::return#5
bitmap_line::dx#0 = bitmap_line::$1
bitmap_line::dx#0 = abs_u16::return#5
bitmap_line::$2 = bitmap_line::y2#1 - bitmap_line::y1#2
abs_u16::w#1 = bitmap_line::$2
call abs_u16
@ -170,8 +176,7 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@12
bitmap_line::x2#4 = phi( bitmap_line::@12/bitmap_line::x2#7 )
bitmap_line::dx#1 = phi( bitmap_line::@12/bitmap_line::dx#0 )
abs_u16::return#6 = phi( bitmap_line::@12/abs_u16::return#1 )
bitmap_line::$3 = abs_u16::return#6
bitmap_line::dy#0 = bitmap_line::$3
bitmap_line::dy#0 = abs_u16::return#6
bitmap_line::$4 = bitmap_line::dx#1 == 0
bitmap_line::$5 = bitmap_line::dy#0 == 0
bitmap_line::$6 = bitmap_line::$4 && bitmap_line::$5
@ -201,8 +206,7 @@ bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@1
bitmap_line::y1#3 = phi( bitmap_line::@1/bitmap_line::y1#4 )
bitmap_line::y2#2 = phi( bitmap_line::@1/bitmap_line::y2#5 )
sgn_u16::return#5 = phi( bitmap_line::@1/sgn_u16::return#0 )
bitmap_line::$9 = sgn_u16::return#5
bitmap_line::sx#0 = bitmap_line::$9
bitmap_line::sx#0 = sgn_u16::return#5
bitmap_line::$10 = bitmap_line::y2#2 - bitmap_line::y1#3
sgn_u16::w#1 = bitmap_line::$10
call sgn_u16
@ -217,8 +221,7 @@ bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@14
bitmap_line::dy#1 = phi( bitmap_line::@14/bitmap_line::dy#6 )
bitmap_line::dx#2 = phi( bitmap_line::@14/bitmap_line::dx#7 )
sgn_u16::return#6 = phi( bitmap_line::@14/sgn_u16::return#1 )
bitmap_line::$11 = sgn_u16::return#6
bitmap_line::sy#0 = bitmap_line::$11
bitmap_line::sy#0 = sgn_u16::return#6
bitmap_line::$12 = bitmap_line::dx#2 > bitmap_line::dy#1
if(bitmap_line::$12) goto bitmap_line::@2
to:bitmap_line::@5
@ -242,8 +245,7 @@ bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#14 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#14 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dy#2 = phi( bitmap_line::@15/bitmap_line::dy#1 )
bitmap_line::$20 = bitmap_line::dy#2 / 2
bitmap_line::e1#0 = bitmap_line::$20
bitmap_line::e1#0 = bitmap_line::dy#2 / 2
to:bitmap_line::@9
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::sx#9 = phi( bitmap_line::@15/bitmap_line::sx#8 )
@ -253,8 +255,7 @@ bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#11 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#11 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dx#3 = phi( bitmap_line::@15/bitmap_line::dx#2 )
bitmap_line::$15 = bitmap_line::dx#3 / 2
bitmap_line::e#0 = bitmap_line::$15
bitmap_line::e#0 = bitmap_line::dx#3 / 2
to:bitmap_line::@6
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@7
bitmap_line::sx#5 = phi( bitmap_line::@5/bitmap_line::sx#9, bitmap_line::@7/bitmap_line::sx#10 )
@ -388,8 +389,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -592,7 +592,6 @@ word abs_u16::w#3
word abs_u16::w#4
void bitmap_clear(byte bitmap_clear::bgcol , byte bitmap_clear::fgcol)
number~ bitmap_clear::$0
number~ bitmap_clear::$1
byte bitmap_clear::bgcol
byte bitmap_clear::bgcol#0
byte bitmap_clear::bgcol#1
@ -679,26 +678,20 @@ byte* bitmap_init::yoffs#3
byte* bitmap_init::yoffs#4
void bitmap_line(word bitmap_line::x1 , word bitmap_line::y1 , word bitmap_line::x2 , word bitmap_line::y2)
word~ bitmap_line::$0
word~ bitmap_line::$1
word~ bitmap_line::$10
word~ bitmap_line::$11
bool~ bitmap_line::$12
number~ bitmap_line::$15
bool~ bitmap_line::$17
bool~ bitmap_line::$18
bool~ bitmap_line::$19
word~ bitmap_line::$2
number~ bitmap_line::$20
bool~ bitmap_line::$22
bool~ bitmap_line::$23
bool~ bitmap_line::$24
word~ bitmap_line::$3
bool~ bitmap_line::$4
bool~ bitmap_line::$5
bool~ bitmap_line::$6
bool~ bitmap_line::$7
word~ bitmap_line::$8
word~ bitmap_line::$9
word bitmap_line::dx
word bitmap_line::dx#0
word bitmap_line::dx#1
@ -908,7 +901,6 @@ bool~ main::$4
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -993,16 +985,13 @@ Adding number conversion cast (unumber) 7 in bitmap_init::$8 = bitmap_init::$7 =
Adding number conversion cast (unumber) $28*8 in bitmap_init::$10 = bitmap_init::yoffs#3 + $28*8
Adding number conversion cast (unumber) $10 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Adding number conversion cast (unumber) bitmap_clear::$0 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * (unumber)$10
Adding number conversion cast (unumber) bitmap_clear::$1 in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Adding number conversion cast (unumber) 0 in memset::c#1 = 0
Adding number conversion cast (unumber) $fff8 in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in bitmap_plot::$1 = bitmap_plot::x#4 & (unumber)$fff8
Adding number conversion cast (unumber) 0 in bitmap_line::$4 = bitmap_line::dx#1 == 0
Adding number conversion cast (unumber) 0 in bitmap_line::$5 = bitmap_line::dy#0 == 0
Adding number conversion cast (unumber) 2 in bitmap_line::$20 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) bitmap_line::$20 in bitmap_line::$20 = bitmap_line::dy#2 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::$15 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) bitmap_line::$15 in bitmap_line::$15 = bitmap_line::dx#3 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::e1#0 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) 2 in bitmap_line::e#0 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#2 > 0
Adding number conversion cast (unumber) $80 in abs_u16::$1 = abs_u16::$0 & $80
Adding number conversion cast (unumber) abs_u16::$1 in abs_u16::$1 = abs_u16::$0 & (unumber)$80
@ -1117,18 +1106,15 @@ Inferred type updated to byte in bitmap_init::$3 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_init::$5 = bitmap_init::$3 | bitmap_init::$4
Inferred type updated to byte in bitmap_init::$7 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Inferred type updated to byte in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Inferred type updated to word in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Inferred type updated to word in bitmap_line::$20 = bitmap_line::dy#2 / 2
Inferred type updated to word in bitmap_line::$15 = bitmap_line::dx#3 / 2
Inferred type updated to byte in abs_u16::$1 = abs_u16::$0 & $80
Inferred type updated to byte in sgn_u16::$1 = sgn_u16::$0 & $80
Inversing boolean not [9] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [8] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [29] bitmap_init::$9 = bitmap_init::$7 != 7 from [28] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [124] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [123] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [144] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [143] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [154] memset::$1 = memset::num#2 <= 0 from [153] memset::$0 = memset::num#2 > 0
Inversing boolean not [219] main::$4 = next#0 != $140 from [218] main::$3 = next#0 == $140
Inversing boolean not [117] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [116] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [137] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [136] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [147] memset::$1 = memset::num#2 <= 0 from [146] memset::$0 = memset::num#2 > 0
Inversing boolean not [211] main::$4 = next#0 != $140 from [210] main::$3 = next#0 == $140
Successful SSA optimization Pass2UnaryNotSimplification
Alias bitmap_init::x#2 = bitmap_init::x#4
Alias bitmap_init::gfx#4 = bitmap_init::gfx#5
@ -1144,7 +1130,6 @@ Alias bitmap_screen#17 = bitmap_screen#18
Alias bitmap_init::yoffs#1 = bitmap_init::$10
Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
@ -1152,18 +1137,16 @@ Alias abs_u16::w#0 = bitmap_line::$0
Alias abs_u16::return#0 = abs_u16::return#5
Alias bitmap_line::y2#1 = bitmap_line::y2#4 bitmap_line::y2#8 bitmap_line::y2#5 bitmap_line::y2#2 bitmap_line::y2#11 bitmap_line::y2#10
Alias bitmap_line::x2#1 = bitmap_line::x2#7 bitmap_line::x2#4 bitmap_line::x2#2 bitmap_line::x2#11 bitmap_line::x2#10 bitmap_line::x2#9
Alias bitmap_line::dx#0 = bitmap_line::$1 bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias abs_u16::w#1 = bitmap_line::$2
Alias abs_u16::return#1 = abs_u16::return#6
Alias bitmap_line::dy#0 = bitmap_line::$3 bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias bitmap_line::dx#0 = bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias bitmap_line::dy#0 = bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias sgn_u16::w#0 = bitmap_line::$8
Alias sgn_u16::return#0 = sgn_u16::return#5
Alias bitmap_line::sx#0 = bitmap_line::$9 bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias sgn_u16::w#1 = bitmap_line::$10
Alias sgn_u16::return#1 = sgn_u16::return#6
Alias bitmap_line::sy#0 = bitmap_line::$11 bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::e1#0 = bitmap_line::$20
Alias bitmap_line::e#0 = bitmap_line::$15
Alias bitmap_line::sx#0 = bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias bitmap_line::sy#0 = bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::y#4 = bitmap_line::y#5
Alias bitmap_line::sy#1 = bitmap_line::sy#3 bitmap_line::sy#8
Alias bitmap_line::e#3 = bitmap_line::e#5
@ -1188,7 +1171,6 @@ Alias memset::return#2 = memset::str#2 memset::return#4 memset::return#3
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -2644,6 +2626,7 @@ bitmap_line: {
// bitmap_line::@5
__b5:
// [58] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -2768,6 +2751,7 @@ bitmap_line: {
// bitmap_line::@2
__b2:
// [75] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1
@ -3669,7 +3653,7 @@ bitmap_line: {
.label y = 4
.label x = $a
.label x2 = 2
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [41] abs_u16::w#0 = bitmap_line::x2#0 -- vwuz1=vwuz2
lda.z x2
sta.z abs_u16.w
@ -3679,16 +3663,15 @@ bitmap_line: {
// [98] phi from bitmap_line to abs_u16 [phi:bitmap_line->abs_u16]
// [98] phi abs_u16::w#2 = abs_u16::w#0 [phi:bitmap_line->abs_u16#0] -- register_copy
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [43] abs_u16::return#0 = abs_u16::return#4
// bitmap_line::@12
// unsigned int dx = abs_u16(x2-x1)
// [44] bitmap_line::dx#0 = abs_u16::return#0 -- vwuz1=vwuz2
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [45] call abs_u16
// [98] phi from bitmap_line::@12 to abs_u16 [phi:bitmap_line::@12->abs_u16]
// [98] phi abs_u16::w#2 = bitmap_line::y2#0 [phi:bitmap_line::@12->abs_u16#0] -- vwuz1=vwuc1
@ -3697,10 +3680,9 @@ bitmap_line: {
lda #>y2
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [46] abs_u16::return#1 = abs_u16::return#4
// bitmap_line::@13
// unsigned int dy = abs_u16(y2-y1)
// [47] bitmap_line::dy#0 = abs_u16::return#1
// if(dx==0 && dy==0)
// [48] if(bitmap_line::dx#0!=0) goto bitmap_line::@1 -- vwuz1_neq_0_then_la1
@ -3716,7 +3698,7 @@ bitmap_line: {
!__b4:
// bitmap_line::@1
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [50] sgn_u16::w#0 = bitmap_line::x2#0 -- vwuz1=vwuz2
lda.z x2
sta.z sgn_u16.w
@ -3726,16 +3708,15 @@ bitmap_line: {
// [105] phi from bitmap_line::@1 to sgn_u16 [phi:bitmap_line::@1->sgn_u16]
// [105] phi sgn_u16::w#2 = sgn_u16::w#0 [phi:bitmap_line::@1->sgn_u16#0] -- register_copy
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [52] sgn_u16::return#0 = sgn_u16::return#4
// bitmap_line::@14
// unsigned int sx = sgn_u16(x2-x1)
// [53] bitmap_line::sx#0 = sgn_u16::return#0 -- vwuz1=vwuz2
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [54] call sgn_u16
// [105] phi from bitmap_line::@14 to sgn_u16 [phi:bitmap_line::@14->sgn_u16]
// [105] phi sgn_u16::w#2 = bitmap_line::y2#0 [phi:bitmap_line::@14->sgn_u16#0] -- vwuz1=vwuc1
@ -3744,10 +3725,9 @@ bitmap_line: {
lda #>y2
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [55] sgn_u16::return#1 = sgn_u16::return#4
// bitmap_line::@15
// unsigned int sy = sgn_u16(y2-y1)
// [56] bitmap_line::sy#0 = sgn_u16::return#1
// if(dx > dy)
// [57] if(bitmap_line::dx#0>bitmap_line::dy#0) goto bitmap_line::@2 -- vwuz1_gt_vwuz2_then_la1
@ -3762,6 +3742,7 @@ bitmap_line: {
// bitmap_line::@5
// unsigned int e = dx/2
// [58] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -3877,6 +3858,7 @@ bitmap_line: {
__b2:
// unsigned int e = dy/2
// [75] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -5,6 +5,8 @@ Resolved forward reference irq to __interrupt(hardware_clobber) void irq()
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$2 = call toD018 SCREEN BITMAP
Inlined call call __init
Eliminating unused variable with no statement bitmap_clear::$1
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -101,8 +103,7 @@ bitmap_clear: scope:[bitmap_clear] from main::@8
bitmap_clear::bgcol#1 = phi( main::@8/bitmap_clear::bgcol#0 )
bitmap_clear::fgcol#1 = phi( main::@8/bitmap_clear::fgcol#0 )
bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
bitmap_clear::col#0 = bitmap_clear::$1
bitmap_clear::col#0 = bitmap_clear::$0 + bitmap_clear::bgcol#1
memset::str#0 = (void*)bitmap_screen#8
memset::c#0 = bitmap_clear::col#0
memset::num#0 = $3e8
@ -156,8 +157,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -416,7 +416,6 @@ constant const byte WHITE = 1
void __start()
void bitmap_clear(byte bitmap_clear::bgcol , byte bitmap_clear::fgcol)
number~ bitmap_clear::$0
number~ bitmap_clear::$1
byte bitmap_clear::bgcol
byte bitmap_clear::bgcol#0
byte bitmap_clear::bgcol#1
@ -638,7 +637,6 @@ byte main::y#8
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -690,7 +688,6 @@ Adding number conversion cast (unumber) 7 in bitmap_init::$8 = bitmap_init::$7 =
Adding number conversion cast (unumber) $28*8 in bitmap_init::$10 = bitmap_init::yoffs#3 + $28*8
Adding number conversion cast (unumber) $10 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Adding number conversion cast (unumber) bitmap_clear::$0 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * (unumber)$10
Adding number conversion cast (unumber) bitmap_clear::$1 in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Adding number conversion cast (unumber) 0 in memset::c#1 = 0
Adding number conversion cast (unumber) $fff8 in bitmap_plot::$1 = bitmap_plot::x#1 & $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in bitmap_plot::$1 = bitmap_plot::x#1 & (unumber)$fff8
@ -784,7 +781,6 @@ Inferred type updated to byte in bitmap_init::$3 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_init::$5 = bitmap_init::$3 | bitmap_init::$4
Inferred type updated to byte in bitmap_init::$7 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Inferred type updated to byte in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Inferred type updated to word in bitmap_plot::$1 = bitmap_plot::x#1 & $fff8
Inferred type updated to word in main::toD0181_$0 = main::toD0181_$7 & $3fff
Inferred type updated to word in main::toD0181_$1 = main::toD0181_$0 * 4
@ -793,8 +789,8 @@ Inferred type updated to byte in main::toD0181_$5 = main::toD0181_$4 & $f
Inferred type updated to byte in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Inversing boolean not [9] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [8] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [29] bitmap_init::$9 = bitmap_init::$7 != 7 from [28] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [68] memset::$1 = memset::num#2 <= 0 from [67] memset::$0 = memset::num#2 > 0
Inversing boolean not [165] irq::$0 = 0 == frame_cnt from [164] irq::$1 = 0 != frame_cnt
Inversing boolean not [67] memset::$1 = memset::num#2 <= 0 from [66] memset::$0 = memset::num#2 > 0
Inversing boolean not [163] irq::$0 = 0 == frame_cnt from [162] irq::$1 = 0 != frame_cnt
Successful SSA optimization Pass2UnaryNotSimplification
Alias bitmap_init::x#2 = bitmap_init::x#4
Alias bitmap_init::gfx#4 = bitmap_init::gfx#5
@ -810,13 +806,11 @@ Alias bitmap_screen#17 = bitmap_screen#18
Alias bitmap_init::yoffs#1 = bitmap_init::$10
Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias memset::return#2 = memset::str#2 memset::return#4 memset::return#3
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2

View File

@ -214,7 +214,7 @@ bitmap_line: {
.label y1 = 8
.label x2 = $10
.label y2 = $12
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z x2
sec
sbc.z x1
@ -223,13 +223,12 @@ bitmap_line: {
sbc.z x1+1
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
lda.z y2
sec
sbc.z y1
@ -238,7 +237,6 @@ bitmap_line: {
sbc.z y1+1
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// if(dx==0 && dy==0)
lda.z dx
@ -250,7 +248,7 @@ bitmap_line: {
jmp __b4
!__b4:
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z x2
sec
sbc.z x1
@ -259,13 +257,12 @@ bitmap_line: {
sbc.z x1+1
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
lda.z y2
sec
sbc.z y1
@ -274,7 +271,6 @@ bitmap_line: {
sbc.z y1+1
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// if(dx > dy)
lda.z dy+1
@ -286,6 +282,7 @@ bitmap_line: {
bcc __b2
!:
// unsigned int e = dx/2
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -352,6 +349,7 @@ bitmap_line: {
rts
__b2:
// unsigned int e = dy/2
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -1,6 +1,14 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$2 = call toD018 SCREEN BITMAP
Inlined call call __init
Eliminating unused variable with no statement bitmap_clear::$1
Eliminating unused variable with no statement bitmap_line::$1
Eliminating unused variable with no statement bitmap_line::$3
Eliminating unused variable with no statement bitmap_line::$9
Eliminating unused variable with no statement bitmap_line::$11
Eliminating unused variable with no statement bitmap_line::$15
Eliminating unused variable with no statement bitmap_line::$20
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -97,8 +105,7 @@ bitmap_clear: scope:[bitmap_clear] from main::@6
bitmap_clear::bgcol#1 = phi( main::@6/bitmap_clear::bgcol#0 )
bitmap_clear::fgcol#1 = phi( main::@6/bitmap_clear::fgcol#0 )
bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
bitmap_clear::col#0 = bitmap_clear::$1
bitmap_clear::col#0 = bitmap_clear::$0 + bitmap_clear::bgcol#1
memset::str#0 = (void*)bitmap_screen#8
memset::c#0 = bitmap_clear::col#0
memset::num#0 = $3e8
@ -155,8 +162,7 @@ bitmap_line::@12: scope:[bitmap_line] from bitmap_line
bitmap_line::y1#2 = phi( bitmap_line/bitmap_line::y1#1 )
bitmap_line::y2#1 = phi( bitmap_line/bitmap_line::y2#4 )
abs_u16::return#5 = phi( bitmap_line/abs_u16::return#0 )
bitmap_line::$1 = abs_u16::return#5
bitmap_line::dx#0 = bitmap_line::$1
bitmap_line::dx#0 = abs_u16::return#5
bitmap_line::$2 = bitmap_line::y2#1 - bitmap_line::y1#2
abs_u16::w#1 = bitmap_line::$2
call abs_u16
@ -171,8 +177,7 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@12
bitmap_line::x2#4 = phi( bitmap_line::@12/bitmap_line::x2#7 )
bitmap_line::dx#1 = phi( bitmap_line::@12/bitmap_line::dx#0 )
abs_u16::return#6 = phi( bitmap_line::@12/abs_u16::return#1 )
bitmap_line::$3 = abs_u16::return#6
bitmap_line::dy#0 = bitmap_line::$3
bitmap_line::dy#0 = abs_u16::return#6
bitmap_line::$4 = bitmap_line::dx#1 == 0
bitmap_line::$5 = bitmap_line::dy#0 == 0
bitmap_line::$6 = bitmap_line::$4 && bitmap_line::$5
@ -202,8 +207,7 @@ bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@1
bitmap_line::y1#3 = phi( bitmap_line::@1/bitmap_line::y1#4 )
bitmap_line::y2#2 = phi( bitmap_line::@1/bitmap_line::y2#5 )
sgn_u16::return#5 = phi( bitmap_line::@1/sgn_u16::return#0 )
bitmap_line::$9 = sgn_u16::return#5
bitmap_line::sx#0 = bitmap_line::$9
bitmap_line::sx#0 = sgn_u16::return#5
bitmap_line::$10 = bitmap_line::y2#2 - bitmap_line::y1#3
sgn_u16::w#1 = bitmap_line::$10
call sgn_u16
@ -218,8 +222,7 @@ bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@14
bitmap_line::dy#1 = phi( bitmap_line::@14/bitmap_line::dy#6 )
bitmap_line::dx#2 = phi( bitmap_line::@14/bitmap_line::dx#7 )
sgn_u16::return#6 = phi( bitmap_line::@14/sgn_u16::return#1 )
bitmap_line::$11 = sgn_u16::return#6
bitmap_line::sy#0 = bitmap_line::$11
bitmap_line::sy#0 = sgn_u16::return#6
bitmap_line::$12 = bitmap_line::dx#2 > bitmap_line::dy#1
if(bitmap_line::$12) goto bitmap_line::@2
to:bitmap_line::@5
@ -243,8 +246,7 @@ bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#14 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#14 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dy#2 = phi( bitmap_line::@15/bitmap_line::dy#1 )
bitmap_line::$20 = bitmap_line::dy#2 / 2
bitmap_line::e1#0 = bitmap_line::$20
bitmap_line::e1#0 = bitmap_line::dy#2 / 2
to:bitmap_line::@9
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::sx#9 = phi( bitmap_line::@15/bitmap_line::sx#8 )
@ -254,8 +256,7 @@ bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#11 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#11 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dx#3 = phi( bitmap_line::@15/bitmap_line::dx#2 )
bitmap_line::$15 = bitmap_line::dx#3 / 2
bitmap_line::e#0 = bitmap_line::$15
bitmap_line::e#0 = bitmap_line::dx#3 / 2
to:bitmap_line::@6
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@7
bitmap_line::sx#5 = phi( bitmap_line::@5/bitmap_line::sx#9, bitmap_line::@7/bitmap_line::sx#10 )
@ -389,8 +390,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -629,7 +629,6 @@ word abs_u16::w#3
word abs_u16::w#4
void bitmap_clear(byte bitmap_clear::bgcol , byte bitmap_clear::fgcol)
number~ bitmap_clear::$0
number~ bitmap_clear::$1
byte bitmap_clear::bgcol
byte bitmap_clear::bgcol#0
byte bitmap_clear::bgcol#1
@ -720,26 +719,20 @@ byte* bitmap_init::yoffs#3
byte* bitmap_init::yoffs#4
void bitmap_line(word bitmap_line::x1 , word bitmap_line::y1 , word bitmap_line::x2 , word bitmap_line::y2)
word~ bitmap_line::$0
word~ bitmap_line::$1
word~ bitmap_line::$10
word~ bitmap_line::$11
bool~ bitmap_line::$12
number~ bitmap_line::$15
bool~ bitmap_line::$17
bool~ bitmap_line::$18
bool~ bitmap_line::$19
word~ bitmap_line::$2
number~ bitmap_line::$20
bool~ bitmap_line::$22
bool~ bitmap_line::$23
bool~ bitmap_line::$24
word~ bitmap_line::$3
bool~ bitmap_line::$4
bool~ bitmap_line::$5
bool~ bitmap_line::$6
bool~ bitmap_line::$7
word~ bitmap_line::$8
word~ bitmap_line::$9
word bitmap_line::dx
word bitmap_line::dx#0
word bitmap_line::dx#1
@ -991,7 +984,6 @@ byte* main::toD0181_screen#1
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -1060,16 +1052,13 @@ Adding number conversion cast (unumber) 7 in bitmap_init::$8 = bitmap_init::$7 =
Adding number conversion cast (unumber) $28*8 in bitmap_init::$10 = bitmap_init::yoffs#3 + $28*8
Adding number conversion cast (unumber) $10 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Adding number conversion cast (unumber) bitmap_clear::$0 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * (unumber)$10
Adding number conversion cast (unumber) bitmap_clear::$1 in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Adding number conversion cast (unumber) 0 in memset::c#1 = 0
Adding number conversion cast (unumber) $fff8 in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in bitmap_plot::$1 = bitmap_plot::x#4 & (unumber)$fff8
Adding number conversion cast (unumber) 0 in bitmap_line::$4 = bitmap_line::dx#1 == 0
Adding number conversion cast (unumber) 0 in bitmap_line::$5 = bitmap_line::dy#0 == 0
Adding number conversion cast (unumber) 2 in bitmap_line::$20 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) bitmap_line::$20 in bitmap_line::$20 = bitmap_line::dy#2 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::$15 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) bitmap_line::$15 in bitmap_line::$15 = bitmap_line::dx#3 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::e1#0 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) 2 in bitmap_line::e#0 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#2 > 0
Adding number conversion cast (unumber) $80 in abs_u16::$1 = abs_u16::$0 & $80
Adding number conversion cast (unumber) abs_u16::$1 in abs_u16::$1 = abs_u16::$0 & (unumber)$80
@ -1186,10 +1175,7 @@ Inferred type updated to byte in bitmap_init::$3 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_init::$5 = bitmap_init::$3 | bitmap_init::$4
Inferred type updated to byte in bitmap_init::$7 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Inferred type updated to byte in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Inferred type updated to word in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Inferred type updated to word in bitmap_line::$20 = bitmap_line::dy#2 / 2
Inferred type updated to word in bitmap_line::$15 = bitmap_line::dx#3 / 2
Inferred type updated to byte in abs_u16::$1 = abs_u16::$0 & $80
Inferred type updated to byte in sgn_u16::$1 = sgn_u16::$0 & $80
Inferred type updated to word in main::toD0181_$0 = main::toD0181_$7 & $3fff
@ -1203,9 +1189,9 @@ Inferred type updated to word in main::$6 = main::$14 + $78
Inferred type updated to byte in main::$7 = main::a#2 + $20
Inversing boolean not [9] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [8] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [29] bitmap_init::$9 = bitmap_init::$7 != 7 from [28] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [124] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [123] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [144] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [143] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [154] memset::$1 = memset::num#2 <= 0 from [153] memset::$0 = memset::num#2 > 0
Inversing boolean not [117] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [116] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [137] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [136] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [147] memset::$1 = memset::num#2 <= 0 from [146] memset::$0 = memset::num#2 > 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias bitmap_init::x#2 = bitmap_init::x#4
Alias bitmap_init::gfx#4 = bitmap_init::gfx#5
@ -1221,7 +1207,6 @@ Alias bitmap_screen#17 = bitmap_screen#18
Alias bitmap_init::yoffs#1 = bitmap_init::$10
Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
@ -1229,18 +1214,16 @@ Alias abs_u16::w#0 = bitmap_line::$0
Alias abs_u16::return#0 = abs_u16::return#5
Alias bitmap_line::y2#1 = bitmap_line::y2#4 bitmap_line::y2#8 bitmap_line::y2#5 bitmap_line::y2#2 bitmap_line::y2#11 bitmap_line::y2#10
Alias bitmap_line::x2#1 = bitmap_line::x2#7 bitmap_line::x2#4 bitmap_line::x2#2 bitmap_line::x2#11 bitmap_line::x2#10 bitmap_line::x2#9
Alias bitmap_line::dx#0 = bitmap_line::$1 bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias abs_u16::w#1 = bitmap_line::$2
Alias abs_u16::return#1 = abs_u16::return#6
Alias bitmap_line::dy#0 = bitmap_line::$3 bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias bitmap_line::dx#0 = bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias bitmap_line::dy#0 = bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias sgn_u16::w#0 = bitmap_line::$8
Alias sgn_u16::return#0 = sgn_u16::return#5
Alias bitmap_line::sx#0 = bitmap_line::$9 bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias sgn_u16::w#1 = bitmap_line::$10
Alias sgn_u16::return#1 = sgn_u16::return#6
Alias bitmap_line::sy#0 = bitmap_line::$11 bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::e1#0 = bitmap_line::$20
Alias bitmap_line::e#0 = bitmap_line::$15
Alias bitmap_line::sx#0 = bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias bitmap_line::sy#0 = bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::y#4 = bitmap_line::y#5
Alias bitmap_line::sy#1 = bitmap_line::sy#3 bitmap_line::sy#8
Alias bitmap_line::e#3 = bitmap_line::e#5
@ -1265,7 +1248,6 @@ Alias memset::return#2 = memset::str#2 memset::return#4 memset::return#3
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -2932,6 +2914,7 @@ bitmap_line: {
// bitmap_line::@5
__b5:
// [65] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -3043,6 +3026,7 @@ bitmap_line: {
// bitmap_line::@2
__b2:
// [82] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1
@ -3975,7 +3959,7 @@ bitmap_line: {
.label y1 = 8
.label x2 = $10
.label y2 = $12
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [46] abs_u16::w#0 = bitmap_line::x2#0 - bitmap_line::x1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z x2
sec
@ -3988,16 +3972,15 @@ bitmap_line: {
// [106] phi from bitmap_line to abs_u16 [phi:bitmap_line->abs_u16]
// [106] phi abs_u16::w#2 = abs_u16::w#0 [phi:bitmap_line->abs_u16#0] -- register_copy
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [48] abs_u16::return#0 = abs_u16::return#4
// bitmap_line::@12
// unsigned int dx = abs_u16(x2-x1)
// [49] bitmap_line::dx#0 = abs_u16::return#0 -- vwuz1=vwuz2
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [50] abs_u16::w#1 = bitmap_line::y2#0 - bitmap_line::y1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z y2
sec
@ -4010,10 +3993,9 @@ bitmap_line: {
// [106] phi from bitmap_line::@12 to abs_u16 [phi:bitmap_line::@12->abs_u16]
// [106] phi abs_u16::w#2 = abs_u16::w#1 [phi:bitmap_line::@12->abs_u16#0] -- register_copy
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [52] abs_u16::return#1 = abs_u16::return#4
// bitmap_line::@13
// unsigned int dy = abs_u16(y2-y1)
// [53] bitmap_line::dy#0 = abs_u16::return#1
// if(dx==0 && dy==0)
// [54] if(bitmap_line::dx#0!=0) goto bitmap_line::@1 -- vwuz1_neq_0_then_la1
@ -4029,7 +4011,7 @@ bitmap_line: {
!__b4:
// bitmap_line::@1
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [56] sgn_u16::w#0 = bitmap_line::x2#0 - bitmap_line::x1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z x2
sec
@ -4042,16 +4024,15 @@ bitmap_line: {
// [113] phi from bitmap_line::@1 to sgn_u16 [phi:bitmap_line::@1->sgn_u16]
// [113] phi sgn_u16::w#2 = sgn_u16::w#0 [phi:bitmap_line::@1->sgn_u16#0] -- register_copy
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [58] sgn_u16::return#0 = sgn_u16::return#4
// bitmap_line::@14
// unsigned int sx = sgn_u16(x2-x1)
// [59] bitmap_line::sx#0 = sgn_u16::return#0 -- vwuz1=vwuz2
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [60] sgn_u16::w#1 = bitmap_line::y2#0 - bitmap_line::y1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z y2
sec
@ -4064,10 +4045,9 @@ bitmap_line: {
// [113] phi from bitmap_line::@14 to sgn_u16 [phi:bitmap_line::@14->sgn_u16]
// [113] phi sgn_u16::w#2 = sgn_u16::w#1 [phi:bitmap_line::@14->sgn_u16#0] -- register_copy
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [62] sgn_u16::return#1 = sgn_u16::return#4
// bitmap_line::@15
// unsigned int sy = sgn_u16(y2-y1)
// [63] bitmap_line::sy#0 = sgn_u16::return#1
// if(dx > dy)
// [64] if(bitmap_line::dx#0>bitmap_line::dy#0) goto bitmap_line::@2 -- vwuz1_gt_vwuz2_then_la1
@ -4082,6 +4062,7 @@ bitmap_line: {
// bitmap_line::@5
// unsigned int e = dx/2
// [65] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -4185,6 +4166,7 @@ bitmap_line: {
__b2:
// unsigned int e = dy/2
// [82] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -1,4 +1,5 @@
Inlined call call __init
Eliminating unused variable with no statement plot::$4
CONTROL FLOW GRAPH SSA
@ -74,8 +75,7 @@ plot: scope:[plot] from plots::@2
plot::plotter_y#1 = plot::plotter_y#0 byte1= plot::$8
plot::$9 = plot_ylo[plot::y#1]
plot::plotter_y#2 = plot::plotter_y#1 byte0= plot::$9
plot::$4 = plot::plotter_x#2 + plot::plotter_y#2
plot::plotter#0 = plot::$4
plot::plotter#0 = plot::plotter_x#2 + plot::plotter_y#2
plot::$5 = *plot::plotter#0 | plot_bit[plot::x#1]
*plot::plotter#0 = plot::$5
to:plot::@return
@ -267,7 +267,6 @@ number~ main::$3
number~ main::$4
bool~ main::$7
void plot(byte plot::x , byte plot::y)
byte*~ plot::$4
byte~ plot::$5
byte~ plot::$6
byte~ plot::$7
@ -394,11 +393,10 @@ Inferred type updated to byte in init_plot_tables::$1 = init_plot_tables::bits#3
Inferred type updated to byte in init_plot_tables::$5 = init_plot_tables::y#2 & 7
Inferred type updated to byte in init_plot_tables::$7 = init_plot_tables::$5 | init_plot_tables::$6
Inferred type updated to byte in init_plot_tables::$9 = init_plot_tables::y#2 & 7
Inversing boolean not [56] init_plot_tables::$3 = init_plot_tables::bits#1 != 0 from [55] init_plot_tables::$2 = init_plot_tables::bits#1 == 0
Inversing boolean not [75] init_plot_tables::$11 = init_plot_tables::$9 != 7 from [74] init_plot_tables::$10 = init_plot_tables::$9 == 7
Inversing boolean not [55] init_plot_tables::$3 = init_plot_tables::bits#1 != 0 from [54] init_plot_tables::$2 = init_plot_tables::bits#1 == 0
Inversing boolean not [74] init_plot_tables::$11 = init_plot_tables::$9 != 7 from [73] init_plot_tables::$10 = init_plot_tables::$9 == 7
Successful SSA optimization Pass2UnaryNotSimplification
Alias plots::i#2 = plots::i#3 plots::i#4
Alias plot::plotter#0 = plot::$4
Alias init_plot_tables::bits#1 = init_plot_tables::$1
Alias init_plot_tables::x#2 = init_plot_tables::x#4
Alias init_plot_tables::yoffs#2 = init_plot_tables::yoffs#3
@ -413,7 +411,7 @@ Successful SSA optimization Pass2AliasElimination
Identical Phi Values plot::x#1 plot::x#0
Identical Phi Values plot::y#1 plot::y#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [73] init_plot_tables::$9 = init_plot_tables::y#2 & 7
Identified duplicate assignment right side [72] init_plot_tables::$9 = init_plot_tables::y#2 & 7
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition main::$7 [13] if(*RASTER!=$ff) goto main::@1
Simple Condition plots::$0 [22] if(plots::i#2<plots_cnt) goto plots::@2

View File

@ -1,3 +1,6 @@
Eliminating unused variable with no statement bool_const_vars::$3
Eliminating unused variable with no statement bool_const_vars::$6
Eliminating unused variable with no statement bool_const_vars::$9
CONTROL FLOW GRAPH SSA
@ -36,16 +39,13 @@ bool_const_vars: scope:[bool_const_vars] from main::@1
bool_const_vars::$0 = bool_const_vars::a == $f
bool_const_vars::$1 = $15 < bool_const_vars::a
bool_const_vars::$2 = ! bool_const_vars::$1
bool_const_vars::$3 = bool_const_vars::$0 || bool_const_vars::$2
bool_const_vars::b1#0 = bool_const_vars::$3
bool_const_vars::b1#0 = bool_const_vars::$0 || bool_const_vars::$2
bool_const_vars::$4 = bool_const_vars::a != $2c
bool_const_vars::$5 = bool_const_vars::a >= -8
bool_const_vars::$6 = bool_const_vars::$4 || bool_const_vars::$5
bool_const_vars::b2#0 = bool_const_vars::$6
bool_const_vars::b2#0 = bool_const_vars::$4 || bool_const_vars::$5
bool_const_vars::$7 = ! bool_const_vars::b2#0
bool_const_vars::$8 = bool_const_vars::b1#0 && bool_const_vars::$7
bool_const_vars::$9 = bool_const_vars::$8 || false
bool_const_vars::b#0 = bool_const_vars::$9
bool_const_vars::b#0 = bool_const_vars::$8 || false
if(bool_const_vars::b#0) goto bool_const_vars::@1
to:bool_const_vars::@2
bool_const_vars::@1: scope:[bool_const_vars] from bool_const_vars
@ -109,13 +109,10 @@ void bool_const_vars()
bool~ bool_const_vars::$0
bool~ bool_const_vars::$1
bool~ bool_const_vars::$2
bool~ bool_const_vars::$3
bool~ bool_const_vars::$4
bool~ bool_const_vars::$5
bool~ bool_const_vars::$6
bool~ bool_const_vars::$7
bool~ bool_const_vars::$8
bool~ bool_const_vars::$9
constant byte bool_const_vars::a = $e
bool bool_const_vars::b
bool bool_const_vars::b#0
@ -172,12 +169,8 @@ Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [10] bool_const_vars::$2 = $15 >= bool_const_vars::a from [9] bool_const_vars::$1 = $15 < bool_const_vars::a
Inversing boolean not [31] bool_const_inline::$6 = $15 >= bool_const_inline::a from [30] bool_const_inline::$5 = $15 < bool_const_inline::a
Inversing boolean not [28] bool_const_inline::$6 = $15 >= bool_const_inline::a from [27] bool_const_inline::$5 = $15 < bool_const_inline::a
Successful SSA optimization Pass2UnaryNotSimplification
Alias bool_const_vars::b1#0 = bool_const_vars::$3
Alias bool_const_vars::b2#0 = bool_const_vars::$6
Alias bool_const_vars::b#0 = bool_const_vars::$9
Successful SSA optimization Pass2AliasElimination
Rewriting || if()-condition to two if()s [16] bool_const_vars::b#0 = bool_const_vars::$8 || false
Rewriting && if()-condition to two if()s [15] bool_const_vars::$8 = bool_const_vars::b1#0 && bool_const_vars::$7
Rewriting || if()-condition to two if()s [10] bool_const_vars::b1#0 = bool_const_vars::$0 || bool_const_vars::$2

View File

@ -20,12 +20,12 @@ main: {
and #1
// !b ? 1 : 0
cmp #1
beq __b2
lda #1
bne __b2
lda #0
jmp __b3
__b2:
// !b ? 1 : 0
lda #0
lda #1
__b3:
// screen[i] = c
sta screen,x

View File

@ -6,13 +6,13 @@ main: scope:[main] from
main::@1: scope:[main] from main main::@3
[1] main::i#2 = phi( main/0, main::@3/main::i#1 )
[2] main::$0 = main::i#2 & 1
[3] if(main::$0==1) goto main::@2
[3] if(main::$0!=1) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1
[4] phi()
to:main::@3
main::@3: scope:[main] from main::@1 main::@2
[5] main::c#0 = phi( main::@1/1, main::@2/0 )
[5] main::c#0 = phi( main::@2/1, main::@1/0 )
[6] main::screen[main::i#2] = main::c#0
[7] main::i#1 = ++ main::i#2
[8] if(main::i#1!=8) goto main::@1

View File

@ -1,3 +1,4 @@
Eliminating unused variable with no statement main::$1
CONTROL FLOW GRAPH SSA
@ -8,8 +9,7 @@ main: scope:[main] from __start
main::@1: scope:[main] from main main::@4
main::i#2 = phi( main/main::i#0, main::@4/main::i#1 )
main::$0 = main::i#2 & 1
main::$1 = main::$0 == 1
main::b#0 = main::$1
main::b#0 = main::$0 == 1
main::$2 = ! main::b#0
if(main::$2) goto main::@2
to:main::@3
@ -48,7 +48,6 @@ SYMBOL TABLE SSA
void __start()
void main()
number~ main::$0
bool~ main::$1
bool~ main::$2
number~ main::$3
number~ main::$4
@ -69,7 +68,7 @@ constant byte* const main::screen = (byte*)$400
Adding number conversion cast (unumber) 1 in main::$0 = main::i#2 & 1
Adding number conversion cast (unumber) main::$0 in main::$0 = main::i#2 & (unumber)1
Adding number conversion cast (unumber) 1 in main::$1 = main::$0 == 1
Adding number conversion cast (unumber) 1 in main::b#0 = main::$0 == 1
Adding number conversion cast (unumber) main::$5 in main::c#0 = main::$5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast main::c#0 = (unumber)main::$5
@ -82,34 +81,32 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$0 = main::i#2 & 1
Alias main::b#0 = main::$1
Inversing boolean not [4] main::$2 = main::$0 != 1 from [3] main::b#0 = main::$0 == 1
Successful SSA optimization Pass2UnaryNotSimplification
Alias main::i#2 = main::i#4 main::i#5
Successful SSA optimization Pass2AliasElimination
Alias main::i#2 = main::i#3
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$6 [13] if(main::i#1!=rangelast(0,7)) goto main::@1
Simple Condition main::$2 [4] if(main::$0!=1) goto main::@2
Simple Condition main::$6 [12] if(main::i#1!=rangelast(0,7)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [4] main::$2 = ! main::b#0
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant main::i#0 = 0
Constant main::$4 = 1
Constant main::$3 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [11] main::i#1 = ++ main::i#2 to ++
Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,7)) goto main::@1 to 8
Resolved ranged next value [10] main::i#1 = ++ main::i#2 to ++
Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,7)) goto main::@1 to 8
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 8 in [8] if(main::i#1!=8) goto main::@1
Adding number conversion cast (unumber) 8 in [7] if(main::i#1!=8) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 8
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition main::b#0 [3] if(main::$0==1) goto main::@3
Successful SSA optimization Pass2ConditionalJumpSimplification
Inlining constant with var siblings main::i#0
Constant inlined main::i#0 = 0
Constant inlined main::$3 = 0
@ -127,16 +124,15 @@ Alias main::c#0 = main::$5
Successful SSA optimization Pass2AliasElimination
Added new block during phi lifting main::@5(between main::@4 and main::@1)
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@2
CALL GRAPH
Created 2 initial phi equivalence classes
Coalesced [10] main::i#6 = main::i#1
Coalesced down to 2 phi equivalence classes
Culled Empty Block label main::@2
Culled Empty Block label main::@3
Culled Empty Block label main::@5
Renumbering block main::@3 to main::@2
Renumbering block main::@4 to main::@3
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
@ -150,13 +146,13 @@ main: scope:[main] from
main::@1: scope:[main] from main main::@3
[1] main::i#2 = phi( main/0, main::@3/main::i#1 )
[2] main::$0 = main::i#2 & 1
[3] if(main::$0==1) goto main::@2
[3] if(main::$0!=1) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1
[4] phi()
to:main::@3
main::@3: scope:[main] from main::@1 main::@2
[5] main::c#0 = phi( main::@1/1, main::@2/0 )
[5] main::c#0 = phi( main::@2/1, main::@1/0 )
[6] main::screen[main::i#2] = main::c#0
[7] main::i#1 = ++ main::i#2
[8] if(main::i#1!=8) goto main::@1
@ -233,13 +229,13 @@ main: {
// [2] main::$0 = main::i#2 & 1 -- vbuaa=vbuxx_band_vbuc1
txa
and #1
// [3] if(main::$0==1) goto main::@2 -- vbuaa_eq_vbuc1_then_la1
// [3] if(main::$0!=1) goto main::@2 -- vbuaa_neq_vbuc1_then_la1
cmp #1
beq __b2_from___b1
bne __b2_from___b1
// [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
__b3_from___b1:
// [5] phi main::c#0 = 1 [phi:main::@1->main::@3#0] -- vbuaa=vbuc1
lda #1
// [5] phi main::c#0 = 0 [phi:main::@1->main::@3#0] -- vbuaa=vbuc1
lda #0
jmp __b3
// [4] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
__b2_from___b1:
@ -248,8 +244,8 @@ main: {
__b2:
// [5] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
__b3_from___b2:
// [5] phi main::c#0 = 0 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
lda #0
// [5] phi main::c#0 = 1 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
lda #1
jmp __b3
// main::@3
__b3:
@ -337,20 +333,20 @@ main: {
txa
and #1
// !b ? 1 : 0
// [3] if(main::$0==1) goto main::@2 -- vbuaa_eq_vbuc1_then_la1
// [3] if(main::$0!=1) goto main::@2 -- vbuaa_neq_vbuc1_then_la1
cmp #1
beq __b2
bne __b2
// [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
// [5] phi main::c#0 = 1 [phi:main::@1->main::@3#0] -- vbuaa=vbuc1
lda #1
// [5] phi main::c#0 = 0 [phi:main::@1->main::@3#0] -- vbuaa=vbuc1
lda #0
jmp __b3
// [4] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
// main::@2
__b2:
// !b ? 1 : 0
// [5] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
// [5] phi main::c#0 = 0 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
lda #0
// [5] phi main::c#0 = 1 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
lda #1
// main::@3
__b3:
// screen[i] = c

View File

@ -1,3 +1,4 @@
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
@ -7,8 +8,7 @@ main: scope:[main] from __start
to:main::@1
main::@1: scope:[main] from main main::@4
main::i#2 = phi( main/main::i#0, main::@4/main::i#1 )
main::$0 = main::i#2 & 1
main::b#0 = main::$0
main::b#0 = main::i#2 & 1
main::$6 = 0 != main::b#0
main::$1 = ! main::$6
if(main::$1) goto main::@2
@ -47,7 +47,6 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
number~ main::$0
bool~ main::$1
number~ main::$2
number~ main::$3
@ -67,8 +66,7 @@ byte main::i#4
byte main::i#5
constant byte* const main::screen = (byte*)$400
Adding number conversion cast (unumber) 1 in main::$0 = main::i#2 & 1
Adding number conversion cast (unumber) main::$0 in main::$0 = main::i#2 & (unumber)1
Adding number conversion cast (unumber) 1 in main::b#0 = main::i#2 & 1
Adding number conversion cast (unumber) 0 in main::$6 = 0 != main::b#0
Adding number conversion cast (unumber) main::$4 in main::c#0 = main::$4
Successful SSA optimization PassNAddNumberTypeConversions
@ -81,10 +79,8 @@ Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$0 = main::i#2 & 1
Inversing boolean not [5] main::$1 = 0 == main::b#0 from [4] main::$6 = 0 != main::b#0
Inversing boolean not [4] main::$1 = 0 == main::b#0 from [3] main::$6 = 0 != main::b#0
Successful SSA optimization Pass2UnaryNotSimplification
Alias main::b#0 = main::$0
Alias main::i#2 = main::i#4 main::i#5
Successful SSA optimization Pass2AliasElimination
Alias main::i#2 = main::i#3

View File

@ -1,3 +1,17 @@
Eliminating unused variable with no statement bool_and::$0
Eliminating unused variable with no statement bool_and::$2
Eliminating unused variable with no statement bool_and::$3
Eliminating unused variable with no statement bool_or::$0
Eliminating unused variable with no statement bool_or::$2
Eliminating unused variable with no statement bool_or::$3
Eliminating unused variable with no statement bool_not::$0
Eliminating unused variable with no statement bool_not::$2
Eliminating unused variable with no statement bool_not::$4
Eliminating unused variable with no statement bool_complex::$0
Eliminating unused variable with no statement bool_complex::$2
Eliminating unused variable with no statement bool_complex::$3
Eliminating unused variable with no statement bool_complex::$5
Eliminating unused variable with no statement bool_complex::$6
CONTROL FLOW GRAPH SSA
@ -26,13 +40,10 @@ bool_and: scope:[bool_and] from main
to:bool_and::@1
bool_and::@1: scope:[bool_and] from bool_and bool_and::@3
bool_and::i#2 = phi( bool_and/bool_and::i#0, bool_and::@3/bool_and::i#1 )
bool_and::$0 = bool_and::i#2 < $a
bool_and::o1#0 = bool_and::$0
bool_and::o1#0 = bool_and::i#2 < $a
bool_and::$1 = bool_and::i#2 & 1
bool_and::$2 = bool_and::$1 == 0
bool_and::o2#0 = bool_and::$2
bool_and::$3 = bool_and::o1#0 && bool_and::o2#0
bool_and::o3#0 = bool_and::$3
bool_and::o2#0 = bool_and::$1 == 0
bool_and::o3#0 = bool_and::o1#0 && bool_and::o2#0
if(bool_and::o3#0) goto bool_and::@2
to:bool_and::@4
bool_and::@2: scope:[bool_and] from bool_and::@1
@ -59,13 +70,10 @@ bool_or: scope:[bool_or] from main::@1
to:bool_or::@1
bool_or::@1: scope:[bool_or] from bool_or bool_or::@3
bool_or::i#2 = phi( bool_or/bool_or::i#0, bool_or::@3/bool_or::i#1 )
bool_or::$0 = bool_or::i#2 < $a
bool_or::o1#0 = bool_or::$0
bool_or::o1#0 = bool_or::i#2 < $a
bool_or::$1 = bool_or::i#2 & 1
bool_or::$2 = bool_or::$1 == 0
bool_or::o2#0 = bool_or::$2
bool_or::$3 = bool_or::o1#0 || bool_or::o2#0
bool_or::o3#0 = bool_or::$3
bool_or::o2#0 = bool_or::$1 == 0
bool_or::o3#0 = bool_or::o1#0 || bool_or::o2#0
if(bool_or::o3#0) goto bool_or::@2
to:bool_or::@4
bool_or::@2: scope:[bool_or] from bool_or::@1
@ -92,14 +100,11 @@ bool_not: scope:[bool_not] from main::@2
to:bool_not::@1
bool_not::@1: scope:[bool_not] from bool_not bool_not::@3
bool_not::i#2 = phi( bool_not/bool_not::i#0, bool_not::@3/bool_not::i#1 )
bool_not::$0 = bool_not::i#2 < $a
bool_not::o1#0 = bool_not::$0
bool_not::o1#0 = bool_not::i#2 < $a
bool_not::$1 = bool_not::i#2 & 1
bool_not::$2 = bool_not::$1 == 0
bool_not::o2#0 = bool_not::$2
bool_not::o2#0 = bool_not::$1 == 0
bool_not::$3 = bool_not::o1#0 || bool_not::o2#0
bool_not::$4 = ! bool_not::$3
bool_not::o3#0 = bool_not::$4
bool_not::o3#0 = ! bool_not::$3
if(bool_not::o3#0) goto bool_not::@2
to:bool_not::@4
bool_not::@2: scope:[bool_not] from bool_not::@1
@ -126,18 +131,13 @@ bool_complex: scope:[bool_complex] from main::@3
to:bool_complex::@1
bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3
bool_complex::i#2 = phi( bool_complex/bool_complex::i#0, bool_complex::@3/bool_complex::i#1 )
bool_complex::$0 = bool_complex::i#2 < $a
bool_complex::o1#0 = bool_complex::$0
bool_complex::o1#0 = bool_complex::i#2 < $a
bool_complex::$1 = bool_complex::i#2 & 1
bool_complex::$2 = bool_complex::$1 == 0
bool_complex::o2#0 = bool_complex::$2
bool_complex::$3 = bool_complex::o1#0 && bool_complex::o2#0
bool_complex::o3#0 = bool_complex::$3
bool_complex::o2#0 = bool_complex::$1 == 0
bool_complex::o3#0 = bool_complex::o1#0 && bool_complex::o2#0
bool_complex::$4 = bool_complex::o1#0 || bool_complex::o2#0
bool_complex::$5 = ! bool_complex::$4
bool_complex::o4#0 = bool_complex::$5
bool_complex::$6 = bool_complex::o3#0 || bool_complex::o4#0
bool_complex::o5#0 = bool_complex::$6
bool_complex::o4#0 = ! bool_complex::$4
bool_complex::o5#0 = bool_complex::o3#0 || bool_complex::o4#0
if(bool_complex::o5#0) goto bool_complex::@2
to:bool_complex::@4
bool_complex::@2: scope:[bool_complex] from bool_complex::@1
@ -171,10 +171,7 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void bool_and()
bool~ bool_and::$0
number~ bool_and::$1
bool~ bool_and::$2
bool~ bool_and::$3
bool~ bool_and::$4
byte bool_and::i
byte bool_and::i#0
@ -191,13 +188,8 @@ bool bool_and::o3
bool bool_and::o3#0
constant byte* const bool_and::screen = (byte*)$400
void bool_complex()
bool~ bool_complex::$0
number~ bool_complex::$1
bool~ bool_complex::$2
bool~ bool_complex::$3
bool~ bool_complex::$4
bool~ bool_complex::$5
bool~ bool_complex::$6
bool~ bool_complex::$7
byte bool_complex::i
byte bool_complex::i#0
@ -218,11 +210,8 @@ bool bool_complex::o5
bool bool_complex::o5#0
constant byte* const bool_complex::screen = (byte*)$478
void bool_not()
bool~ bool_not::$0
number~ bool_not::$1
bool~ bool_not::$2
bool~ bool_not::$3
bool~ bool_not::$4
bool~ bool_not::$5
byte bool_not::i
byte bool_not::i#0
@ -239,10 +228,7 @@ bool bool_not::o3
bool bool_not::o3#0
constant byte* const bool_not::screen = (byte*)$450
void bool_or()
bool~ bool_or::$0
number~ bool_or::$1
bool~ bool_or::$2
bool~ bool_or::$3
bool~ bool_or::$4
byte bool_or::i
byte bool_or::i#0
@ -260,22 +246,22 @@ bool bool_or::o3#0
constant byte* const bool_or::screen = (byte*)$428
void main()
Adding number conversion cast (unumber) $a in bool_and::$0 = bool_and::i#2 < $a
Adding number conversion cast (unumber) $a in bool_and::o1#0 = bool_and::i#2 < $a
Adding number conversion cast (unumber) 1 in bool_and::$1 = bool_and::i#2 & 1
Adding number conversion cast (unumber) bool_and::$1 in bool_and::$1 = bool_and::i#2 & (unumber)1
Adding number conversion cast (unumber) 0 in bool_and::$2 = bool_and::$1 == 0
Adding number conversion cast (unumber) $a in bool_or::$0 = bool_or::i#2 < $a
Adding number conversion cast (unumber) 0 in bool_and::o2#0 = bool_and::$1 == 0
Adding number conversion cast (unumber) $a in bool_or::o1#0 = bool_or::i#2 < $a
Adding number conversion cast (unumber) 1 in bool_or::$1 = bool_or::i#2 & 1
Adding number conversion cast (unumber) bool_or::$1 in bool_or::$1 = bool_or::i#2 & (unumber)1
Adding number conversion cast (unumber) 0 in bool_or::$2 = bool_or::$1 == 0
Adding number conversion cast (unumber) $a in bool_not::$0 = bool_not::i#2 < $a
Adding number conversion cast (unumber) 0 in bool_or::o2#0 = bool_or::$1 == 0
Adding number conversion cast (unumber) $a in bool_not::o1#0 = bool_not::i#2 < $a
Adding number conversion cast (unumber) 1 in bool_not::$1 = bool_not::i#2 & 1
Adding number conversion cast (unumber) bool_not::$1 in bool_not::$1 = bool_not::i#2 & (unumber)1
Adding number conversion cast (unumber) 0 in bool_not::$2 = bool_not::$1 == 0
Adding number conversion cast (unumber) $a in bool_complex::$0 = bool_complex::i#2 < $a
Adding number conversion cast (unumber) 0 in bool_not::o2#0 = bool_not::$1 == 0
Adding number conversion cast (unumber) $a in bool_complex::o1#0 = bool_complex::i#2 < $a
Adding number conversion cast (unumber) 1 in bool_complex::$1 = bool_complex::i#2 & 1
Adding number conversion cast (unumber) bool_complex::$1 in bool_complex::$1 = bool_complex::i#2 & (unumber)1
Adding number conversion cast (unumber) 0 in bool_complex::$2 = bool_complex::$1 == 0
Adding number conversion cast (unumber) 0 in bool_complex::o2#0 = bool_complex::$1 == 0
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 1064
@ -311,23 +297,9 @@ Inferred type updated to byte in bool_and::$1 = bool_and::i#2 & 1
Inferred type updated to byte in bool_or::$1 = bool_or::i#2 & 1
Inferred type updated to byte in bool_not::$1 = bool_not::i#2 & 1
Inferred type updated to byte in bool_complex::$1 = bool_complex::i#2 & 1
Alias bool_and::o1#0 = bool_and::$0
Alias bool_and::o2#0 = bool_and::$2
Alias bool_and::o3#0 = bool_and::$3
Alias bool_and::i#2 = bool_and::i#3 bool_and::i#4
Alias bool_or::o1#0 = bool_or::$0
Alias bool_or::o2#0 = bool_or::$2
Alias bool_or::o3#0 = bool_or::$3
Alias bool_or::i#2 = bool_or::i#3 bool_or::i#4
Alias bool_not::o1#0 = bool_not::$0
Alias bool_not::o2#0 = bool_not::$2
Alias bool_not::o3#0 = bool_not::$4
Alias bool_not::i#2 = bool_not::i#3 bool_not::i#4
Alias bool_complex::o1#0 = bool_complex::$0
Alias bool_complex::o2#0 = bool_complex::$2
Alias bool_complex::o3#0 = bool_complex::$3
Alias bool_complex::o4#0 = bool_complex::$5
Alias bool_complex::o5#0 = bool_complex::$6
Alias bool_complex::i#2 = bool_complex::i#3 bool_complex::i#4
Successful SSA optimization Pass2AliasElimination
Alias bool_and::i#2 = bool_and::i#5

View File

@ -1,21 +1,21 @@
Inlined call call __init
Eliminating unused variable with no statement main::$0
Eliminating unused variable with no statement main::$1
Eliminating unused variable with no statement main::$2
Eliminating unused variable with no statement main::$5
CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start::@1
main::$0 = main::x1 - main::x0
main::xd#0 = main::$0
main::$1 = main::y1 - main::y0
main::yd#0 = main::$1
main::xd#0 = main::x1 - main::x0
main::yd#0 = main::y1 - main::y0
main::x#0 = main::x0
main::y#0 = main::y0
main::$2 = main::yd#0 / 2
main::e#0 = main::$2
main::e#0 = main::yd#0 / 2
main::$3 = main::y#0 * $28
main::$4 = SCREEN + main::$3
main::$5 = main::$4 + main::x#0
main::cursor#0 = main::$5
main::cursor#0 = main::$4 + main::x#0
to:main::@1
main::@1: scope:[main] from main main::@2
main::y#3 = phi( main/main::y#0, main::@2/main::y#4 )
@ -83,18 +83,14 @@ constant byte* SCREEN[$28*$19] = (byte*)$400
constant byte STAR = $51
void __start()
void main()
byte~ main::$0
byte~ main::$1
bool~ main::$10
number~ main::$11
byte*~ main::$12
byte~ main::$13
number~ main::$14
bool~ main::$15
number~ main::$2
number~ main::$3
byte*~ main::$4
byte*~ main::$5
number~ main::$6
byte*~ main::$7
byte~ main::$8
@ -140,8 +136,7 @@ byte main::yd#1
byte main::yd#2
byte main::yd#3
Adding number conversion cast (unumber) 2 in main::$2 = main::yd#0 / 2
Adding number conversion cast (unumber) main::$2 in main::$2 = main::yd#0 / (unumber)2
Adding number conversion cast (unumber) 2 in main::e#0 = main::yd#0 / 2
Adding number conversion cast (unumber) $28 in main::$3 = main::y#0 * $28
Adding number conversion cast (unumber) main::$3 in main::$3 = main::y#0 * (unumber)$28
Adding number conversion cast (unumber) 1 in main::$6 = main::x#2 + 1
@ -170,17 +165,12 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$2 = main::yd#0 / 2
Inferred type updated to byte in main::$3 = main::y#0 * $28
Inferred type updated to byte in main::$6 = main::x#2 + 1
Inferred type updated to byte in main::$14 = main::x1 + 1
Inferred type updated to byte in main::$11 = main::y#2 + 1
Inversing boolean not [21] main::$10 = main::xd#1 > main::e#1 from [20] main::$9 = main::xd#1 <= main::e#1
Inversing boolean not [17] main::$10 = main::xd#1 > main::e#1 from [16] main::$9 = main::xd#1 <= main::e#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias main::xd#0 = main::$0
Alias main::yd#0 = main::$1
Alias main::e#0 = main::$2
Alias main::cursor#0 = main::$5
Alias main::x#1 = main::$6 main::x#4
Alias main::cursor#1 = main::$7 main::cursor#4
Alias main::e#1 = main::$8 main::e#4

View File

@ -1,19 +1,19 @@
Eliminating unused variable with no statement main::$0
Eliminating unused variable with no statement main::$1
Eliminating unused variable with no statement main::$2
Eliminating unused variable with no statement main::$4
CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start
main::$0 = main::x1 - main::x0
main::xd#0 = main::$0
main::$1 = main::y1 - main::y0
main::yd#0 = main::$1
main::xd#0 = main::x1 - main::x0
main::yd#0 = main::y1 - main::y0
main::x#0 = main::x0
main::y#0 = main::y0
main::$2 = main::yd#0 / 2
main::e#0 = main::$2
main::e#0 = main::yd#0 / 2
main::$3 = main::y#0 * $28
main::$4 = main::x#0 + main::$3
main::idx#0 = main::$4
main::idx#0 = main::x#0 + main::$3
to:main::@1
main::@1: scope:[main] from main main::@2
main::y#3 = phi( main/main::y#0, main::@2/main::y#4 )
@ -75,16 +75,12 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
byte~ main::$0
byte~ main::$1
number~ main::$10
number~ main::$11
byte~ main::$12
number~ main::$13
bool~ main::$14
number~ main::$2
number~ main::$3
number~ main::$4
number~ main::$5
number~ main::$6
byte~ main::$7
@ -133,11 +129,9 @@ byte main::yd#1
byte main::yd#2
byte main::yd#3
Adding number conversion cast (unumber) 2 in main::$2 = main::yd#0 / 2
Adding number conversion cast (unumber) main::$2 in main::$2 = main::yd#0 / (unumber)2
Adding number conversion cast (unumber) 2 in main::e#0 = main::yd#0 / 2
Adding number conversion cast (unumber) $28 in main::$3 = main::y#0 * $28
Adding number conversion cast (unumber) main::$3 in main::$3 = main::y#0 * (unumber)$28
Adding number conversion cast (unumber) main::$4 in main::$4 = main::x#0 + main::$3
Adding number conversion cast (unumber) 1 in main::$5 = main::x#2 + 1
Adding number conversion cast (unumber) main::$5 in main::$5 = main::x#2 + (unumber)1
Adding number conversion cast (unumber) 1 in main::$6 = main::idx#3 + 1
@ -166,20 +160,14 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$2 = main::yd#0 / 2
Inferred type updated to byte in main::$3 = main::y#0 * $28
Inferred type updated to byte in main::$4 = main::x#0 + main::$3
Inferred type updated to byte in main::$5 = main::x#2 + 1
Inferred type updated to word in main::$6 = main::idx#3 + 1
Inferred type updated to byte in main::$13 = main::x1 + 1
Inferred type updated to byte in main::$10 = main::y#2 + 1
Inferred type updated to word in main::$11 = main::idx#4 + $28
Inversing boolean not [20] main::$9 = main::xd#1 >= main::e#1 from [19] main::$8 = main::xd#1 < main::e#1
Inversing boolean not [16] main::$9 = main::xd#1 >= main::e#1 from [15] main::$8 = main::xd#1 < main::e#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias main::xd#0 = main::$0
Alias main::yd#0 = main::$1
Alias main::e#0 = main::$2
Alias main::idx#0 = main::$4
Alias main::x#1 = main::$5 main::x#4
Alias main::idx#1 = main::$6 main::idx#4
Alias main::e#1 = main::$7 main::e#4

View File

@ -1,4 +1,5 @@
Inlined call call __init
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -328,8 +329,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -692,7 +692,6 @@ void main()
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -1179,7 +1178,6 @@ Alias memset::return#1 = memset::str#1 memset::return#3 memset::return#2
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2

View File

@ -1,11 +1,11 @@
Inlined call call __init
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start::@1
main::$0 = SCREEN + $378
main::sprite_ptr#0 = main::$0
main::sprite_ptr#0 = SCREEN + $378
main::$1 = sprite / $40
main::sprite_ptr#0[0] = (byte)main::$1
to:main::@return
@ -31,13 +31,12 @@ SYMBOL TABLE SSA
constant byte* SCREEN = (byte*)$4400
void __start()
void main()
byte*~ main::$0
byte*~ main::$1
byte* main::sprite_ptr
byte* main::sprite_ptr#0
constant byte* sprite = (byte*)$5000
Adding number conversion cast (unumber) $378 in main::$0 = SCREEN + $378
Adding number conversion cast (unumber) $378 in main::sprite_ptr#0 = SCREEN + $378
Adding number conversion cast (unumber) $40 in main::$1 = sprite / $40
Adding number conversion cast (unumber) 0 in main::sprite_ptr#0[0] = (byte)main::$1
Successful SSA optimization PassNAddNumberTypeConversions
@ -51,8 +50,6 @@ Finalized unsigned number type (word) $378
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias main::sprite_ptr#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [0] main::sprite_ptr#0 = SCREEN + $378
Constant right-side identified [1] main::$1 = sprite / $40
Successful SSA optimization Pass2ConstantRValueConsolidation

View File

@ -1,20 +1,20 @@
Eliminating unused variable with no statement main::$0
Eliminating unused variable with no statement main::$2
Eliminating unused variable with no statement main::$3
Eliminating unused variable with no statement main::$5
CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start
main::$0 = main::min + main::max
main::sumw#0 = main::$0
main::sumw#0 = main::min + main::max
main::$1 = main::sumw#0 >> 1
main::$7 = (byte)main::$1
main::$2 = main::$7 + 1
main::midw#0 = main::$2
main::midw#0 = main::$7 + 1
main::SCREEN[0] = main::midw#0
main::$3 = main::min + main::max
main::sumb#0 = main::$3
main::sumb#0 = main::min + main::max
main::$4 = main::sumb#0 >> 1
main::$5 = main::$4 + 1
main::midb#0 = main::$5
main::midb#0 = main::$4 + 1
main::SCREEN[1] = main::midb#0
main::$6 = main::SCREEN[0] == main::SCREEN[1]
if(main::$6) goto main::@1
@ -42,12 +42,8 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
byte~ main::$0
word~ main::$1
number~ main::$2
byte~ main::$3
byte~ main::$4
number~ main::$5
bool~ main::$6
byte~ main::$7
constant byte* main::BG_COLOR = (byte*)$d021
@ -64,12 +60,10 @@ word main::sumw
word main::sumw#0
Adding number conversion cast (unumber) 1 in main::$1 = main::sumw#0 >> 1
Adding number conversion cast (unumber) 1 in main::$2 = main::$7 + 1
Adding number conversion cast (unumber) main::$2 in main::$2 = main::$7 + (unumber)1
Adding number conversion cast (unumber) 1 in main::midw#0 = main::$7 + 1
Adding number conversion cast (unumber) 0 in main::SCREEN[0] = main::midw#0
Adding number conversion cast (unumber) 1 in main::$4 = main::sumb#0 >> 1
Adding number conversion cast (unumber) 1 in main::$5 = main::$4 + 1
Adding number conversion cast (unumber) main::$5 in main::$5 = main::$4 + (unumber)1
Adding number conversion cast (unumber) 1 in main::midb#0 = main::$4 + 1
Adding number conversion cast (unumber) 1 in main::SCREEN[1] = main::midb#0
Adding number conversion cast (unumber) 0 in main::$6 = main::SCREEN[0] == main::SCREEN[1]
Adding number conversion cast (unumber) 1 in main::$6 = main::SCREEN[(unumber)0] == main::SCREEN[1]
@ -103,13 +97,6 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$2 = main::$7 + 1
Inferred type updated to byte in main::$5 = main::$4 + 1
Alias main::sumw#0 = main::$0
Alias main::midw#0 = main::$2
Alias main::sumb#0 = main::$3
Alias main::midb#0 = main::$5
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$6 [10] if(main::SCREEN[0]==main::SCREEN[1]) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [0] main::sumw#0 = main::min + main::max

View File

@ -109,12 +109,11 @@ gotoxy: {
sta.z conio_cursor_x
// conio_cursor_y = y
stx.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
txa
sta.z __7
lda #0
sta.z __7+1
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
lda.z __7
asl
sta.z __8

View File

@ -6,6 +6,9 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Added struct type cast to parameter value list call printf_sint test_casting::signed_short_value (struct printf_format_number){ 0, 0, 0, 0, 0, DECIMAL }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement gotoxy::$4
Eliminating unused variable with no statement memcpy::$0
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement test_casting::$0
CONTROL FLOW GRAPH SSA
@ -89,8 +92,7 @@ gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4
conio_cursor_x = gotoxy::x#4
conio_cursor_y = gotoxy::y#4
gotoxy::$7 = (word)gotoxy::y#4
gotoxy::$4 = gotoxy::$7 * $28
gotoxy::line_offset#0 = gotoxy::$4
gotoxy::line_offset#0 = gotoxy::$7 * $28
gotoxy::$5 = CONIO_SCREEN_TEXT + gotoxy::line_offset#0
conio_line_text = gotoxy::$5
gotoxy::$6 = CONIO_SCREEN_COLORS + gotoxy::line_offset#0
@ -182,8 +184,7 @@ memcpy: scope:[memcpy] from cscroll::@3 cscroll::@4
memcpy::src#0 = ((byte*)) memcpy::source#2
memcpy::dst#0 = ((byte*)) memcpy::destination#2
memcpy::$2 = (byte*)memcpy::source#2
memcpy::$0 = memcpy::$2 + memcpy::num#2
memcpy::src_end#0 = memcpy::$0
memcpy::src_end#0 = memcpy::$2 + memcpy::num#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
memcpy::destination#4 = phi( memcpy/memcpy::destination#2, memcpy::@2/memcpy::destination#5 )
@ -230,8 +231,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -1103,7 +1103,6 @@ bool~ gotoxy::$0
bool~ gotoxy::$1
bool~ gotoxy::$2
bool~ gotoxy::$3
number~ gotoxy::$4
byte*~ gotoxy::$5
byte*~ gotoxy::$6
word~ gotoxy::$7
@ -1134,7 +1133,6 @@ signed byte main::signed_char_value#2
signed byte main::signed_char_value#3
signed byte main::signed_char_value#4
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
byte*~ memcpy::$0
bool~ memcpy::$1
byte*~ memcpy::$2
void* memcpy::destination
@ -1175,7 +1173,6 @@ byte* memcpy::src_end#2
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -1669,8 +1666,7 @@ Adding number conversion cast (unumber) $28 in clrscr::line_cols#1 = clrscr::lin
Adding number conversion cast (unumber) $19 in gotoxy::$0 = gotoxy::y#3 > $19
Adding number conversion cast (unumber) $28 in gotoxy::$2 = gotoxy::x#3 >= $28
Adding number conversion cast (unumber) 0 in gotoxy::y#0 = 0
Adding number conversion cast (unumber) $28 in gotoxy::$4 = gotoxy::$7 * $28
Adding number conversion cast (unumber) gotoxy::$4 in gotoxy::$4 = gotoxy::$7 * (unumber)$28
Adding number conversion cast (unumber) $28 in gotoxy::line_offset#0 = gotoxy::$7 * $28
Adding number conversion cast (unumber) 0 in gotoxy::x#0 = 0
Adding number conversion cast (unumber) $28 in cputc::$1 = conio_cursor_x == $28
Adding number conversion cast (unumber) $28 in conio_line_text = conio_line_text + $28
@ -1861,23 +1857,22 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized signed number type (signed byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in gotoxy::$4 = gotoxy::$7 * $28
Inferred type updated to byte in utoa::$4 = utoa::max_digits#5 - 1
Inversing boolean not [26] gotoxy::$1 = gotoxy::y#3 <= $19 from [25] gotoxy::$0 = gotoxy::y#3 > $19
Inversing boolean not [30] gotoxy::$3 = gotoxy::x#3 < $28 from [29] gotoxy::$2 = gotoxy::x#3 >= $28
Inversing boolean not [56] cputc::$2 = conio_cursor_x != $28 from [55] cputc::$1 = conio_cursor_x == $28
Inversing boolean not [99] memset::$1 = memset::num#2 <= 0 from [98] memset::$0 = memset::num#2 > 0
Inversing boolean not [162] cscroll::$1 = conio_cursor_y != $19 from [161] cscroll::$0 = conio_cursor_y == $19
Inversing boolean not [195] conio_c64_init::$1 = conio_c64_init::line#0 < $19 from [194] conio_c64_init::$0 = conio_c64_init::line#0 >= $19
Inversing boolean not [305] printf_sint::$3 = 0 == printf_sint::format_sign_always#1 from [304] printf_sint::$5 = 0 != printf_sint::format_sign_always#1
Inversing boolean not [329] printf_number_buffer::$0 = 0 == printf_number_buffer::format_min_length#1 from [328] printf_number_buffer::$26 = 0 != printf_number_buffer::format_min_length#1
Inversing boolean not [333] printf_number_buffer::$1 = 0 == printf_number_buffer::format_justify_left#1 from [332] printf_number_buffer::$27 = 0 != printf_number_buffer::format_justify_left#1
Inversing boolean not [335] printf_number_buffer::$2 = 0 == printf_number_buffer::format_zero_padding#1 from [334] printf_number_buffer::$28 = 0 != printf_number_buffer::format_zero_padding#1
Inversing boolean not [348] printf_number_buffer::$20 = 0 == printf_number_buffer::buffer_sign#1 from [347] printf_number_buffer::$29 = 0 != printf_number_buffer::buffer_sign#1
Inversing boolean not [355] printf_number_buffer::$23 = printf_number_buffer::padding#1 >= 0 from [354] printf_number_buffer::$22 = printf_number_buffer::padding#1 < 0
Inversing boolean not [363] printf_number_buffer::$7 = 0 == printf_number_buffer::buffer_sign#2 from [362] printf_number_buffer::$30 = 0 != printf_number_buffer::buffer_sign#2
Inversing boolean not [380] printf_number_buffer::$12 = 0 == printf_number_buffer::format_upper_case#1 from [379] printf_number_buffer::$31 = 0 != printf_number_buffer::format_upper_case#1
Inversing boolean not [392] printf_number_buffer::$14 = 0 == printf_number_buffer::format_zero_padding#3 from [391] printf_number_buffer::$32 = 0 != printf_number_buffer::format_zero_padding#3
Inversing boolean not [55] cputc::$2 = conio_cursor_x != $28 from [54] cputc::$1 = conio_cursor_x == $28
Inversing boolean not [97] memset::$1 = memset::num#2 <= 0 from [96] memset::$0 = memset::num#2 > 0
Inversing boolean not [159] cscroll::$1 = conio_cursor_y != $19 from [158] cscroll::$0 = conio_cursor_y == $19
Inversing boolean not [192] conio_c64_init::$1 = conio_c64_init::line#0 < $19 from [191] conio_c64_init::$0 = conio_c64_init::line#0 >= $19
Inversing boolean not [302] printf_sint::$3 = 0 == printf_sint::format_sign_always#1 from [301] printf_sint::$5 = 0 != printf_sint::format_sign_always#1
Inversing boolean not [326] printf_number_buffer::$0 = 0 == printf_number_buffer::format_min_length#1 from [325] printf_number_buffer::$26 = 0 != printf_number_buffer::format_min_length#1
Inversing boolean not [330] printf_number_buffer::$1 = 0 == printf_number_buffer::format_justify_left#1 from [329] printf_number_buffer::$27 = 0 != printf_number_buffer::format_justify_left#1
Inversing boolean not [332] printf_number_buffer::$2 = 0 == printf_number_buffer::format_zero_padding#1 from [331] printf_number_buffer::$28 = 0 != printf_number_buffer::format_zero_padding#1
Inversing boolean not [345] printf_number_buffer::$20 = 0 == printf_number_buffer::buffer_sign#1 from [344] printf_number_buffer::$29 = 0 != printf_number_buffer::buffer_sign#1
Inversing boolean not [352] printf_number_buffer::$23 = printf_number_buffer::padding#1 >= 0 from [351] printf_number_buffer::$22 = printf_number_buffer::padding#1 < 0
Inversing boolean not [360] printf_number_buffer::$7 = 0 == printf_number_buffer::buffer_sign#2 from [359] printf_number_buffer::$30 = 0 != printf_number_buffer::buffer_sign#2
Inversing boolean not [377] printf_number_buffer::$12 = 0 == printf_number_buffer::format_upper_case#1 from [376] printf_number_buffer::$31 = 0 != printf_number_buffer::format_upper_case#1
Inversing boolean not [389] printf_number_buffer::$14 = 0 == printf_number_buffer::format_zero_padding#3 from [388] printf_number_buffer::$32 = 0 != printf_number_buffer::format_zero_padding#3
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
@ -1889,12 +1884,10 @@ Alias clrscr::c#2 = clrscr::c#3
Alias clrscr::line_cols#2 = clrscr::line_cols#4 clrscr::line_cols#3
Alias clrscr::l#3 = clrscr::l#6 clrscr::l#4
Alias gotoxy::x#5 = gotoxy::x#6
Alias gotoxy::line_offset#0 = gotoxy::$4
Alias gotoxy::y#5 = gotoxy::y#6
Alias cputc::c#3 = cputc::c#4
Alias cputs::c#1 = cputs::$0 cputs::c#2
Alias cputs::s#0 = cputs::s#6 cputs::s#5
Alias memcpy::src_end#0 = memcpy::$0
Alias memcpy::src#2 = memcpy::src#3
Alias memcpy::dst#2 = memcpy::dst#3
Alias memcpy::src_end#1 = memcpy::src_end#2
@ -1903,7 +1896,6 @@ Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -5171,13 +5163,12 @@ gotoxy: {
// conio_cursor_y = y
// [28] conio_cursor_y = gotoxy::y#4 -- vbuz1=vbuxx
stx.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
// [29] gotoxy::$7 = (word)gotoxy::y#4 -- vwuz1=_word_vbuxx
txa
sta.z __7
lda #0
sta.z __7+1
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
// [30] gotoxy::$8 = gotoxy::$7 << 2 -- vwuz1=vwuz2_rol_2
lda.z __7
asl

View File

@ -15,6 +15,7 @@ main: {
ldx #0
__b1:
// byte b2 = 200-b
//Subtract unsigned byte from unsigned byte
txa
eor #$ff
sec
@ -22,6 +23,7 @@ main: {
// SCREEN[b] = b2
sta SCREEN,x
// signed byte sb = - (signed byte)b
// Cast unsigned byte to signed byte & negate
txa
eor #$ff
clc

View File

@ -1,4 +1,10 @@
Inlined call call __init
Eliminating unused variable with no statement main::$1
Eliminating unused variable with no statement main::$2
Eliminating unused variable with no statement w::$1
Eliminating unused variable with no statement __start::__init1_$0
Eliminating unused variable with no statement __start::__init1_$1
Eliminating unused variable with no statement __start::__init1_$2
CONTROL FLOW GRAPH SSA
@ -14,11 +20,9 @@ main::@1: scope:[main] from main main::@1
SCREEN3#8 = phi( main/SCREEN3#9, main::@1/SCREEN3#8 )
SCREEN2#2 = phi( main/SCREEN2#4, main::@1/SCREEN2#2 )
main::b#2 = phi( main/main::b#0, main::@1/main::b#1 )
main::$1 = $c8 - main::b#2
main::b2#0 = main::$1
main::b2#0 = $c8 - main::b#2
SCREEN[main::b#2] = main::b2#0
main::$2 = - (signed byte)main::b#2
main::sb#0 = main::$2
main::sb#0 = - (signed byte)main::b#2
SCREEN2#2[main::b#2] = (byte)main::sb#0
main::b#1 = main::b#2 + rangenext(0,$64)
main::$3 = main::b#1 != rangelast(0,$64)
@ -47,8 +51,7 @@ w::@1: scope:[w] from w w::@1
w::i#2 = phi( w/w::i#0, w::@1/w::i#1 )
w::$0 = w::w1 - w::w2
w::b#0 = (byte)w::$0
w::$1 = $578-$546 + w::i#2
w::b2#0 = w::$1
w::b2#0 = $578-$546 + w::i#2
SCREEN3#2[w::i#2] = w::b#0
SCREEN4#2[w::i#2] = w::b2#0
w::i#1 = w::i#2 + rangenext(0,$a)
@ -63,12 +66,9 @@ void __start()
__start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
__start::__init1_$0 = SCREEN + $28*3
SCREEN2#0 = __start::__init1_$0
__start::__init1_$1 = SCREEN + $28*6
SCREEN3#0 = __start::__init1_$1
__start::__init1_$2 = SCREEN + $28*9
SCREEN4#0 = __start::__init1_$2
SCREEN2#0 = SCREEN + $28*3
SCREEN3#0 = SCREEN + $28*6
SCREEN4#0 = SCREEN + $28*9
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
SCREEN4#7 = phi( __start::__init1/SCREEN4#0 )
@ -124,12 +124,7 @@ byte* SCREEN4#7
byte* SCREEN4#8
byte* SCREEN4#9
void __start()
byte*~ __start::__init1_$0
byte*~ __start::__init1_$1
byte*~ __start::__init1_$2
void main()
number~ main::$1
signed byte~ main::$2
bool~ main::$3
byte main::b
byte main::b#0
@ -141,7 +136,6 @@ signed byte main::sb
signed byte main::sb#0
void w()
word~ w::$0
number~ w::$1
bool~ w::$2
byte w::b
byte w::b#0
@ -154,29 +148,22 @@ byte w::i#2
constant word w::w1 = $514
constant word w::w2 = $4e2
Adding number conversion cast (unumber) $c8 in main::$1 = $c8 - main::b#2
Adding number conversion cast (unumber) main::$1 in main::$1 = (unumber)$c8 - main::b#2
Adding number conversion cast (unumber) $578-$546 in w::$1 = $578-$546 + w::i#2
Adding number conversion cast (unumber) w::$1 in w::$1 = (unumber)$578-$546 + w::i#2
Adding number conversion cast (unumber) $28*3 in __start::__init1_$0 = SCREEN + $28*3
Adding number conversion cast (unumber) $28*6 in __start::__init1_$1 = SCREEN + $28*6
Adding number conversion cast (unumber) $28*9 in __start::__init1_$2 = SCREEN + $28*9
Adding number conversion cast (unumber) $c8 in main::b2#0 = $c8 - main::b#2
Adding number conversion cast (unumber) $578-$546 in w::b2#0 = $578-$546 + w::i#2
Adding number conversion cast (unumber) $28*3 in SCREEN2#0 = SCREEN + $28*3
Adding number conversion cast (unumber) $28*6 in SCREEN3#0 = SCREEN + $28*6
Adding number conversion cast (unumber) $28*9 in SCREEN4#0 = SCREEN + $28*9
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $c8
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $c8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$1 = $c8 - main::b#2
Inferred type updated to byte in w::$1 = (byte)$578-$546 + w::i#2
Alias main::b2#0 = main::$1
Alias main::sb#0 = main::$2
Alias SCREEN3#6 = SCREEN3#8
Alias SCREEN4#6 = SCREEN4#8
Alias w::b2#0 = w::$1
Alias SCREEN2#0 = __start::__init1_$0 SCREEN2#6 SCREEN2#5 SCREEN2#3 SCREEN2#1
Alias SCREEN3#0 = __start::__init1_$1 SCREEN3#7 SCREEN3#5 SCREEN3#3 SCREEN3#1
Alias SCREEN4#0 = __start::__init1_$2 SCREEN4#7 SCREEN4#5 SCREEN4#3 SCREEN4#1
Alias SCREEN2#0 = SCREEN2#6 SCREEN2#5 SCREEN2#3 SCREEN2#1
Alias SCREEN3#0 = SCREEN3#7 SCREEN3#5 SCREEN3#3 SCREEN3#1
Alias SCREEN4#0 = SCREEN4#7 SCREEN4#5 SCREEN4#3 SCREEN4#1
Successful SSA optimization Pass2AliasElimination
Identical Phi Values SCREEN2#4 SCREEN2#0
Identical Phi Values SCREEN3#9 SCREEN3#0
@ -400,6 +387,7 @@ main: {
// main::@1
__b1:
// [2] main::b2#0 = $c8 - main::b#2 -- vbuaa=vbuc1_minus_vbuxx
//Subtract unsigned byte from unsigned byte
txa
eor #$ff
sec
@ -407,6 +395,7 @@ main: {
// [3] SCREEN[main::b#2] = main::b2#0 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN,x
// [4] main::sb#0 = - (signed byte)main::b#2 -- vbsaa=_neg_vbsxx
// Cast unsigned byte to signed byte & negate
txa
eor #$ff
clc
@ -560,6 +549,7 @@ main: {
__b1:
// byte b2 = 200-b
// [2] main::b2#0 = $c8 - main::b#2 -- vbuaa=vbuc1_minus_vbuxx
//Subtract unsigned byte from unsigned byte
txa
eor #$ff
sec
@ -569,6 +559,7 @@ main: {
sta SCREEN,x
// signed byte sb = - (signed byte)b
// [4] main::sb#0 = - (signed byte)main::b#2 -- vbsaa=_neg_vbsxx
// Cast unsigned byte to signed byte & negate
txa
eor #$ff
clc

View File

@ -1,12 +1,12 @@
Inlined call call __init
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start::@1
asm { sei }
main::$0 = CHARGEN + 8
main::CHAR_A#0 = main::$0
main::CHAR_A#0 = CHARGEN + 8
*PROCPORT = $32
main::sc#0 = SCREEN
main::y#0 = 0
@ -91,7 +91,6 @@ constant byte* PROCPORT = (byte*)1
constant byte* SCREEN = (byte*)$400
void __start()
void main()
byte*~ main::$0
number~ main::$1
bool~ main::$2
bool~ main::$3
@ -140,7 +139,7 @@ byte main::y#4
byte main::y#5
byte main::y#6
Adding number conversion cast (unumber) 8 in main::$0 = CHARGEN + 8
Adding number conversion cast (unumber) 8 in main::CHAR_A#0 = CHARGEN + 8
Adding number conversion cast (unumber) $32 in *PROCPORT = $32
Adding number conversion cast (unumber) $80 in main::$1 = main::bits#2 & $80
Adding number conversion cast (unumber) main::$1 in main::$1 = main::bits#2 & (unumber)$80
@ -174,9 +173,8 @@ Finalized unsigned number type (byte) $37
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$1 = main::bits#2 & $80
Inferred type updated to byte in main::$4 = main::bits#3 * 2
Inversing boolean not [13] main::$3 = main::$1 == 0 from [12] main::$2 = main::$1 != 0
Inversing boolean not [12] main::$3 = main::$1 == 0 from [11] main::$2 = main::$1 != 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias main::CHAR_A#0 = main::$0
Alias main::bits#1 = main::$4
Alias main::sc#5 = main::sc#6
Alias main::bits#2 = main::bits#4

View File

@ -34,6 +34,7 @@ main: {
// clock()
jsr clock
// dword cyclecount = clock()-CLOCKS_PER_INIT
// Calculate the cycle count - 0x12 is the base usage of start/read
lda.z cyclecount
sec
sbc #<CLOCKS_PER_INIT
@ -88,7 +89,7 @@ clock: {
// Stop the timer
lda #0
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL
// 0xffffffff - *CIA2_TIMER_AB
// clock_t ticks = 0xffffffff - *CIA2_TIMER_AB
lda #<$ffffffff
sec
sbc CIA2_TIMER_AB

View File

@ -1,13 +1,14 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement clock::$0
Eliminating unused variable with no statement main::$2
CONTROL FLOW GRAPH SSA
dword clock()
clock: scope:[clock] from main::@3
*((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES
clock::$0 = $ffffffff - *CIA2_TIMER_AB
clock::ticks#0 = clock::$0
clock::ticks#0 = $ffffffff - *CIA2_TIMER_AB
*((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES
clock::return#0 = clock::ticks#0
to:clock::@return
@ -128,8 +129,7 @@ main::@3: scope:[main] from main::@2
main::@4: scope:[main] from main::@3
clock::return#4 = phi( main::@3/clock::return#2 )
main::$1 = clock::return#4
main::$2 = main::$1 - CLOCKS_PER_INIT
main::cyclecount#0 = main::$2
main::cyclecount#0 = main::$1 - CLOCKS_PER_INIT
print_ulong_at::dw#0 = main::cyclecount#0
print_ulong_at::at#0 = SCREEN
call print_ulong_at
@ -172,7 +172,6 @@ constant byte RADIX::OCTAL = 8
constant byte* const SCREEN = (byte*)$400
void __start()
dword clock()
number~ clock::$0
dword clock::return
dword clock::return#0
dword clock::return#1
@ -184,7 +183,6 @@ dword clock::ticks#0
void clock_start()
void main()
dword~ main::$1
dword~ main::$2
dword main::cyclecount
dword main::cyclecount#0
void print_char_at(byte print_char_at::ch , byte* print_char_at::at)
@ -238,8 +236,7 @@ dword print_ulong_at::dw#0
dword print_ulong_at::dw#1
dword print_ulong_at::dw#2
Adding number conversion cast (unumber) $ffffffff in clock::$0 = $ffffffff - *CIA2_TIMER_AB
Adding number conversion cast (unumber) clock::$0 in clock::$0 = (unumber)$ffffffff - *CIA2_TIMER_AB
Adding number conversion cast (unumber) $ffffffff in clock::ticks#0 = $ffffffff - *CIA2_TIMER_AB
Adding number conversion cast (unumber) $ffffffff in *CIA2_TIMER_AB = $ffffffff
Adding number conversion cast (unumber) 2 in print_uint_at::$3 = print_uint_at::at#3 + 2
Adding number conversion cast (unumber) 4 in print_ulong_at::$3 = print_ulong_at::at#2 + 4
@ -269,9 +266,8 @@ Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to dword in clock::$0 = $ffffffff - *CIA2_TIMER_AB
Inferred type updated to byte in print_uchar_at::$2 = print_uchar_at::b#3 & $f
Alias clock::return#0 = clock::ticks#0 clock::$0 clock::return#3 clock::return#1
Alias clock::return#0 = clock::ticks#0 clock::return#3 clock::return#1
Alias print_uchar_at::b#0 = print_uint_at::$0
Alias print_uint_at::w#2 = print_uint_at::w#3
Alias print_uint_at::at#2 = print_uint_at::at#3
@ -286,7 +282,6 @@ Alias print_uchar_at::b#2 = print_uchar_at::b#3
Alias print_uchar_at::at#2 = print_uchar_at::at#3
Alias print_char_at::at#1 = print_uchar_at::$3
Alias clock::return#2 = clock::return#4
Alias main::cyclecount#0 = main::$2
Successful SSA optimization Pass2AliasElimination
Identical Phi Values print_ulong_at::dw#1 print_ulong_at::dw#0
Identical Phi Values print_ulong_at::at#1 print_ulong_at::at#0
@ -712,6 +707,7 @@ main: {
__b3:
// [6] main::$1 = clock::return#2
// [7] main::cyclecount#0 = main::$1 - CLOCKS_PER_INIT -- vduz1=vduz1_minus_vduc1
// Calculate the cycle count - 0x12 is the base usage of start/read
lda.z cyclecount
sec
sbc #<CLOCKS_PER_INIT
@ -1113,6 +1109,7 @@ main: {
// [6] main::$1 = clock::return#2
// dword cyclecount = clock()-CLOCKS_PER_INIT
// [7] main::cyclecount#0 = main::$1 - CLOCKS_PER_INIT -- vduz1=vduz1_minus_vduc1
// Calculate the cycle count - 0x12 is the base usage of start/read
lda.z cyclecount
sec
sbc #<CLOCKS_PER_INIT
@ -1179,7 +1176,7 @@ clock: {
// Stop the timer
lda #0
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL
// 0xffffffff - *CIA2_TIMER_AB
// clock_t ticks = 0xffffffff - *CIA2_TIMER_AB
// [17] clock::return#0 = $ffffffff - *CIA2_TIMER_AB -- vduz1=vduc1_minus__deref_pduc2
lda #<$ffffffff
sec

View File

@ -66,7 +66,7 @@ clock: {
// Stop the timer
lda #0
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL
// 0xffffffff - *CIA2_TIMER_AB
// clock_t ticks = 0xffffffff - *CIA2_TIMER_AB
lda #<$ffffffff
sec
sbc CIA2_TIMER_AB

View File

@ -1,13 +1,13 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement clock::$0
CONTROL FLOW GRAPH SSA
dword clock()
clock: scope:[clock] from main::@2
*((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES
clock::$0 = $ffffffff - *CIA2_TIMER_AB
clock::ticks#0 = clock::$0
clock::ticks#0 = $ffffffff - *CIA2_TIMER_AB
*((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES
clock::return#0 = clock::ticks#0
to:clock::@return
@ -168,7 +168,6 @@ constant byte RADIX::OCTAL = 8
constant byte* const SCREEN = (byte*)$400
void __start()
dword clock()
number~ clock::$0
dword clock::return
dword clock::return#0
dword clock::return#1
@ -231,8 +230,7 @@ dword print_ulong_at::dw#0
dword print_ulong_at::dw#1
dword print_ulong_at::dw#2
Adding number conversion cast (unumber) $ffffffff in clock::$0 = $ffffffff - *CIA2_TIMER_AB
Adding number conversion cast (unumber) clock::$0 in clock::$0 = (unumber)$ffffffff - *CIA2_TIMER_AB
Adding number conversion cast (unumber) $ffffffff in clock::ticks#0 = $ffffffff - *CIA2_TIMER_AB
Adding number conversion cast (unumber) $ffffffff in *CIA2_TIMER_AB = $ffffffff
Adding number conversion cast (unumber) 2 in print_uint_at::$3 = print_uint_at::at#3 + 2
Adding number conversion cast (unumber) 4 in print_ulong_at::$3 = print_ulong_at::at#2 + 4
@ -262,9 +260,8 @@ Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to dword in clock::$0 = $ffffffff - *CIA2_TIMER_AB
Inferred type updated to byte in print_uchar_at::$2 = print_uchar_at::b#3 & $f
Alias clock::return#0 = clock::ticks#0 clock::$0 clock::return#3 clock::return#1
Alias clock::return#0 = clock::ticks#0 clock::return#3 clock::return#1
Alias print_uchar_at::b#0 = print_uint_at::$0
Alias print_uint_at::w#2 = print_uint_at::w#3
Alias print_uint_at::at#2 = print_uint_at::at#3
@ -1093,7 +1090,7 @@ clock: {
// Stop the timer
lda #0
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL
// 0xffffffff - *CIA2_TIMER_AB
// clock_t ticks = 0xffffffff - *CIA2_TIMER_AB
// [14] clock::return#0 = $ffffffff - *CIA2_TIMER_AB -- vduz1=vduc1_minus__deref_pduc2
lda #<$ffffffff
sec

View File

@ -1,3 +1,6 @@
Eliminating unused variable with no statement main::$0
Eliminating unused variable with no statement main::$1
Eliminating unused variable with no statement main::$2
CONTROL FLOW GRAPH SSA
@ -17,12 +20,9 @@ main::@2: scope:[main] from main::@1 main::@2
main::a#2 = phi( main::@1/main::a#4, main::@2/main::a#2 )
main::c#0 = main::a#2
main::d#0 = main::b#2
main::$0 = main::b#2 + main::c#0
main::e#0 = main::$0
main::$1 = main::d#0 + main::a#2
main::f#0 = main::$1
main::$2 = main::e#0 + main::f#0
main::g#0 = main::$2
main::e#0 = main::b#2 + main::c#0
main::f#0 = main::d#0 + main::a#2
main::g#0 = main::e#0 + main::f#0
main::SCREEN[main::idx#2] = main::g#0
main::idx#1 = ++ main::idx#2
main::b#1 = main::b#2 + rangenext(0,5)
@ -53,9 +53,6 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
byte~ main::$0
byte~ main::$1
byte~ main::$2
bool~ main::$3
bool~ main::$4
constant byte* const main::SCREEN = (byte*)$400
@ -90,14 +87,11 @@ Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Alias main::a#2 = main::c#0 main::a#3
Alias main::d#0 = main::b#2
Alias main::e#0 = main::$0
Alias main::f#0 = main::$1
Alias main::g#0 = main::$2
Alias main::idx#1 = main::idx#4
Successful SSA optimization Pass2AliasElimination
Identical Phi Values main::a#2 main::a#4
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [9] main::f#0 = main::d#0 + main::a#4
Identified duplicate assignment right side [8] main::f#0 = main::d#0 + main::a#4
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition main::$3 [12] if(main::b#1!=rangelast(0,5)) goto main::@2
Simple Condition main::$4 [15] if(main::a#1!=rangelast(0,5)) goto main::@1

View File

@ -1,12 +1,12 @@
Eliminating unused variable with no statement main::$0
Eliminating unused variable with no statement main::$1
CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start
main::$0 = main::b + 1
main::c#0 = main::$0
main::$1 = main::c#0 + 1
main::d#0 = main::$1
main::c#0 = main::b + 1
main::d#0 = main::c#0 + 1
main::SCREEN[0] = main::b
main::SCREEN[1] = main::c#0
main::SCREEN[2] = main::d#0
@ -28,8 +28,6 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
number~ main::$0
number~ main::$1
constant byte* const main::SCREEN = (byte*)$400
constant byte main::b = 'c'
byte main::c
@ -37,10 +35,8 @@ byte main::c#0
byte main::d
byte main::d#0
Adding number conversion cast (unumber) 1 in main::$0 = main::b + 1
Adding number conversion cast (unumber) main::$0 in main::$0 = main::b + (unumber)1
Adding number conversion cast (unumber) 1 in main::$1 = main::c#0 + 1
Adding number conversion cast (unumber) main::$1 in main::$1 = main::c#0 + (unumber)1
Adding number conversion cast (unumber) 1 in main::c#0 = main::b + 1
Adding number conversion cast (unumber) 1 in main::d#0 = main::c#0 + 1
Adding number conversion cast (unumber) 0 in main::SCREEN[0] = main::b
Adding number conversion cast (unumber) 1 in main::SCREEN[1] = main::c#0
Adding number conversion cast (unumber) 2 in main::SCREEN[2] = main::d#0
@ -58,11 +54,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$0 = main::b + 1
Inferred type updated to byte in main::$1 = main::c#0 + 1
Alias main::c#0 = main::$0
Alias main::d#0 = main::$1
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [0] main::c#0 = main::b + 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::c#0 = main::b+1

View File

@ -1,10 +1,10 @@
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start
main::$0 = main::b + 1
main::c#0 = main::$0
main::c#0 = main::b + 1
main::SCREEN[0] = main::c#0
to:main::@return
main::@return: scope:[main] from main
@ -24,14 +24,12 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
number~ main::$0
constant byte* const main::SCREEN = (byte*)$400
constant byte main::b = 3
byte main::c
byte main::c#0
Adding number conversion cast (unumber) 1 in main::$0 = main::b + 1
Adding number conversion cast (unumber) main::$0 in main::$0 = main::b + (unumber)1
Adding number conversion cast (unumber) 1 in main::c#0 = main::b + 1
Adding number conversion cast (unumber) 0 in main::SCREEN[0] = main::c#0
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
@ -41,9 +39,6 @@ Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$0 = main::b + 1
Alias main::c#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [0] main::c#0 = main::b + 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::c#0 = main::b+1

View File

@ -1,4 +1,5 @@
Loading link script "xmega65.ld"
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -20,8 +21,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -156,7 +156,6 @@ byte* main::sc#3
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -242,7 +241,6 @@ Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2

View File

@ -1,3 +1,4 @@
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
@ -7,8 +8,7 @@ main: scope:[main] from __start
to:main::@1
main::@1: scope:[main] from main main::@1
main::x#2 = phi( main/main::x#0, main::@1/main::x#1 )
main::$0 = main::x#2 + $c
main::y#0 = main::$0
main::y#0 = main::x#2 + $c
main::screen[main::y#0] = 'a'
main::cols[main::y#0] = main::BLACK
main::x#1 = main::x#2 + rangenext(0,$a)
@ -32,7 +32,6 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
number~ main::$0
bool~ main::$1
constant byte main::BLACK = 0
constant byte* main::cols = (byte*)$d800
@ -44,8 +43,7 @@ byte main::x#2
byte main::y
byte main::y#0
Adding number conversion cast (unumber) $c in main::$0 = main::x#2 + $c
Adding number conversion cast (unumber) main::$0 in main::$0 = main::x#2 + (unumber)$c
Adding number conversion cast (unumber) $c in main::y#0 = main::x#2 + $c
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
@ -53,9 +51,6 @@ Simplifying constant integer cast $c
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $c
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$0 = main::x#2 + $c
Alias main::y#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$1 [7] if(main::x#1!=rangelast(0,$a)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::x#0 = 0

View File

@ -1,3 +1,4 @@
Eliminating unused variable with no statement main::$3
CONTROL FLOW GRAPH SSA
@ -14,8 +15,7 @@ main::@2: scope:[main] from main::@1
main::COLS#3 = phi( main::@1/main::COLS#2 )
main::$1 = main::COLS#3 * 4
main::$2 = SCREEN + main::$1
main::$3 = main::$2 + 2
main::sc#0 = main::$3
main::sc#0 = main::$2 + 2
main::i#0 = 0
to:main::@3
main::@3: scope:[main] from main::@2 main::@4
@ -57,7 +57,6 @@ void main()
bool~ main::$0
number~ main::$1
byte*~ main::$2
byte*~ main::$3
bool~ main::$4
byte main::COLS
byte main::COLS#0
@ -80,7 +79,7 @@ byte* main::sc#2
Adding number conversion cast (unumber) 2 in main::$0 = main::COLS#2 < 2
Adding number conversion cast (unumber) 4 in main::$1 = main::COLS#3 * 4
Adding number conversion cast (unumber) main::$1 in main::$1 = main::COLS#3 * (unumber)4
Adding number conversion cast (unumber) 2 in main::$3 = main::$2 + 2
Adding number conversion cast (unumber) 2 in main::sc#0 = main::$2 + 2
Adding number conversion cast (unumber) 4 in main::$4 = main::i#2 < 4
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
@ -96,7 +95,6 @@ Finalized unsigned number type (byte) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in main::$1 = main::COLS#3 * 4
Alias main::COLS#2 = main::COLS#3
Alias main::sc#0 = main::$3
Alias main::COLS#4 = main::COLS#6 main::COLS#5
Alias main::sc#1 = main::sc#2
Alias main::i#2 = main::i#3

View File

@ -41,6 +41,7 @@ sub: {
lda #C
sta SCREEN+3
// byte D = A+1
// Not an early constant (expression)
ldx.z A
inx
// SCREEN[4] = D

View File

@ -1,5 +1,6 @@
Setting inferred volatile on symbol affected by address-of main::addrA = &A
Inlined call call __init
Eliminating unused variable with no statement sub::$0
CONTROL FLOW GRAPH SSA
@ -19,8 +20,7 @@ main::@return: scope:[main] from main::@1
void sub()
sub: scope:[sub] from main
SCREEN[3] = sub::C
sub::$0 = A + 1
sub::D#0 = sub::$0
sub::D#0 = A + 1
SCREEN[4] = sub::D#0
to:sub::@return
sub::@return: scope:[sub] from sub
@ -50,7 +50,6 @@ void main()
constant byte main::B = 'b'
constant byte* main::addrA = &A
void sub()
number~ sub::$0
constant byte sub::C = 'c'
byte sub::D
byte sub::D#0
@ -59,8 +58,7 @@ Adding number conversion cast (unumber) 0 in SCREEN[0] = A
Adding number conversion cast (unumber) 1 in SCREEN[1] = main::B
Adding number conversion cast (unumber) 2 in SCREEN[2] = *main::addrA
Adding number conversion cast (unumber) 3 in SCREEN[3] = sub::C
Adding number conversion cast (unumber) 1 in sub::$0 = A + 1
Adding number conversion cast (unumber) sub::$0 in sub::$0 = A + (unumber)1
Adding number conversion cast (unumber) 1 in sub::D#0 = A + 1
Adding number conversion cast (unumber) 4 in SCREEN[4] = sub::D#0
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
@ -78,9 +76,6 @@ Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in sub::$0 = A + 1
Alias sub::D#0 = sub::$0
Successful SSA optimization Pass2AliasElimination
Simplifying expression containing zero SCREEN in [0] SCREEN[0] = A
Successful SSA optimization PassNSimplifyExpressionWithZero
Consolidated array index constant in *(SCREEN+1)
@ -246,6 +241,7 @@ sub: {
lda #C
sta SCREEN+3
// [11] sub::D#0 = A + 1 -- vbuxx=vbuz1_plus_1
// Not an early constant (expression)
ldx.z A
inx
// [12] *(SCREEN+4) = sub::D#0 -- _deref_pbuc1=vbuxx
@ -357,6 +353,7 @@ sub: {
sta SCREEN+3
// byte D = A+1
// [11] sub::D#0 = A + 1 -- vbuxx=vbuz1_plus_1
// Not an early constant (expression)
ldx.z A
inx
// SCREEN[4] = D

View File

@ -1,4 +1,5 @@
Inlined call call __init
Eliminating unused variable with no statement __start::__init1_$1
CONTROL FLOW GRAPH SSA
@ -25,8 +26,7 @@ __start: scope:[__start] from
to:__start::__init1
__start::__init1: scope:[__start] from __start
__start::__init1_$0 = VIC + $10*2
__start::__init1_$1 = __start::__init1_$0 + 1
BG_COLOR#0 = __start::__init1_$1
BG_COLOR#0 = __start::__init1_$0 + 1
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
BG_COLOR#4 = phi( __start::__init1/BG_COLOR#0 )
@ -55,7 +55,6 @@ constant const byte STAR = $51
constant byte* VIC = (byte*)$d000
void __start()
byte*~ __start::__init1_$0
byte*~ __start::__init1_$1
void main()
bool~ main::$0
byte main::i
@ -66,7 +65,7 @@ byte main::i#2
Adding number conversion cast (unumber) STAR+1 in SCREEN[main::i#2] = STAR+1
Adding number conversion cast (unumber) 1 in SCREEN[main::i#2] = ((unumber)) STAR+1
Adding number conversion cast (unumber) $10*2 in __start::__init1_$0 = VIC + $10*2
Adding number conversion cast (unumber) 1 in __start::__init1_$1 = __start::__init1_$0 + 1
Adding number conversion cast (unumber) 1 in BG_COLOR#0 = __start::__init1_$0 + 1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast SCREEN[main::i#2] = (unumber)STAR+(unumber)1
Successful SSA optimization Pass2InlineCast
@ -79,7 +78,7 @@ Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias BG_COLOR#0 = __start::__init1_$1 BG_COLOR#4 BG_COLOR#5 BG_COLOR#3 BG_COLOR#1
Alias BG_COLOR#0 = BG_COLOR#4 BG_COLOR#5 BG_COLOR#3 BG_COLOR#1
Successful SSA optimization Pass2AliasElimination
Identical Phi Values BG_COLOR#2 BG_COLOR#0
Successful SSA optimization Pass2IdenticalPhiElimination

View File

@ -1,4 +1,9 @@
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement test_bytes::$1
Eliminating unused variable with no statement test_sbytes::$1
Eliminating unused variable with no statement test_sbytes::$3
Eliminating unused variable with no statement test_sbytes::$5
CONTROL FLOW GRAPH SSA
@ -109,8 +114,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -185,8 +189,7 @@ test_bytes::@1: scope:[test_bytes] from test_bytes
print_char_cursor#48 = phi( test_bytes/print_char_cursor#21 )
print_char_cursor#12 = print_char_cursor#48
print_line_cursor#8 = print_line_cursor#33
test_bytes::$1 = test_bytes::bb + 2
test_bytes::bc#0 = test_bytes::$1
test_bytes::bc#0 = test_bytes::bb + 2
assert_byte::msg#1 = test_bytes::msg1
assert_byte::b#1 = test_bytes::bc#0
assert_byte::c#1 = 2
@ -304,8 +307,7 @@ test_sbytes::@1: scope:[test_sbytes] from test_sbytes
print_char_cursor#58 = phi( test_sbytes/print_char_cursor#33 )
print_char_cursor#22 = print_char_cursor#58
print_line_cursor#14 = print_line_cursor#39
test_sbytes::$1 = test_sbytes::bb + 2
test_sbytes::bc#0 = test_sbytes::$1
test_sbytes::bc#0 = test_sbytes::bb + 2
assert_sbyte::msg#1 = test_sbytes::msg1
assert_sbyte::b#1 = test_sbytes::bc#0
assert_sbyte::c#1 = 2
@ -317,8 +319,7 @@ test_sbytes::@2: scope:[test_sbytes] from test_sbytes::@1
print_char_cursor#59 = phi( test_sbytes::@1/print_char_cursor#33 )
print_char_cursor#23 = print_char_cursor#59
print_line_cursor#15 = print_line_cursor#40
test_sbytes::$3 = test_sbytes::bc#1 - 4
test_sbytes::bd#0 = test_sbytes::$3
test_sbytes::bd#0 = test_sbytes::bc#1 - 4
assert_sbyte::msg#2 = test_sbytes::msg2
assert_sbyte::b#2 = test_sbytes::bd#0
assert_sbyte::c#2 = -2
@ -330,8 +331,7 @@ test_sbytes::@3: scope:[test_sbytes] from test_sbytes::@2
print_char_cursor#60 = phi( test_sbytes::@2/print_char_cursor#33 )
print_char_cursor#24 = print_char_cursor#60
print_line_cursor#16 = print_line_cursor#41
test_sbytes::$5 = - test_sbytes::bd#1
test_sbytes::be#0 = test_sbytes::$5
test_sbytes::be#0 = - test_sbytes::bd#1
assert_sbyte::msg#3 = test_sbytes::msg3
assert_sbyte::b#3 = test_sbytes::be#0
assert_sbyte::c#3 = 2
@ -529,7 +529,6 @@ void main()
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -757,7 +756,6 @@ byte* print_str::str#7
byte* print_str::str#8
byte* print_str::str#9
void test_bytes()
number~ test_bytes::$1
number~ test_bytes::$3
signed byte~ test_bytes::$5
constant byte test_bytes::bb = 0
@ -770,9 +768,6 @@ constant byte* test_bytes::msg[4] = "0=0"
constant byte* test_bytes::msg1[6] = "0+2=2"
constant byte* test_bytes::msg2[$a] = "0+2-4=254"
void test_sbytes()
number~ test_sbytes::$1
number~ test_sbytes::$3
signed byte~ test_sbytes::$5
constant signed byte test_sbytes::bb = 0
signed byte test_sbytes::bc
signed byte test_sbytes::bc#0
@ -794,18 +789,15 @@ Adding number conversion cast (unumber) $28 in print_ln::$0 = print_line_cursor#
Adding number conversion cast (unumber) $3e8 in memset::num#0 = $3e8
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#1 > 0
Adding number conversion cast (unumber) 0 in assert_byte::c#0 = 0
Adding number conversion cast (unumber) 2 in test_bytes::$1 = test_bytes::bb + 2
Adding number conversion cast (unumber) test_bytes::$1 in test_bytes::$1 = test_bytes::bb + (unumber)2
Adding number conversion cast (unumber) 2 in test_bytes::bc#0 = test_bytes::bb + 2
Adding number conversion cast (unumber) 2 in assert_byte::c#1 = 2
Adding number conversion cast (snumber) 4 in test_bytes::$3 = test_bytes::$5 - 4
Adding number conversion cast (snumber) test_bytes::$3 in test_bytes::$3 = test_bytes::$5 - (snumber)4
Adding number conversion cast (unumber) $fe in assert_byte::c#2 = $fe
Adding number conversion cast (snumber) 0 in assert_sbyte::c#0 = 0
Adding number conversion cast (snumber) 2 in test_sbytes::$1 = test_sbytes::bb + 2
Adding number conversion cast (snumber) test_sbytes::$1 in test_sbytes::$1 = test_sbytes::bb + (snumber)2
Adding number conversion cast (snumber) 2 in test_sbytes::bc#0 = test_sbytes::bb + 2
Adding number conversion cast (snumber) 2 in assert_sbyte::c#1 = 2
Adding number conversion cast (snumber) 4 in test_sbytes::$3 = test_sbytes::bc#1 - 4
Adding number conversion cast (snumber) test_sbytes::$3 in test_sbytes::$3 = test_sbytes::bc#1 - (snumber)4
Adding number conversion cast (snumber) 4 in test_sbytes::bd#0 = test_sbytes::bc#1 - 4
Adding number conversion cast (snumber) -2 in assert_sbyte::c#2 = -2
Adding number conversion cast (snumber) 2 in assert_sbyte::c#3 = 2
Adding number conversion cast (snumber) 2 in assert_sbyte::c#4 = 2
@ -857,10 +849,7 @@ Finalized signed number type (signed byte) -2
Finalized signed number type (signed byte) 2
Finalized signed number type (signed byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in test_bytes::$1 = test_bytes::bb + 2
Inferred type updated to signed byte in test_bytes::$3 = test_bytes::$5 - 4
Inferred type updated to signed byte in test_sbytes::$1 = test_sbytes::bb + 2
Inferred type updated to signed byte in test_sbytes::$3 = test_sbytes::bc#1 - 4
Inversing boolean not [46] memset::$1 = memset::num#1 <= 0 from [45] memset::$0 = memset::num#1 > 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias print_str::str#10 = print_str::str#9 print_str::str#11
@ -873,7 +862,6 @@ Alias memset::return#1 = memset::str#1 memset::return#3 memset::return#2
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -886,7 +874,7 @@ Alias print_char_cursor#10 = print_char_cursor#46 print_char_cursor#47 print_cha
Alias print_line_cursor#31 = print_line_cursor#6 print_line_cursor#32 print_line_cursor#7
Alias print_char_cursor#12 = print_char_cursor#48
Alias print_line_cursor#33 = print_line_cursor#8
Alias test_bytes::bc#0 = test_bytes::$1 test_bytes::bc#1
Alias test_bytes::bc#0 = test_bytes::bc#1
Alias print_char_cursor#13 = print_char_cursor#49
Alias print_line_cursor#34 = print_line_cursor#9
Alias print_char_cursor#14 = print_char_cursor#50 print_char_cursor#51 print_char_cursor#15
@ -902,13 +890,12 @@ Alias print_line_cursor#12 = print_line_cursor#37 print_line_cursor#38 print_lin
Alias print_char_cursor#20 = print_char_cursor#56 print_char_cursor#57 print_char_cursor#21
Alias print_char_cursor#22 = print_char_cursor#58
Alias print_line_cursor#14 = print_line_cursor#39
Alias test_sbytes::bc#0 = test_sbytes::$1 test_sbytes::bc#1
Alias test_sbytes::bc#0 = test_sbytes::bc#1
Alias print_char_cursor#23 = print_char_cursor#59
Alias print_line_cursor#15 = print_line_cursor#40
Alias test_sbytes::bd#0 = test_sbytes::$3 test_sbytes::bd#1
Alias test_sbytes::bd#0 = test_sbytes::bd#1
Alias print_char_cursor#24 = print_char_cursor#60
Alias print_line_cursor#16 = print_line_cursor#41
Alias test_sbytes::be#0 = test_sbytes::$5
Alias print_char_cursor#25 = print_char_cursor#61
Alias print_line_cursor#17 = print_line_cursor#42
Alias print_char_cursor#26 = print_char_cursor#62 print_char_cursor#63 print_char_cursor#27

View File

@ -52,9 +52,8 @@ main: {
ldy.z y
sty.z yw+1
sta.z yw
// atan2_16(xw, yw)
jsr atan2_16
// word angle_w = atan2_16(xw, yw)
jsr atan2_16
// angle_w+0x0080
lda #$80
clc

View File

@ -2,6 +2,8 @@ Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$1 = call toD018 SCREEN CHARSET
Eliminating unused variable with no statement main::$4
Eliminating unused variable with no statement main::$6
CONTROL FLOW GRAPH SSA
@ -345,11 +347,9 @@ main::@8: scope:[main] from main::@2
main::x#3 = phi( main::@2/main::x#2 )
main::screen#2 = phi( main::@2/main::screen#3 )
atan2_16::return#4 = phi( main::@2/atan2_16::return#2 )
main::$4 = atan2_16::return#4
main::angle_w#0 = main::$4
main::angle_w#0 = atan2_16::return#4
main::$5 = main::angle_w#0 + $80
main::$6 = byte1 main::$5
main::ang_w#0 = main::$6
main::ang_w#0 = byte1 main::$5
*main::screen#2 = main::ang_w#0
main::screen#1 = ++ main::screen#2
main::x#1 = main::x#3 + rangenext(-$13,$14)
@ -625,9 +625,7 @@ byte~ main::$10
byte~ main::$11
word~ main::$2
word~ main::$3
word~ main::$4
number~ main::$5
byte~ main::$6
bool~ main::$7
bool~ main::$8
byte main::ang_w
@ -856,8 +854,6 @@ Alias atan2_16::return#2 = atan2_16::return#4
Alias main::screen#2 = main::screen#3
Alias main::x#2 = main::x#3
Alias main::y#2 = main::y#5 main::y#3
Alias main::angle_w#0 = main::$4
Alias main::ang_w#0 = main::$6
Alias main::screen#1 = main::screen#5
Successful SSA optimization Pass2AliasElimination
Alias atan2_16::x#1 = atan2_16::x#5 atan2_16::x#10
@ -2681,14 +2677,13 @@ main: {
ldy.z y
sty.z yw+1
sta.z yw
// atan2_16(xw, yw)
// word angle_w = atan2_16(xw, yw)
// [8] atan2_16::x#0 = (signed word)main::xw#0
// [9] atan2_16::y#0 = (signed word)main::yw#0
// [10] call atan2_16
jsr atan2_16
// [11] atan2_16::return#2 = atan2_16::return#0
// main::@6
// word angle_w = atan2_16(xw, yw)
// [12] main::angle_w#0 = atan2_16::return#2
// angle_w+0x0080
// [13] main::$5 = main::angle_w#0 + $80 -- vwuz1=vwuz1_plus_vbuc1

View File

@ -239,9 +239,8 @@ init_angle_screen: {
// MAKEWORD( y*2, 0 )
sta.z yw+1
sty.z yw
// atan2_16(xw, yw)
jsr atan2_16
// word angle_w = atan2_16(xw, yw)
jsr atan2_16
// angle_w+0x0080
lda #$80
clc

View File

@ -2,6 +2,10 @@ Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$1 = call toD018 SCREEN CHARSET
Eliminating unused variable with no statement init_angle_screen::$0
Eliminating unused variable with no statement init_angle_screen::$1
Eliminating unused variable with no statement init_angle_screen::$8
Eliminating unused variable with no statement init_angle_screen::$10
CONTROL FLOW GRAPH SSA
@ -350,10 +354,8 @@ main::@return: scope:[main] from main::@1
void init_angle_screen(byte* init_angle_screen::screen)
init_angle_screen: scope:[init_angle_screen] from main::@5
init_angle_screen::screen#1 = phi( main::@5/init_angle_screen::screen#0 )
init_angle_screen::$0 = init_angle_screen::screen#1 + $28*$c
init_angle_screen::screen_topline#0 = init_angle_screen::$0
init_angle_screen::$1 = init_angle_screen::screen#1 + $28*$c
init_angle_screen::screen_bottomline#0 = init_angle_screen::$1
init_angle_screen::screen_topline#0 = init_angle_screen::screen#1 + $28*$c
init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#1 + $28*$c
init_angle_screen::y#0 = 0
to:init_angle_screen::@1
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@4
@ -397,11 +399,9 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3
init_angle_screen::x#4 = phi( init_angle_screen::@3/init_angle_screen::x#3 )
init_angle_screen::screen_topline#2 = phi( init_angle_screen::@3/init_angle_screen::screen_topline#4 )
atan2_16::return#4 = phi( init_angle_screen::@3/atan2_16::return#2 )
init_angle_screen::$8 = atan2_16::return#4
init_angle_screen::angle_w#0 = init_angle_screen::$8
init_angle_screen::angle_w#0 = atan2_16::return#4
init_angle_screen::$9 = init_angle_screen::angle_w#0 + $80
init_angle_screen::$10 = byte1 init_angle_screen::$9
init_angle_screen::ang_w#0 = init_angle_screen::$10
init_angle_screen::ang_w#0 = byte1 init_angle_screen::$9
init_angle_screen::$11 = $80 + init_angle_screen::ang_w#0
init_angle_screen::screen_topline#2[init_angle_screen::x#4] = init_angle_screen::$11
init_angle_screen::$12 = $80 - init_angle_screen::ang_w#0
@ -617,9 +617,6 @@ signed word atan2_16::yi#7
signed word atan2_16::yi#8
signed word atan2_16::yi#9
void init_angle_screen(byte* init_angle_screen::screen)
byte*~ init_angle_screen::$0
byte*~ init_angle_screen::$1
byte~ init_angle_screen::$10
number~ init_angle_screen::$11
number~ init_angle_screen::$12
byte~ init_angle_screen::$13
@ -630,7 +627,6 @@ number~ init_angle_screen::$4
word~ init_angle_screen::$5
number~ init_angle_screen::$6
word~ init_angle_screen::$7
word~ init_angle_screen::$8
number~ init_angle_screen::$9
byte init_angle_screen::ang_w
byte init_angle_screen::ang_w#0
@ -804,8 +800,8 @@ Adding number conversion cast (unumber) main::toD0181_$6 in main::toD0181_$6 = m
Adding number conversion cast (unumber) $ff in main::$3 = *RASTER != $ff
Adding number conversion cast (unumber) $800 in main::$4 = main::clear_char#2 < CHARSET+$800
Adding number conversion cast (unumber) 0 in *main::clear_char#3 = 0
Adding number conversion cast (unumber) $28*$c in init_angle_screen::$0 = init_angle_screen::screen#1 + $28*$c
Adding number conversion cast (unumber) $28*$c in init_angle_screen::$1 = init_angle_screen::screen#1 + $28*$c
Adding number conversion cast (unumber) $28*$c in init_angle_screen::screen_topline#0 = init_angle_screen::screen#1 + $28*$c
Adding number conversion cast (unumber) $28*$c in init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#1 + $28*$c
Adding number conversion cast (unumber) $13 in init_angle_screen::$2 = init_angle_screen::x#2 <= $13
Adding number conversion cast (unumber) 2 in init_angle_screen::$3 = init_angle_screen::x#3 * 2
Adding number conversion cast (unumber) init_angle_screen::$3 in init_angle_screen::$3 = init_angle_screen::x#3 * (unumber)2
@ -985,16 +981,12 @@ Alias main::toD0181_screen#0 = main::toD0181_screen#1
Alias main::toD0181_gfx#0 = main::toD0181_gfx#1
Alias main::toD0181_return#0 = main::toD0181_$6 main::toD0181_return#2 main::toD0181_return#1 main::toD0181_return#3 main::$1
Alias main::clear_char#2 = main::clear_char#4 main::clear_char#3
Alias init_angle_screen::screen_topline#0 = init_angle_screen::$0
Alias init_angle_screen::screen_bottomline#0 = init_angle_screen::$1
Alias init_angle_screen::x#2 = init_angle_screen::x#3 init_angle_screen::x#4
Alias init_angle_screen::y#2 = init_angle_screen::y#4 init_angle_screen::y#6 init_angle_screen::y#3
Alias init_angle_screen::screen_topline#2 = init_angle_screen::screen_topline#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#3
Alias init_angle_screen::screen_bottomline#2 = init_angle_screen::screen_bottomline#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#3
Alias init_angle_screen::xb#2 = init_angle_screen::xb#3 init_angle_screen::xb#4
Alias atan2_16::return#2 = atan2_16::return#4
Alias init_angle_screen::angle_w#0 = init_angle_screen::$8
Alias init_angle_screen::ang_w#0 = init_angle_screen::$10
Successful SSA optimization Pass2AliasElimination
Alias atan2_16::x#1 = atan2_16::x#5 atan2_16::x#10
Alias atan2_16::y#1 = atan2_16::y#12 atan2_16::y#9
@ -1034,7 +1026,7 @@ Identical Phi Values atan2_16::y#19 atan2_16::y#0
Identical Phi Values atan2_16::x#4 atan2_16::x#17
Identical Phi Values atan2_16::y#4 atan2_16::y#19
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [154] init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0 + (word)$28*$c
Identified duplicate assignment right side [153] init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0 + (word)$28*$c
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition init_font_hex::$3 [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition init_font_hex::$4 [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
@ -3375,14 +3367,13 @@ init_angle_screen: {
// [46] init_angle_screen::yw#0 = init_angle_screen::$6 w= 0 -- vwuz1=vbuaa_word_vbuc1
sta.z yw+1
sty.z yw
// atan2_16(xw, yw)
// word angle_w = atan2_16(xw, yw)
// [47] atan2_16::x#0 = (signed word)init_angle_screen::xw#0
// [48] atan2_16::y#0 = (signed word)init_angle_screen::yw#0
// [49] call atan2_16
jsr atan2_16
// [50] atan2_16::return#2 = atan2_16::return#0
// init_angle_screen::@5
// word angle_w = atan2_16(xw, yw)
// [51] init_angle_screen::angle_w#0 = atan2_16::return#2
// angle_w+0x0080
// [52] init_angle_screen::$9 = init_angle_screen::angle_w#0 + $80 -- vwuz1=vwuz1_plus_vbuc1

View File

@ -39,10 +39,9 @@ main: {
lda #-$13
sta.z x
__b2:
// atan2_8(x, y)
// byte angle = atan2_8(x, y)
jsr atan2_8
txa
// byte angle = atan2_8(x, y)
// *screen++ = angle
ldy #0
sta (screen),y

View File

@ -2,6 +2,9 @@ Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$1 = call toD018 SCREEN CHARSET
Eliminating unused variable with no statement atan2_8::$19
Eliminating unused variable with no statement atan2_8::$20
Eliminating unused variable with no statement main::$2
CONTROL FLOW GRAPH SSA
@ -142,10 +145,8 @@ atan2_8::@11: scope:[atan2_8] from atan2_8::@10
atan2_8::yi#4 = phi( atan2_8::@10/atan2_8::yi#3 )
atan2_8::i#2 = phi( atan2_8::@10/atan2_8::i#6 )
atan2_8::xi#3 = phi( atan2_8::@10/atan2_8::xi#6 )
atan2_8::$19 = atan2_8::xi#3 >> atan2_8::i#2
atan2_8::xd#0 = atan2_8::$19
atan2_8::$20 = atan2_8::yi#4 >> atan2_8::i#2
atan2_8::yd#0 = atan2_8::$20
atan2_8::xd#0 = atan2_8::xi#3 >> atan2_8::i#2
atan2_8::yd#0 = atan2_8::yi#4 >> atan2_8::i#2
atan2_8::$21 = atan2_8::yi#4 > 0
if(atan2_8::$21) goto atan2_8::@13
to:atan2_8::@15
@ -276,8 +277,7 @@ main::@8: scope:[main] from main::@2
main::x#3 = phi( main::@2/main::x#2 )
main::screen#2 = phi( main::@2/main::screen#3 )
atan2_8::return#4 = phi( main::@2/atan2_8::return#2 )
main::$2 = atan2_8::return#4
main::angle#0 = main::$2
main::angle#0 = atan2_8::return#4
*main::screen#2 = main::angle#0
main::screen#1 = ++ main::screen#2
main::x#1 = main::x#3 + rangenext(-$13,$14)
@ -333,9 +333,7 @@ bool~ atan2_8::$15
byte~ atan2_8::$16
bool~ atan2_8::$17
bool~ atan2_8::$18
signed byte~ atan2_8::$19
signed byte~ atan2_8::$2
signed byte~ atan2_8::$20
bool~ atan2_8::$21
bool~ atan2_8::$22
signed byte~ atan2_8::$3
@ -495,7 +493,6 @@ byte* init_font_hex::proto_lo#3
byte* init_font_hex::proto_lo#4
void main()
byte~ main::$1
byte~ main::$2
bool~ main::$3
bool~ main::$4
byte main::angle
@ -633,8 +630,8 @@ Inferred type updated to byte in main::toD0181_$4 = main::toD0181_$3 / 4
Inferred type updated to byte in main::toD0181_$5 = main::toD0181_$4 & $f
Inferred type updated to byte in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Inversing boolean not [59] atan2_8::$18 = atan2_8::yi#3 != 0 from [58] atan2_8::$17 = atan2_8::yi#3 == 0
Inversing boolean not [72] atan2_8::$12 = atan2_8::x#4 >= 0 from [71] atan2_8::$11 = atan2_8::x#4 < 0
Inversing boolean not [88] atan2_8::$15 = atan2_8::y#4 >= 0 from [87] atan2_8::$14 = atan2_8::y#4 < 0
Inversing boolean not [70] atan2_8::$12 = atan2_8::x#4 >= 0 from [69] atan2_8::$11 = atan2_8::x#4 < 0
Inversing boolean not [86] atan2_8::$15 = atan2_8::y#4 >= 0 from [85] atan2_8::$14 = atan2_8::y#4 < 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias init_font_hex::charset#3 = init_font_hex::charset#4
Alias init_font_hex::idx#2 = init_font_hex::idx#6
@ -657,9 +654,9 @@ Alias atan2_8::yi#3 = atan2_8::yi#4 atan2_8::yi#5 atan2_8::yi#6
Alias atan2_8::angle#12 = atan2_8::angle#14 atan2_8::angle#7 atan2_8::angle#8
Alias atan2_8::x#11 = atan2_8::x#13 atan2_8::x#7 atan2_8::x#12
Alias atan2_8::y#10 = atan2_8::y#14 atan2_8::y#7 atan2_8::y#11
Alias atan2_8::xd#0 = atan2_8::$19 atan2_8::xd#1 atan2_8::xd#2
Alias atan2_8::yd#0 = atan2_8::$20 atan2_8::yd#1 atan2_8::yd#2
Alias atan2_8::angle#1 = atan2_8::$10 atan2_8::angle#9
Alias atan2_8::yd#0 = atan2_8::yd#1 atan2_8::yd#2
Alias atan2_8::xd#0 = atan2_8::xd#1 atan2_8::xd#2
Alias atan2_8::y#5 = atan2_8::y#6
Alias atan2_8::angle#4 = atan2_8::$13
Alias atan2_8::return#0 = atan2_8::angle#10 atan2_8::return#3 atan2_8::return#1
@ -672,7 +669,6 @@ Alias atan2_8::return#2 = atan2_8::return#4
Alias main::screen#2 = main::screen#3
Alias main::x#2 = main::x#3
Alias main::y#2 = main::y#5 main::y#3
Alias main::angle#0 = main::$2
Alias main::screen#1 = main::screen#5
Successful SSA optimization Pass2AliasElimination
Alias atan2_8::x#1 = atan2_8::x#5 atan2_8::x#10
@ -2205,7 +2201,7 @@ main: {
// [5] phi main::x#2 = main::x#1 [phi:main::@6->main::@2#1] -- register_copy
// main::@2
__b2:
// atan2_8(x, y)
// byte angle = atan2_8(x, y)
// [6] atan2_8::x#0 = main::x#2
// [7] atan2_8::y#0 = main::y#4
// [8] call atan2_8
@ -2213,7 +2209,6 @@ main: {
// [9] atan2_8::return#2 = atan2_8::return#0 -- vbuaa=vbuxx
txa
// main::@6
// byte angle = atan2_8(x, y)
// [10] main::angle#0 = atan2_8::return#2
// *screen++ = angle
// [11] *main::screen#2 = main::angle#0 -- _deref_pbuz1=vbuaa

View File

@ -1,4 +1,6 @@
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement main::$2
CONTROL FLOW GRAPH SSA
@ -20,8 +22,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -56,8 +57,7 @@ main: scope:[main] from __start::@1
to:main::@4
main::@4: scope:[main] from main
main::$1 = SCREEN + $28
main::$2 = main::$1 + 1
main::screen#0 = main::$2
main::screen#0 = main::$1 + 1
main::ch#0 = 0
main::x#0 = 0
to:main::@1
@ -111,7 +111,6 @@ constant byte* SCREEN = (byte*)$400
void __start()
void main()
byte*~ main::$1
byte*~ main::$2
bool~ main::$3
bool~ main::$4
byte main::ch
@ -140,7 +139,6 @@ byte main::y#2
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -178,7 +176,7 @@ void* memset::str#5
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#1 > 0
Adding number conversion cast (unumber) $3e8 in memset::num#0 = $3e8
Adding number conversion cast (unumber) $28 in main::$1 = SCREEN + $28
Adding number conversion cast (unumber) 1 in main::$2 = main::$1 + 1
Adding number conversion cast (unumber) 1 in main::screen#0 = main::$1 + 1
Adding number conversion cast (unumber) $28-$10 in main::screen#2 = main::screen#4 + $28-$10
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast memset::dst#0 = (byte*)memset::str#2
@ -201,12 +199,10 @@ Alias memset::return#0 = memset::str#1 memset::return#3 memset::return#1
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
Alias memset::str#4 = memset::str#5
Alias main::screen#0 = main::$2
Alias main::screen#1 = main::screen#4
Alias main::x#2 = main::x#3
Alias main::ch#1 = main::ch#4

View File

@ -34,6 +34,7 @@ main: {
// (SCREEN+40*3)[i] = i/8
sta SCREEN+$28*3,x
// signed byte sb = -(signed byte)i
// And a single signed byte
txa
eor #$ff
clc

View File

@ -1,3 +1,4 @@
Eliminating unused variable with no statement main::$4
CONTROL FLOW GRAPH SSA
@ -15,8 +16,7 @@ main::@1: scope:[main] from main main::@1
(main::SCREEN+$28*2)[main::i#2] = main::$2
main::$3 = main::i#2 / 8
(main::SCREEN+$28*3)[main::i#2] = main::$3
main::$4 = - (signed byte)main::i#2
main::sb#0 = main::$4
main::sb#0 = - (signed byte)main::i#2
main::$5 = main::sb#0 / 2
(main::SCREEN+$28*5)[main::i#2] = (byte)main::$5
main::i#1 = main::i#2 + rangenext(0,$a)
@ -44,7 +44,6 @@ number~ main::$0
number~ main::$1
number~ main::$2
number~ main::$3
signed byte~ main::$4
number~ main::$5
bool~ main::$6
constant byte* const main::SCREEN = (byte*)$400
@ -89,8 +88,6 @@ Inferred type updated to byte in main::$1 = main::i#2 / 2
Inferred type updated to byte in main::$2 = main::i#2 / 4
Inferred type updated to byte in main::$3 = main::i#2 / 8
Inferred type updated to signed byte in main::$5 = main::sb#0 / 2
Alias main::sb#0 = main::$4
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$6 [15] if(main::i#1!=rangelast(0,$a)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::i#0 = 0
@ -287,6 +284,7 @@ main: {
// [8] (main::SCREEN+$28*3)[main::i#2] = main::$3 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$28*3,x
// [9] main::sb#0 = - (signed byte)main::i#2 -- vbsaa=_neg_vbsxx
// And a single signed byte
txa
eor #$ff
clc
@ -399,6 +397,7 @@ main: {
sta SCREEN+$28*3,x
// signed byte sb = -(signed byte)i
// [9] main::sb#0 = - (signed byte)main::i#2 -- vbsaa=_neg_vbsxx
// And a single signed byte
txa
eor #$ff
clc

View File

@ -1,3 +1,4 @@
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
@ -7,8 +8,7 @@ main: scope:[main] from __start
to:main::@1
main::@1: scope:[main] from main main::@1
main::i#2 = phi( main/main::i#0, main::@1/main::i#1 )
main::$0 = main::a + main::i#2
main::b#0 = main::$0
main::b#0 = main::a + main::i#2
main::c#0 = (byte)main::b#0
main::SCREEN[main::i#2] = main::c#0
main::i#1 = main::i#2 + rangenext(0,$64)
@ -32,7 +32,6 @@ __start::@return: scope:[__start] from __start::@1
SYMBOL TABLE SSA
void __start()
void main()
dword~ main::$0
bool~ main::$1
constant byte* const main::SCREEN = (byte*)$400
constant dword main::a = $ee6b2800
@ -47,8 +46,6 @@ byte main::i#2
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Alias main::b#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$1 [7] if(main::i#1!=rangelast(0,$64)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::i#0 = 0

View File

@ -1,4 +1,5 @@
Inlined call call __init
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -106,8 +107,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -390,7 +390,6 @@ void main()
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -668,7 +667,6 @@ Alias memset::return#1 = memset::str#1 memset::return#3 memset::return#2
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2

View File

@ -8,6 +8,8 @@ Setting inferred volatile on symbol affected by address-of: yr in asm { ldazr st
Setting inferred volatile on symbol affected by address-of: xr in asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement mulf_init::$0
CONTROL FLOW GRAPH SSA
@ -191,8 +193,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -410,8 +411,7 @@ mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@1
mulf_init::add#2 = phi( mulf_init/mulf_init::add#0, mulf_init::@1/mulf_init::add#1 )
mulf_init::i#2 = phi( mulf_init/mulf_init::i#0, mulf_init::@1/mulf_init::i#1 )
mulf_init::sqr#2 = phi( mulf_init/mulf_init::sqr#0, mulf_init::@1/mulf_init::sqr#1 )
mulf_init::$0 = byte1 mulf_init::sqr#2
mulf_init::val#0 = mulf_init::$0
mulf_init::val#0 = byte1 mulf_init::sqr#2
mulf_sqr1[mulf_init::i#2] = mulf_init::val#0
(mulf_sqr1+$100)[mulf_init::i#2] = mulf_init::val#0
mulf_init::$1 = - mulf_init::i#2
@ -531,7 +531,6 @@ void main()
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -566,7 +565,6 @@ void* memset::str#3
void* memset::str#4
void* memset::str#5
void mulf_init()
byte~ mulf_init::$0
byte~ mulf_init::$1
byte~ mulf_init::$2
number~ mulf_init::$3
@ -886,7 +884,6 @@ Alias memset::return#1 = memset::str#1 memset::return#3 memset::return#2
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -915,7 +912,6 @@ Alias print_char_cursor#27 = print_char_cursor#60
Alias print_char_cursor#28 = print_char_cursor#61
Alias print_line_cursor#19 = print_line_cursor#7 print_line_cursor#20 print_line_cursor#8
Alias print_char_cursor#29 = print_char_cursor#62 print_char_cursor#63 print_char_cursor#30
Alias mulf_init::val#0 = mulf_init::$0
Alias print_screen#0 = print_line_cursor#9 print_char_cursor#31 print_line_cursor#26 print_char_cursor#76 print_screen#8 print_screen#6 print_screen#4 print_screen#1
Alias print_line_cursor#10 = print_line_cursor#21 print_line_cursor#22 print_line_cursor#11
Alias print_char_cursor#32 = print_char_cursor#64 print_char_cursor#65 print_char_cursor#33
@ -971,8 +967,8 @@ Identical Phi Values print_char_cursor#69 print_char_cursor#1
Identical Phi Values print_char_cursor#71 print_char_cursor#11
Identical Phi Values memset::return#1 memset::str#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [196] mulf_init::$2 = - mulf_init::i#2
Identified duplicate assignment right side [204] mulf_init::$6 = 1 - mulf_init::i#2
Identified duplicate assignment right side [194] mulf_init::$2 = - mulf_init::i#2
Identified duplicate assignment right side [202] mulf_init::$6 = 1 - mulf_init::i#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition print_str::$1 [3] if(0!=*print_str::str#7) goto print_str::@2
Simple Condition print_ln::$1 [13] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@1

View File

@ -274,7 +274,7 @@ bitmap_line: {
.label y1 = 6
.label x2 = $f
.label y2 = $11
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z x2
sec
sbc.z x1
@ -283,13 +283,12 @@ bitmap_line: {
sbc.z x1+1
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
lda.z y2
sec
sbc.z y1
@ -298,7 +297,6 @@ bitmap_line: {
sbc.z y1+1
sta.z abs_u16.w+1
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// if(dx==0 && dy==0)
lda.z dx
@ -310,7 +308,7 @@ bitmap_line: {
jmp __b4
!__b4:
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z x2
sec
sbc.z x1
@ -319,13 +317,12 @@ bitmap_line: {
sbc.z x1+1
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
lda.z y2
sec
sbc.z y1
@ -334,7 +331,6 @@ bitmap_line: {
sbc.z y1+1
sta.z sgn_u16.w+1
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// if(dx > dy)
lda.z dy+1
@ -346,6 +342,7 @@ bitmap_line: {
bcc __b2
!:
// unsigned int e = dx/2
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -412,6 +409,7 @@ bitmap_line: {
rts
__b2:
// unsigned int e = dy/2
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -1,5 +1,13 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement bitmap_clear::$1
Eliminating unused variable with no statement bitmap_line::$1
Eliminating unused variable with no statement bitmap_line::$3
Eliminating unused variable with no statement bitmap_line::$9
Eliminating unused variable with no statement bitmap_line::$11
Eliminating unused variable with no statement bitmap_line::$15
Eliminating unused variable with no statement bitmap_line::$20
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -96,8 +104,7 @@ bitmap_clear: scope:[bitmap_clear] from main::@2
bitmap_clear::bgcol#1 = phi( main::@2/bitmap_clear::bgcol#0 )
bitmap_clear::fgcol#1 = phi( main::@2/bitmap_clear::fgcol#0 )
bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
bitmap_clear::col#0 = bitmap_clear::$1
bitmap_clear::col#0 = bitmap_clear::$0 + bitmap_clear::bgcol#1
memset::str#0 = (void*)bitmap_screen#8
memset::c#0 = bitmap_clear::col#0
memset::num#0 = $3e8
@ -154,8 +161,7 @@ bitmap_line::@12: scope:[bitmap_line] from bitmap_line
bitmap_line::y1#2 = phi( bitmap_line/bitmap_line::y1#1 )
bitmap_line::y2#1 = phi( bitmap_line/bitmap_line::y2#4 )
abs_u16::return#5 = phi( bitmap_line/abs_u16::return#0 )
bitmap_line::$1 = abs_u16::return#5
bitmap_line::dx#0 = bitmap_line::$1
bitmap_line::dx#0 = abs_u16::return#5
bitmap_line::$2 = bitmap_line::y2#1 - bitmap_line::y1#2
abs_u16::w#1 = bitmap_line::$2
call abs_u16
@ -170,8 +176,7 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@12
bitmap_line::x2#4 = phi( bitmap_line::@12/bitmap_line::x2#7 )
bitmap_line::dx#1 = phi( bitmap_line::@12/bitmap_line::dx#0 )
abs_u16::return#6 = phi( bitmap_line::@12/abs_u16::return#1 )
bitmap_line::$3 = abs_u16::return#6
bitmap_line::dy#0 = bitmap_line::$3
bitmap_line::dy#0 = abs_u16::return#6
bitmap_line::$4 = bitmap_line::dx#1 == 0
bitmap_line::$5 = bitmap_line::dy#0 == 0
bitmap_line::$6 = bitmap_line::$4 && bitmap_line::$5
@ -201,8 +206,7 @@ bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@1
bitmap_line::y1#3 = phi( bitmap_line::@1/bitmap_line::y1#4 )
bitmap_line::y2#2 = phi( bitmap_line::@1/bitmap_line::y2#5 )
sgn_u16::return#5 = phi( bitmap_line::@1/sgn_u16::return#0 )
bitmap_line::$9 = sgn_u16::return#5
bitmap_line::sx#0 = bitmap_line::$9
bitmap_line::sx#0 = sgn_u16::return#5
bitmap_line::$10 = bitmap_line::y2#2 - bitmap_line::y1#3
sgn_u16::w#1 = bitmap_line::$10
call sgn_u16
@ -217,8 +221,7 @@ bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@14
bitmap_line::dy#1 = phi( bitmap_line::@14/bitmap_line::dy#6 )
bitmap_line::dx#2 = phi( bitmap_line::@14/bitmap_line::dx#7 )
sgn_u16::return#6 = phi( bitmap_line::@14/sgn_u16::return#1 )
bitmap_line::$11 = sgn_u16::return#6
bitmap_line::sy#0 = bitmap_line::$11
bitmap_line::sy#0 = sgn_u16::return#6
bitmap_line::$12 = bitmap_line::dx#2 > bitmap_line::dy#1
if(bitmap_line::$12) goto bitmap_line::@2
to:bitmap_line::@5
@ -242,8 +245,7 @@ bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#14 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#14 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dy#2 = phi( bitmap_line::@15/bitmap_line::dy#1 )
bitmap_line::$20 = bitmap_line::dy#2 / 2
bitmap_line::e1#0 = bitmap_line::$20
bitmap_line::e1#0 = bitmap_line::dy#2 / 2
to:bitmap_line::@9
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::sx#9 = phi( bitmap_line::@15/bitmap_line::sx#8 )
@ -253,8 +255,7 @@ bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
bitmap_line::y#11 = phi( bitmap_line::@15/bitmap_line::y#17 )
bitmap_line::x#11 = phi( bitmap_line::@15/bitmap_line::x#17 )
bitmap_line::dx#3 = phi( bitmap_line::@15/bitmap_line::dx#2 )
bitmap_line::$15 = bitmap_line::dx#3 / 2
bitmap_line::e#0 = bitmap_line::$15
bitmap_line::e#0 = bitmap_line::dx#3 / 2
to:bitmap_line::@6
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@7
bitmap_line::sx#5 = phi( bitmap_line::@5/bitmap_line::sx#9, bitmap_line::@7/bitmap_line::sx#10 )
@ -388,8 +389,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -613,7 +613,6 @@ word abs_u16::w#3
word abs_u16::w#4
void bitmap_clear(byte bitmap_clear::bgcol , byte bitmap_clear::fgcol)
number~ bitmap_clear::$0
number~ bitmap_clear::$1
byte bitmap_clear::bgcol
byte bitmap_clear::bgcol#0
byte bitmap_clear::bgcol#1
@ -699,26 +698,20 @@ byte* bitmap_init::yoffs#3
byte* bitmap_init::yoffs#4
void bitmap_line(word bitmap_line::x1 , word bitmap_line::y1 , word bitmap_line::x2 , word bitmap_line::y2)
word~ bitmap_line::$0
word~ bitmap_line::$1
word~ bitmap_line::$10
word~ bitmap_line::$11
bool~ bitmap_line::$12
number~ bitmap_line::$15
bool~ bitmap_line::$17
bool~ bitmap_line::$18
bool~ bitmap_line::$19
word~ bitmap_line::$2
number~ bitmap_line::$20
bool~ bitmap_line::$22
bool~ bitmap_line::$23
bool~ bitmap_line::$24
word~ bitmap_line::$3
bool~ bitmap_line::$4
bool~ bitmap_line::$5
bool~ bitmap_line::$6
bool~ bitmap_line::$7
word~ bitmap_line::$8
word~ bitmap_line::$9
word bitmap_line::dx
word bitmap_line::dx#0
word bitmap_line::dx#1
@ -944,7 +937,6 @@ void main()
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -1014,16 +1006,13 @@ Adding number conversion cast (unumber) 7 in bitmap_init::$8 = bitmap_init::$7 =
Adding number conversion cast (unumber) $28*8 in bitmap_init::$10 = bitmap_init::yoffs#3 + $28*8
Adding number conversion cast (unumber) $10 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Adding number conversion cast (unumber) bitmap_clear::$0 in bitmap_clear::$0 = bitmap_clear::fgcol#1 * (unumber)$10
Adding number conversion cast (unumber) bitmap_clear::$1 in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Adding number conversion cast (unumber) 0 in memset::c#1 = 0
Adding number conversion cast (unumber) $fff8 in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in bitmap_plot::$1 = bitmap_plot::x#4 & (unumber)$fff8
Adding number conversion cast (unumber) 0 in bitmap_line::$4 = bitmap_line::dx#1 == 0
Adding number conversion cast (unumber) 0 in bitmap_line::$5 = bitmap_line::dy#0 == 0
Adding number conversion cast (unumber) 2 in bitmap_line::$20 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) bitmap_line::$20 in bitmap_line::$20 = bitmap_line::dy#2 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::$15 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) bitmap_line::$15 in bitmap_line::$15 = bitmap_line::dx#3 / (unumber)2
Adding number conversion cast (unumber) 2 in bitmap_line::e1#0 = bitmap_line::dy#2 / 2
Adding number conversion cast (unumber) 2 in bitmap_line::e#0 = bitmap_line::dx#3 / 2
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#2 > 0
Adding number conversion cast (unumber) $80 in abs_u16::$1 = abs_u16::$0 & $80
Adding number conversion cast (unumber) abs_u16::$1 in abs_u16::$1 = abs_u16::$0 & (unumber)$80
@ -1137,19 +1126,16 @@ Inferred type updated to byte in bitmap_init::$3 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_init::$5 = bitmap_init::$3 | bitmap_init::$4
Inferred type updated to byte in bitmap_init::$7 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_clear::$0 = bitmap_clear::fgcol#1 * $10
Inferred type updated to byte in bitmap_clear::$1 = bitmap_clear::$0 + bitmap_clear::bgcol#1
Inferred type updated to word in bitmap_plot::$1 = bitmap_plot::x#4 & $fff8
Inferred type updated to word in bitmap_line::$20 = bitmap_line::dy#2 / 2
Inferred type updated to word in bitmap_line::$15 = bitmap_line::dx#3 / 2
Inferred type updated to byte in abs_u16::$1 = abs_u16::$0 & $80
Inferred type updated to byte in sgn_u16::$1 = sgn_u16::$0 & $80
Inferred type updated to byte in lines::$1 = lines::l#3 + 1
Inferred type updated to byte in lines::$2 = lines::l#3 + 1
Inversing boolean not [9] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [8] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [29] bitmap_init::$9 = bitmap_init::$7 != 7 from [28] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [124] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [123] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [144] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [143] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [154] memset::$1 = memset::num#2 <= 0 from [153] memset::$0 = memset::num#2 > 0
Inversing boolean not [117] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [116] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [137] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [136] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [147] memset::$1 = memset::num#2 <= 0 from [146] memset::$0 = memset::num#2 > 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias bitmap_init::x#2 = bitmap_init::x#4
Alias bitmap_init::gfx#4 = bitmap_init::gfx#5
@ -1165,7 +1151,6 @@ Alias bitmap_screen#17 = bitmap_screen#18
Alias bitmap_init::yoffs#1 = bitmap_init::$10
Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
@ -1173,18 +1158,16 @@ Alias abs_u16::w#0 = bitmap_line::$0
Alias abs_u16::return#0 = abs_u16::return#5
Alias bitmap_line::y2#1 = bitmap_line::y2#4 bitmap_line::y2#8 bitmap_line::y2#5 bitmap_line::y2#2 bitmap_line::y2#11 bitmap_line::y2#10
Alias bitmap_line::x2#1 = bitmap_line::x2#7 bitmap_line::x2#4 bitmap_line::x2#2 bitmap_line::x2#11 bitmap_line::x2#10 bitmap_line::x2#9
Alias bitmap_line::dx#0 = bitmap_line::$1 bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias abs_u16::w#1 = bitmap_line::$2
Alias abs_u16::return#1 = abs_u16::return#6
Alias bitmap_line::dy#0 = bitmap_line::$3 bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias bitmap_line::dx#0 = bitmap_line::dx#1 bitmap_line::dx#10 bitmap_line::dx#7 bitmap_line::dx#2 bitmap_line::dx#13 bitmap_line::dx#3
Alias bitmap_line::dy#0 = bitmap_line::dy#9 bitmap_line::dy#6 bitmap_line::dy#1 bitmap_line::dy#2 bitmap_line::dy#10
Alias sgn_u16::w#0 = bitmap_line::$8
Alias sgn_u16::return#0 = sgn_u16::return#5
Alias bitmap_line::sx#0 = bitmap_line::$9 bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias sgn_u16::w#1 = bitmap_line::$10
Alias sgn_u16::return#1 = sgn_u16::return#6
Alias bitmap_line::sy#0 = bitmap_line::$11 bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::e1#0 = bitmap_line::$20
Alias bitmap_line::e#0 = bitmap_line::$15
Alias bitmap_line::sx#0 = bitmap_line::sx#8 bitmap_line::sx#7 bitmap_line::sx#9
Alias bitmap_line::sy#0 = bitmap_line::sy#10 bitmap_line::sy#5
Alias bitmap_line::y#4 = bitmap_line::y#5
Alias bitmap_line::sy#1 = bitmap_line::sy#3 bitmap_line::sy#8
Alias bitmap_line::e#3 = bitmap_line::e#5
@ -1209,7 +1192,6 @@ Alias memset::return#2 = memset::str#2 memset::return#4 memset::return#3
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -2870,6 +2852,7 @@ bitmap_line: {
// bitmap_line::@5
__b5:
// [82] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -2981,6 +2964,7 @@ bitmap_line: {
// bitmap_line::@2
__b2:
// [99] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1
@ -3946,7 +3930,7 @@ bitmap_line: {
.label y1 = 6
.label x2 = $f
.label y2 = $11
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [63] abs_u16::w#0 = bitmap_line::x2#0 - bitmap_line::x1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z x2
sec
@ -3959,16 +3943,15 @@ bitmap_line: {
// [114] phi from bitmap_line to abs_u16 [phi:bitmap_line->abs_u16]
// [114] phi abs_u16::w#2 = abs_u16::w#0 [phi:bitmap_line->abs_u16#0] -- register_copy
jsr abs_u16
// abs_u16(x2-x1)
// unsigned int dx = abs_u16(x2-x1)
// [65] abs_u16::return#0 = abs_u16::return#4
// bitmap_line::@12
// unsigned int dx = abs_u16(x2-x1)
// [66] bitmap_line::dx#0 = abs_u16::return#0 -- vwuz1=vwuz2
lda.z abs_u16.return
sta.z dx
lda.z abs_u16.return+1
sta.z dx+1
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [67] abs_u16::w#1 = bitmap_line::y2#0 - bitmap_line::y1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z y2
sec
@ -3981,10 +3964,9 @@ bitmap_line: {
// [114] phi from bitmap_line::@12 to abs_u16 [phi:bitmap_line::@12->abs_u16]
// [114] phi abs_u16::w#2 = abs_u16::w#1 [phi:bitmap_line::@12->abs_u16#0] -- register_copy
jsr abs_u16
// abs_u16(y2-y1)
// unsigned int dy = abs_u16(y2-y1)
// [69] abs_u16::return#1 = abs_u16::return#4
// bitmap_line::@13
// unsigned int dy = abs_u16(y2-y1)
// [70] bitmap_line::dy#0 = abs_u16::return#1
// if(dx==0 && dy==0)
// [71] if(bitmap_line::dx#0!=0) goto bitmap_line::@1 -- vwuz1_neq_0_then_la1
@ -4000,7 +3982,7 @@ bitmap_line: {
!__b4:
// bitmap_line::@1
__b1:
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [73] sgn_u16::w#0 = bitmap_line::x2#0 - bitmap_line::x1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z x2
sec
@ -4013,16 +3995,15 @@ bitmap_line: {
// [121] phi from bitmap_line::@1 to sgn_u16 [phi:bitmap_line::@1->sgn_u16]
// [121] phi sgn_u16::w#2 = sgn_u16::w#0 [phi:bitmap_line::@1->sgn_u16#0] -- register_copy
jsr sgn_u16
// sgn_u16(x2-x1)
// unsigned int sx = sgn_u16(x2-x1)
// [75] sgn_u16::return#0 = sgn_u16::return#4
// bitmap_line::@14
// unsigned int sx = sgn_u16(x2-x1)
// [76] bitmap_line::sx#0 = sgn_u16::return#0 -- vwuz1=vwuz2
lda.z sgn_u16.return
sta.z sx
lda.z sgn_u16.return+1
sta.z sx+1
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [77] sgn_u16::w#1 = bitmap_line::y2#0 - bitmap_line::y1#0 -- vwuz1=vwuz2_minus_vwuz3
lda.z y2
sec
@ -4035,10 +4016,9 @@ bitmap_line: {
// [121] phi from bitmap_line::@14 to sgn_u16 [phi:bitmap_line::@14->sgn_u16]
// [121] phi sgn_u16::w#2 = sgn_u16::w#1 [phi:bitmap_line::@14->sgn_u16#0] -- register_copy
jsr sgn_u16
// sgn_u16(y2-y1)
// unsigned int sy = sgn_u16(y2-y1)
// [79] sgn_u16::return#1 = sgn_u16::return#4
// bitmap_line::@15
// unsigned int sy = sgn_u16(y2-y1)
// [80] bitmap_line::sy#0 = sgn_u16::return#1
// if(dx > dy)
// [81] if(bitmap_line::dx#0>bitmap_line::dy#0) goto bitmap_line::@2 -- vwuz1_gt_vwuz2_then_la1
@ -4053,6 +4033,7 @@ bitmap_line: {
// bitmap_line::@5
// unsigned int e = dx/2
// [82] bitmap_line::e#0 = bitmap_line::dx#0 >> 1 -- vwuz1=vwuz2_ror_1
// Y is the driver
lda.z dx+1
lsr
sta.z e+1
@ -4156,6 +4137,7 @@ bitmap_line: {
__b2:
// unsigned int e = dy/2
// [99] bitmap_line::e1#0 = bitmap_line::dy#0 >> 1 -- vwuz1=vwuz2_ror_1
// X is the driver
lda.z dy+1
lsr
sta.z e1+1

View File

@ -93,7 +93,7 @@ main: {
bcc !+
inc.z at_2+1
!:
// fmul8(vals[i], vals[j])
// signed char r = fmul8(vals[i], vals[j])
ldy.z i
lda vals,y
sta.z fmul8.aa
@ -101,7 +101,6 @@ main: {
lda vals,y
sta.z fmul8.bb
jsr fmul8
// signed char r = fmul8(vals[i], vals[j])
// print_schar_at(r, at)
sta.z print_schar_at.b
lda.z at_2

View File

@ -4,6 +4,9 @@ Setting inferred volatile on symbol affected by address-of: fmul8::aa in asm { l
Setting inferred volatile on symbol affected by address-of: fmul8::bb in asm { ldaaa staA1+1 eor#$ff staA2+1 ldxbb sec A1: ldamulf_sqr1,x A2: sbcmulf_sqr2,x stacc }
Setting inferred volatile on symbol affected by address-of: fmul8::cc in asm { ldaaa staA1+1 eor#$ff staA2+1 ldxbb sec A1: ldamulf_sqr1,x A2: sbcmulf_sqr2,x stacc }
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement main::$1
Eliminating unused variable with no statement main::$5
CONTROL FLOW GRAPH SSA
@ -119,8 +122,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -152,8 +154,7 @@ main: scope:[main] from __start::@1
to:main::@6
main::@6: scope:[main] from main
main::at_line#0 = (byte*)$400
main::$1 = main::at_line#0 + 4
main::at#0 = main::$1
main::at#0 = main::at_line#0 + 4
main::k#0 = 0
to:main::@1
main::@1: scope:[main] from main::@6 main::@7
@ -209,8 +210,7 @@ main::@9: scope:[main] from main::@4
main::j#4 = phi( main::@4/main::j#2 )
main::at#7 = phi( main::@4/main::at#3 )
fmul8::return#3 = phi( main::@4/fmul8::return#0 )
main::$5 = fmul8::return#3
main::r#0 = main::$5
main::r#0 = fmul8::return#3
print_schar_at::b#3 = main::r#0
print_schar_at::at#2 = main::at#7
call print_schar_at
@ -338,9 +338,7 @@ byte init_screen::m#0
byte init_screen::m#1
byte init_screen::m#2
void main()
byte*~ main::$1
bool~ main::$3
signed byte~ main::$5
bool~ main::$7
bool~ main::$8
byte* main::at
@ -391,7 +389,6 @@ signed byte main::r#0
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -508,7 +505,7 @@ Adding number conversion cast (unumber) print_uchar_at::$2 in print_uchar_at::$2
Adding number conversion cast (unumber) 1 in print_uchar_at::$3 = print_uchar_at::at#2 + 1
Adding number conversion cast (unumber) $3e8 in memset::num#0 = $3e8
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#1 > 0
Adding number conversion cast (unumber) 4 in main::$1 = main::at_line#0 + 4
Adding number conversion cast (unumber) 4 in main::at#0 = main::at_line#0 + 4
Adding number conversion cast (unumber) 4 in main::at#1 = main::at#5 + 4
Adding number conversion cast (unumber) $28 in main::at_line#1 = main::at_line#2 + $28
Adding number conversion cast (unumber) 4 in main::at#3 = main::at#6 + 4
@ -573,12 +570,10 @@ Alias memset::return#1 = memset::str#1 memset::return#3 memset::return#2
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
Alias memset::str#4 = memset::str#5
Alias main::at#0 = main::$1
Alias main::at#4 = main::at#5
Alias main::k#2 = main::k#3
Alias main::at_line#3 = main::at_line#5 main::at_line#7
@ -589,7 +584,6 @@ Alias main::at#3 = main::at#7 main::at#8
Alias main::j#2 = main::j#4 main::j#3
Alias main::i#3 = main::i#7 main::i#5 main::i#4
Alias main::at_line#4 = main::at_line#8 main::at_line#9 main::at_line#6
Alias main::r#0 = main::$5
Alias init_screen::COLS#2 = init_screen::COLS#4
Alias print_screen#0 = print_screen#7 print_screen#5 print_screen#3 print_screen#1
Successful SSA optimization Pass2AliasElimination
@ -2182,7 +2176,7 @@ main: {
bcc !+
inc.z at_2+1
!:
// fmul8(vals[i], vals[j])
// signed char r = fmul8(vals[i], vals[j])
// [17] fmul8::aa = vals[main::i#2] -- vbsz1=pbsc1_derefidx_vbuz2
ldy.z i
lda vals,y
@ -2195,7 +2189,6 @@ main: {
jsr fmul8
// [20] fmul8::return#0 = fmul8::return#2
// main::@7
// signed char r = fmul8(vals[i], vals[j])
// [21] main::r#0 = fmul8::return#0
// print_schar_at(r, at)
// [22] print_schar_at::b#3 = main::r#0 -- vbsz1=vbsaa

View File

@ -4,6 +4,8 @@ Inlined call main::$7 = call toD018 SCREEN1 CHARSET
Inlined call main::$9 = call toD018 SCREEN2 CHARSET
Inlined call fire::$12 = call sid_rnd
Inlined call call __init
Eliminating unused variable with no statement fire::$7
Eliminating unused variable with no statement makecharset::$2
CONTROL FLOW GRAPH SSA
@ -129,8 +131,7 @@ fire::@2: scope:[fire] from fire::@1
fire::$4 = fire::buffer#5[$28-1] + fire::buffer#5[$28-1]
fire::$5 = fire::$4 + fire::buffer#5[$28]
fire::$6 = fire::$5 + fire::buffer#5[$29]
fire::$7 = fire::$6 / 4
fire::c#0 = fire::$7
fire::c#0 = fire::$6 / 4
fire::$8 = fire::c#0 > 2
fire::$9 = ! fire::$8
if(fire::$9) goto fire::@4
@ -213,8 +214,7 @@ makecharset::@2: scope:[makecharset] from makecharset::@1
to:makecharset::@1
makecharset::@3: scope:[makecharset] from makecharset::@1
makecharset::charset#3 = phi( makecharset::@1/makecharset::charset#2 )
makecharset::$2 = makecharset::charset#3 + $40*8
makecharset::font1#0 = makecharset::$2
makecharset::font1#0 = makecharset::charset#3 + $40*8
to:makecharset::@4
makecharset::@4: scope:[makecharset] from makecharset::@3 makecharset::@5
makecharset::font1#2 = phi( makecharset::@3/makecharset::font1#0, makecharset::@5/makecharset::font1#1 )
@ -414,7 +414,6 @@ bool~ fire::$3
byte~ fire::$4
byte~ fire::$5
byte~ fire::$6
number~ fire::$7
bool~ fire::$8
bool~ fire::$9
byte* fire::buffer
@ -514,7 +513,6 @@ byte*~ makecharset::$14
word~ makecharset::$15
word~ makecharset::$16
word~ makecharset::$17
byte*~ makecharset::$2
byte*~ makecharset::$3
bool~ makecharset::$4
bool~ makecharset::$5
@ -629,8 +627,7 @@ Adding number conversion cast (unumber) $28-1 in fire::$4 = fire::buffer#5[$28-1
Adding number conversion cast (unumber) $28-1 in fire::$4 = fire::buffer#5[(unumber)$28-1] + fire::buffer#5[$28-1]
Adding number conversion cast (unumber) $28 in fire::$5 = fire::$4 + fire::buffer#5[$28]
Adding number conversion cast (unumber) $29 in fire::$6 = fire::$5 + fire::buffer#5[$29]
Adding number conversion cast (unumber) 4 in fire::$7 = fire::$6 / 4
Adding number conversion cast (unumber) fire::$7 in fire::$7 = fire::$6 / (unumber)4
Adding number conversion cast (unumber) 4 in fire::c#0 = fire::$6 / 4
Adding number conversion cast (unumber) 2 in fire::$8 = fire::c#0 > 2
Adding number conversion cast (unumber) $18*$28 in fire::$0 = fire::screenbase#3 + $18*$28
Adding number conversion cast (unumber) $18*$28 in fire::$1 = BUFFER + $18*$28
@ -642,7 +639,7 @@ Adding number conversion cast (unumber) $30 in fire::$14 = $30 + fire::$13
Adding number conversion cast (unumber) fire::$14 in fire::$14 = (unumber)$30 + fire::$13
Adding number conversion cast (unumber) 1*8 in makecharset::$0 = makecharset::charset#2 + 1*8
Adding number conversion cast (unumber) 0 in *makecharset::font#3 = 0
Adding number conversion cast (unumber) $40*8 in makecharset::$2 = makecharset::charset#3 + $40*8
Adding number conversion cast (unumber) $40*8 in makecharset::font1#0 = makecharset::charset#3 + $40*8
Adding number conversion cast (unumber) $100*8 in makecharset::$3 = makecharset::charset#4 + $100*8
Adding number conversion cast (unumber) $ff in *makecharset::font1#3 = $ff
Adding number conversion cast (unumber) $40 in makecharset::$5 = makecharset::c#2 < $40
@ -744,15 +741,14 @@ Inferred type updated to word in main::toD0182_$1 = main::toD0182_$0 * 4
Inferred type updated to byte in main::toD0182_$4 = main::toD0182_$3 / 4
Inferred type updated to byte in main::toD0182_$5 = main::toD0182_$4 & $f
Inferred type updated to byte in main::toD0182_$6 = main::toD0182_$2 | main::toD0182_$5
Inferred type updated to byte in fire::$7 = fire::$6 / 4
Inferred type updated to byte in fire::$13 = fire::$12 / $10
Inferred type updated to byte in fire::$14 = $30 + fire::$13
Inferred type updated to byte in makecharset::$10 = makecharset::bc#4 - $40
Inferred type updated to byte in makecharset::$11 = makecharset::i#4 & 1
Inferred type updated to byte in makecharset::$12 = makecharset::ii#4 + makecharset::$11
Inferred type updated to byte in makecharset::$13 = makecharset::$12 & 7
Inversing boolean not [73] fire::$9 = fire::c#0 <= 2 from [72] fire::$8 = fire::c#0 > 2
Inversing boolean not [145] makecharset::$9 = makecharset::bc#1 <= $3f from [144] makecharset::$8 = makecharset::bc#1 > $3f
Inversing boolean not [72] fire::$9 = fire::c#0 <= 2 from [71] fire::$8 = fire::c#0 > 2
Inversing boolean not [143] makecharset::$9 = makecharset::bc#1 <= $3f from [142] makecharset::$8 = makecharset::bc#1 > $3f
Successful SSA optimization Pass2UnaryNotSimplification
Alias main::toD0181_screen#0 = main::toD0181_screen#1
Alias main::toD0181_gfx#0 = main::toD0181_gfx#1
@ -764,16 +760,15 @@ Alias fire::screen#0 = fire::screenbase#2
Alias fire::buffer#4 = fire::buffer#5 fire::buffer#9
Alias fire::screen#6 = fire::screen#9 fire::screen#7
Alias fire::screenbase#3 = fire::screenbase#6 fire::screenbase#4 fire::screenbase#7
Alias fire::c#0 = fire::$7 fire::c#3
Alias fire::screen#1 = fire::$0
Alias fire::buffer#1 = fire::$1
Alias fire::c#0 = fire::c#3
Alias fire::buffer#10 = fire::buffer#11 fire::buffer#7 fire::buffer#8
Alias fire::screen#10 = fire::screen#11 fire::screen#8 fire::screen#5
Alias fire::sid_rnd1_return#0 = fire::sid_rnd1_return#2 fire::sid_rnd1_return#1 fire::sid_rnd1_return#3 fire::$12
Alias makecharset::font#0 = makecharset::charset#1
Alias makecharset::font#2 = makecharset::font#3
Alias makecharset::charset#2 = makecharset::charset#6 makecharset::charset#3
Alias makecharset::font1#0 = makecharset::$2
Alias makecharset::font1#2 = makecharset::font1#3
Alias makecharset::charset#17 = makecharset::charset#7 makecharset::charset#4
Alias makecharset::c#2 = makecharset::c#8
@ -813,7 +808,7 @@ Identical Phi Values makecharset::charset#11 makecharset::charset#14
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values makecharset::charset#14 makecharset::charset#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [148] makecharset::$14 = makecharset::charset#0 + (byte)1*8
Identified duplicate assignment right side [146] makecharset::$14 = makecharset::charset#0 + (byte)1*8
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition fire::$3 [52] if(fire::buffer#4!=fire::$2) goto fire::@2
Simple Condition fire::$9 [58] if(fire::c#0<=2) goto fire::@4

View File

@ -40,7 +40,8 @@ main: {
sta PROCPORT
// asm
cli
// font_compress(FONT_ORIGINAL, FONT_COMPRESSED, FONT_COMPRESSED_MAP)
// char size = font_compress(FONT_ORIGINAL, FONT_COMPRESSED, FONT_COMPRESSED_MAP)
// Compress the font finding identical characters
jsr font_compress
// *D018 = toD018(SCREEN, FONT_COMPRESSED)
// Show compressed font
@ -260,11 +261,11 @@ font_compress: {
lda #>FONT_ORIGINAL
sta.z next_original+1
__b1:
// font_find(next_original, font_compressed, font_size)
jsr font_find
// font_find(next_original, font_compressed, font_size)
txa
// char found = font_find(next_original, font_compressed, font_size)
// Look for the char in font_compressed
jsr font_find
// char found = font_find(next_original, font_compressed, font_size)
txa
// if(found==0xff)
cmp #$ff
bne __b7

View File

@ -1,5 +1,10 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$2 = call toD018 SCREEN FONT_COMPRESSED
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement main::$1
Eliminating unused variable with no statement show::$3
Eliminating unused variable with no statement font_2x2::$0
Eliminating unused variable with no statement font_compress::$0
CONTROL FLOW GRAPH SSA
@ -21,8 +26,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -150,8 +154,7 @@ show: scope:[show] from main::@2
show::$0 = show::$7 * $50
show::$1 = SCREEN + show::$0
show::$2 = show::x#1 * 2
show::$3 = show::$1 + show::$2
show::ptr#0 = show::$3
show::ptr#0 = show::$1 + show::$2
show::ptr#0[0] = show::font_mapping#1[show::c#1]
show::$4 = show::c#1 + $40
show::ptr#0[1] = show::font_mapping#1[show::$4]
@ -177,8 +180,7 @@ font_2x2::@1: scope:[font_2x2] from font_2x2 font_2x2::@10
font_2x2::next_original#4 = phi( font_2x2/font_2x2::next_original#0, font_2x2::@10/font_2x2::next_original#1 )
font_2x2::next_2x2#2 = phi( font_2x2/font_2x2::next_2x2#0, font_2x2::@10/font_2x2::next_2x2#1 )
font_2x2::next_2x2_left#0 = font_2x2::next_2x2#2
font_2x2::$0 = font_2x2::next_2x2#2 + $40*8
font_2x2::next_2x2_right#0 = font_2x2::$0
font_2x2::next_2x2_right#0 = font_2x2::next_2x2#2 + $40*8
font_2x2::l2#0 = 0
font_2x2::l#0 = 0
to:font_2x2::@2
@ -351,8 +353,7 @@ font_compress::@7: scope:[font_compress] from font_compress::@1
font_compress::i#4 = phi( font_compress::@1/font_compress::i#5 )
font_compress::compress_mapping#3 = phi( font_compress::@1/font_compress::compress_mapping#4 )
font_find::return#4 = phi( font_compress::@1/font_find::return#0 )
font_compress::$0 = font_find::return#4
font_compress::found#0 = font_compress::$0
font_compress::found#0 = font_find::return#4
font_compress::$1 = font_compress::found#0 == $ff
font_compress::$2 = ! font_compress::$1
if(font_compress::$2) goto font_compress::@2
@ -519,7 +520,6 @@ constant const byte PROCPORT_RAM_CHARROM = 1
constant byte* const SCREEN = (byte*)$400
void __start()
void font_2x2(byte* font_2x2::font_original , byte* font_2x2::font_2x2)
byte*~ font_2x2::$0
number~ font_2x2::$1
byte~ font_2x2::$10
number~ font_2x2::$11
@ -655,7 +655,6 @@ byte* font_2x2::next_original#7
byte* font_2x2::next_original#8
byte* font_2x2::next_original#9
byte font_compress(byte* font_compress::font_original , byte* font_compress::font_compressed , byte* font_compress::compress_mapping)
byte~ font_compress::$0
bool~ font_compress::$1
bool~ font_compress::$2
bool~ font_compress::$3
@ -843,7 +842,6 @@ byte main::y#5
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -881,7 +879,6 @@ void show(byte show::c , byte show::x , byte show::y , byte* show::font_mapping)
number~ show::$0
byte*~ show::$1
number~ show::$2
byte*~ show::$3
number~ show::$4
number~ show::$5
number~ show::$6
@ -927,7 +924,7 @@ Adding number conversion cast (unumber) $28 in show::ptr#0[$28] = show::font_map
Adding number conversion cast (unumber) $c0 in show::$6 = show::c#1 + $c0
Adding number conversion cast (unumber) show::$6 in show::$6 = show::c#1 + (unumber)$c0
Adding number conversion cast (unumber) $29 in show::ptr#0[$29] = show::font_mapping#1[show::$6]
Adding number conversion cast (unumber) $40*8 in font_2x2::$0 = font_2x2::next_2x2#2 + $40*8
Adding number conversion cast (unumber) $40*8 in font_2x2::next_2x2_right#0 = font_2x2::next_2x2#2 + $40*8
Adding number conversion cast (unumber) $80 in font_2x2::$1 = font_2x2::glyph_bits#2 & $80
Adding number conversion cast (unumber) font_2x2::$1 in font_2x2::$1 = font_2x2::glyph_bits#2 & (unumber)$80
Adding number conversion cast (unumber) 0 in font_2x2::$22 = 0 != font_2x2::$1
@ -1051,16 +1048,15 @@ Inferred type updated to byte in font_2x2::$1 = font_2x2::glyph_bits#2 & $80
Inferred type updated to byte in font_2x2::$11 = font_2x2::l2#3 + 1
Inferred type updated to byte in font_2x2::$14 = font_2x2::l2#3 + 1
Inversing boolean not [2] memset::$1 = memset::num#1 <= 0 from [1] memset::$0 = memset::num#1 > 0
Inversing boolean not [138] font_2x2::$17 = font_2x2::l2#1 != 8 from [137] font_2x2::$16 = font_2x2::l2#1 == 8
Inversing boolean not [172] font_compress::$2 = font_compress::found#0 != $ff from [171] font_compress::$1 = font_compress::found#0 == $ff
Inversing boolean not [207] font_find::$2 = font_find::glyph#1[font_find::l#2] == font_find::font#2[font_find::l#2] from [206] font_find::$1 = font_find::glyph#1[font_find::l#2] != font_find::font#2[font_find::l#2]
Inversing boolean not [217] font_find::$4 = 0 == font_find::found#2 from [216] font_find::$5 = 0 != font_find::found#2
Inversing boolean not [135] font_2x2::$17 = font_2x2::l2#1 != 8 from [134] font_2x2::$16 = font_2x2::l2#1 == 8
Inversing boolean not [168] font_compress::$2 = font_compress::found#0 != $ff from [167] font_compress::$1 = font_compress::found#0 == $ff
Inversing boolean not [203] font_find::$2 = font_find::glyph#1[font_find::l#2] == font_find::font#2[font_find::l#2] from [202] font_find::$1 = font_find::glyph#1[font_find::l#2] != font_find::font#2[font_find::l#2]
Inversing boolean not [213] font_find::$4 = 0 == font_find::found#2 from [212] font_find::$5 = 0 != font_find::found#2
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#1 memset::return#3 memset::return#1
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -1072,11 +1068,9 @@ Alias main::c#2 = main::c#3
Alias main::x#2 = main::x#3
Alias main::y#2 = main::y#5 main::y#3
Alias main::c#1 = main::c#5
Alias show::ptr#0 = show::$3
Alias font_2x2::next_original#0 = font_2x2::font_original#1
Alias font_2x2::next_2x2#0 = font_2x2::font_2x2#1
Alias font_2x2::next_2x2_left#0 = font_2x2::next_2x2#2
Alias font_2x2::next_2x2_right#0 = font_2x2::$0
Alias font_2x2::glyph_bits_2x2#5 = font_2x2::glyph_bits_2x2#7 font_2x2::glyph_bits_2x2#6
Alias font_2x2::glyph_bits#2 = font_2x2::glyph_bits#4 font_2x2::glyph_bits#5
Alias font_2x2::b#3 = font_2x2::b#5 font_2x2::b#4
@ -1111,7 +1105,6 @@ Alias font_compress::next_original#2 = font_compress::next_original#6 font_compr
Alias font_compress::font_compressed#2 = font_compress::font_compressed#5 font_compress::font_compressed#7
Alias font_compress::font_size#2 = font_compress::font_size#7 font_compress::font_size#8
Alias font_compress::next_compressed#4 = font_compress::next_compressed#5 font_compress::next_compressed#6
Alias font_compress::found#0 = font_compress::$0
Alias font_compress::next_compressed#2 = font_compress::next_compressed#3
Alias font_compress::font_size#3 = font_compress::font_size#6 font_compress::found#1
Alias font_compress::compress_mapping#2 = font_compress::compress_mapping#5
@ -2366,6 +2359,7 @@ main: {
// asm { cli }
cli
// [5] call font_compress
// Compress the font finding identical characters
// [62] phi from main::@6 to font_compress [phi:main::@6->font_compress]
font_compress_from___b6:
jsr font_compress
@ -2735,6 +2729,7 @@ font_compress: {
// [64] font_find::glyph#0 = font_compress::next_original#2
// [65] font_find::font_size#0 = font_compress::font_size#2
// [66] call font_find
// Look for the char in font_compressed
// [106] phi from font_compress::@1 to font_find [phi:font_compress::@1->font_find]
font_find_from___b1:
jsr font_find
@ -3129,7 +3124,6 @@ Removing instruction __b3_from___b5:
Removing instruction __b4_from___b3:
Removing instruction __b5_from___b4:
Removing instruction __b8_from___b6:
Removing instruction font_find_from___b1:
Removing instruction __b3_from___b3:
Removing instruction __b2_from___b4:
Removing instruction __b2_from___b7:
@ -3153,6 +3147,7 @@ Removing instruction __b8_from___b7:
Removing instruction __b9:
Removing instruction __breturn:
Removing instruction __b1_from_font_compress:
Removing instruction font_find_from___b1:
Removing instruction __b5:
Removing instruction __b3_from___b5:
Removing instruction __b4:
@ -3187,7 +3182,7 @@ Removing instruction lda #8
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [193] bne __b1 to beq
Fixing long branch [194] bne __b1 to beq
FINAL SYMBOL TABLE
constant byte* const CHARGEN = (byte*) 53248
@ -3438,8 +3433,9 @@ main: {
// asm
// asm { cli }
cli
// font_compress(FONT_ORIGINAL, FONT_COMPRESSED, FONT_COMPRESSED_MAP)
// char size = font_compress(FONT_ORIGINAL, FONT_COMPRESSED, FONT_COMPRESSED_MAP)
// [5] call font_compress
// Compress the font finding identical characters
// [62] phi from main::@6 to font_compress [phi:main::@6->font_compress]
jsr font_compress
// [6] phi from main::@6 to main::toD0181 [phi:main::@6->main::toD0181]
@ -3784,17 +3780,17 @@ font_compress: {
sta.z next_original+1
// font_compress::@1
__b1:
// font_find(next_original, font_compressed, font_size)
// char found = font_find(next_original, font_compressed, font_size)
// [64] font_find::glyph#0 = font_compress::next_original#2
// [65] font_find::font_size#0 = font_compress::font_size#2
// [66] call font_find
// Look for the char in font_compressed
// [106] phi from font_compress::@1 to font_find [phi:font_compress::@1->font_find]
jsr font_find
// font_find(next_original, font_compressed, font_size)
// char found = font_find(next_original, font_compressed, font_size)
// [67] font_find::return#0 = font_find::return#3 -- vbuaa=vbuxx
txa
// font_compress::@5
// char found = font_find(next_original, font_compressed, font_size)
// [68] font_compress::found#0 = font_find::return#0
// if(found==0xff)
// [69] if(font_compress::found#0!=$ff) goto font_compress::@7 -- vbuaa_neq_vbuc1_then_la1

View File

@ -34,9 +34,9 @@
.segment Code
main: {
.const toSpritePtr1_return = LOAD_SPRITE/$40
// loadFileToMemory(8, "SPRITE", LOAD_SPRITE)
jsr loadFileToMemory
// char status = loadFileToMemory(8, "SPRITE", LOAD_SPRITE)
// Load sprite file into memory
jsr loadFileToMemory
tax
// if(status!=0xff)
cpx #$ff

View File

@ -8,6 +8,7 @@ Setting inferred volatile on symbol affected by address-of: load::verify in asm
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$3 = call toSpritePtr LOAD_SPRITE
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
@ -48,8 +49,7 @@ main: scope:[main] from __start
to:main::@4
main::@4: scope:[main] from main
loadFileToMemory::return#3 = phi( main/loadFileToMemory::return#0 )
main::$0 = loadFileToMemory::return#3
main::status#0 = main::$0
main::status#0 = loadFileToMemory::return#3
main::$1 = main::status#0 != $ff
main::$2 = ! main::$1
if(main::$2) goto main::@1
@ -225,7 +225,6 @@ byte loadFileToMemory::return#2
byte loadFileToMemory::return#3
byte loadFileToMemory::return#4
void main()
byte~ main::$0
bool~ main::$1
bool~ main::$2
byte~ main::$3
@ -327,15 +326,15 @@ Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in main::toSpritePtr1_$0 = main::toSpritePtr1_$1 / $40
Inversing boolean not [22] main::$2 = main::status#0 == $ff from [21] main::$1 = main::status#0 != $ff
Inversing boolean not [21] main::$2 = main::status#0 == $ff from [20] main::$1 = main::status#0 != $ff
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)load::return#1 = load::status load::return#4 load::return#2
Alias strlen::len#2 = strlen::len#4 strlen::len#3 strlen::return#0 strlen::return#3 strlen::return#1
Alias strlen::str#2 = strlen::str#3
Alias loadFileToMemory::return#0 = loadFileToMemory::return#3
Alias main::status#0 = main::$0 main::status#1
Alias main::toSpritePtr1_sprite#0 = main::toSpritePtr1_sprite#1
Alias main::toSpritePtr1_return#0 = main::toSpritePtr1_return#2 main::toSpritePtr1_return#1 main::toSpritePtr1_return#3 main::$3
Alias main::status#0 = main::status#1
Alias loadFileToMemory::device#1 = loadFileToMemory::device#2
Alias loadFileToMemory::address#1 = loadFileToMemory::address#2 loadFileToMemory::address#3
Alias load::return#0 = load::return#3
@ -765,6 +764,7 @@ ASSEMBLER BEFORE OPTIMIZATION
main: {
.const toSpritePtr1_return = LOAD_SPRITE/$40
// [1] call loadFileToMemory
// Load sprite file into memory
jsr loadFileToMemory
// [2] loadFileToMemory::return#0 = loadFileToMemory::return#1
jmp __b4
@ -1185,12 +1185,12 @@ Score: 720
// main
main: {
.const toSpritePtr1_return = LOAD_SPRITE/$40
// loadFileToMemory(8, "SPRITE", LOAD_SPRITE)
// char status = loadFileToMemory(8, "SPRITE", LOAD_SPRITE)
// [1] call loadFileToMemory
// Load sprite file into memory
jsr loadFileToMemory
// [2] loadFileToMemory::return#0 = loadFileToMemory::return#1
// main::@4
// char status = loadFileToMemory(8, "SPRITE", LOAD_SPRITE)
// [3] main::status#0 = loadFileToMemory::return#0 -- vbuxx=vbuaa
tax
// if(status!=0xff)

View File

@ -34,9 +34,9 @@
.segment Code
main: {
.const toSpritePtr1_return = $ff&SPRITE/$40
// krill_install()
jsr krill_install
// char status = krill_install()
// Install the Krill drive code
jsr krill_install
// if(status!=KRILL_OK)
cmp #KRILL_OK
beq __b1

View File

@ -1,6 +1,7 @@
Loading link script "krillload.ld"
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$6 = call toSpritePtr SPRITE
Eliminating unused variable with no statement main::$0
CONTROL FLOW GRAPH SSA
@ -35,8 +36,7 @@ main: scope:[main] from __start
to:main::@6
main::@6: scope:[main] from main
krill_install::return#4 = phi( main/krill_install::return#2 )
main::$0 = krill_install::return#4
main::status#0 = main::$0
main::status#0 = krill_install::return#4
main::$1 = main::status#0 != KRILL_OK
main::$2 = ! main::$1
if(main::$2) goto main::@1
@ -145,7 +145,6 @@ byte krill_loadraw::return#3
byte krill_loadraw::return#4
constant byte* const krill_loadraw::status = (byte*)$ff
void main()
byte~ main::$0
bool~ main::$1
bool~ main::$2
byte~ main::$3
@ -216,13 +215,12 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in main::toSpritePtr1_$0 = main::toSpritePtr1_$1 / $40
Inversing boolean not [18] main::$2 = main::status#0 == KRILL_OK from [17] main::$1 = main::status#0 != KRILL_OK
Inversing boolean not [27] main::$5 = main::status#1 == KRILL_OK from [26] main::$4 = main::status#1 != KRILL_OK
Inversing boolean not [17] main::$2 = main::status#0 == KRILL_OK from [16] main::$1 = main::status#0 != KRILL_OK
Inversing boolean not [26] main::$5 = main::status#1 == KRILL_OK from [25] main::$4 = main::status#1 != KRILL_OK
Successful SSA optimization Pass2UnaryNotSimplification
Alias krill_install::return#0 = krill_install::return#3 krill_install::return#1
Alias krill_loadraw::return#0 = krill_loadraw::return#3 krill_loadraw::return#1
Alias krill_install::return#2 = krill_install::return#4
Alias main::status#0 = main::$0
Alias krill_loadraw::return#2 = krill_loadraw::return#4
Alias main::status#1 = main::$3
Alias main::toSpritePtr1_sprite#0 = main::toSpritePtr1_sprite#1
@ -464,6 +462,7 @@ ASSEMBLER BEFORE OPTIMIZATION
main: {
.const toSpritePtr1_return = $ff&SPRITE/$40
// [1] call krill_install
// Install the Krill drive code
jsr krill_install
// [2] krill_install::return#2 = krill_install::return#0
jmp __b6
@ -743,12 +742,12 @@ Score: 130
// main
main: {
.const toSpritePtr1_return = $ff&SPRITE/$40
// krill_install()
// char status = krill_install()
// [1] call krill_install
// Install the Krill drive code
jsr krill_install
// [2] krill_install::return#2 = krill_install::return#0
// main::@6
// char status = krill_install()
// [3] main::status#0 = krill_install::return#2
// if(status!=KRILL_OK)
// [4] if(main::status#0==KRILL_OK) goto main::@1 -- vbuaa_eq_vbuc1_then_la1

View File

@ -2,8 +2,10 @@ Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call plexSetScreen plexInit::screen
Inlined call call plexFreePrepare
Inlined call call plexFreeAdd plexShowSprite::ypos
Inlined call loop::$7 = call plexFreeNextYpos
Inlined call loop::rasterY = call plexFreeNextYpos
Inlined call call __init
Eliminating unused variable with no statement plexShowSprite::$0
Eliminating unused variable with no statement loop::$7
CONTROL FLOW GRAPH SSA
@ -100,8 +102,7 @@ plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2
void plexShowSprite()
plexShowSprite: scope:[plexShowSprite] from loop::@10
plexShowSprite::$0 = plex_sprite_idx * 2
plexShowSprite::plex_sprite_idx2#0 = plexShowSprite::$0
plexShowSprite::plex_sprite_idx2#0 = plex_sprite_idx * 2
plexShowSprite::ypos#0 = PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]]
SPRITES_YPOS[plexShowSprite::plex_sprite_idx2#0] = plexShowSprite::ypos#0
plexShowSprite::plexFreeAdd1_ypos#0 = plexShowSprite::ypos#0
@ -269,8 +270,7 @@ loop::@12: scope:[loop] from loop::plexFreeNextYpos1_@return
loop::sin_idx#11 = phi( loop::plexFreeNextYpos1_@return/loop::sin_idx#12 )
loop::ss#5 = phi( loop::plexFreeNextYpos1_@return/loop::ss#6 )
loop::plexFreeNextYpos1_return#3 = phi( loop::plexFreeNextYpos1_@return/loop::plexFreeNextYpos1_return#1 )
loop::$7 = loop::plexFreeNextYpos1_return#3
loop::rasterY#0 = loop::$7
loop::rasterY#0 = loop::plexFreeNextYpos1_return#3
to:loop::@9
loop::@9: scope:[loop] from loop::@12 loop::@9
loop::sin_idx#10 = phi( loop::@12/loop::sin_idx#11, loop::@9/loop::sin_idx#10 )
@ -377,7 +377,6 @@ bool~ loop::$11
bool~ loop::$2
byte~ loop::$5
bool~ loop::$6
byte~ loop::$7
bool~ loop::$8
byte loop::plexFreeNextYpos1_return
byte loop::plexFreeNextYpos1_return#0
@ -439,7 +438,6 @@ byte* plexInit::screen
byte* plexInit::screen#0
byte* plexInit::screen#1
void plexShowSprite()
number~ plexShowSprite::$0
byte~ plexShowSprite::$10
byte~ plexShowSprite::$2
bool~ plexShowSprite::$3
@ -518,8 +516,7 @@ Adding number conversion cast (unumber) 0 in plex_sprite_idx = 0
Adding number conversion cast (unumber) 1 in plex_sprite_msb = 1
Adding number conversion cast (unumber) 0 in PLEX_FREE_YPOS[plexSort::plexFreePrepare1_s#2] = 0
Adding number conversion cast (unumber) 0 in plex_free_next = 0
Adding number conversion cast (unumber) 2 in plexShowSprite::$0 = plex_sprite_idx * 2
Adding number conversion cast (unumber) plexShowSprite::$0 in plexShowSprite::$0 = plex_sprite_idx * (unumber)2
Adding number conversion cast (unumber) 2 in plexShowSprite::plex_sprite_idx2#0 = plex_sprite_idx * 2
Adding number conversion cast (unumber) $16 in plexShowSprite::plexFreeAdd1_$0 = plexShowSprite::plexFreeAdd1_ypos#1 + $16
Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$0 in plexShowSprite::plexFreeAdd1_$0 = plexShowSprite::plexFreeAdd1_ypos#1 + (unumber)$16
Adding number conversion cast (unumber) 1 in plexShowSprite::plexFreeAdd1_$1 = plex_free_next + 1
@ -640,7 +637,6 @@ Finalized unsigned number type (word) $3f8
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in plexSort::$1 = plexSort::m#2 + 1
Inferred type updated to byte in plexSort::$4 = plexSort::s#3 + 1
Inferred type updated to byte in plexShowSprite::$0 = plex_sprite_idx * 2
Inferred type updated to byte in plexShowSprite::plexFreeAdd1_$0 = plexShowSprite::plexFreeAdd1_ypos#1 + $16
Inferred type updated to byte in plexShowSprite::plexFreeAdd1_$1 = plex_free_next + 1
Inferred type updated to byte in plexShowSprite::plexFreeAdd1_$2 = plexShowSprite::plexFreeAdd1_$1 & 7
@ -648,7 +644,7 @@ Inferred type updated to byte in plexShowSprite::$8 = $ff ^ plex_sprite_msb
Inferred type updated to byte in plexShowSprite::$4 = plex_sprite_idx + 1
Inferred type updated to byte in plexShowSprite::$5 = plexShowSprite::$4 & 7
Inversing boolean not [18] plexSort::$3 = plexSort::nxt_y#0 >= PLEX_YPOS[PLEX_SORTED_IDX[plexSort::m#2]] from [17] plexSort::$2 = plexSort::nxt_y#0 < PLEX_YPOS[PLEX_SORTED_IDX[plexSort::m#2]]
Inversing boolean not [77] plexShowSprite::$7 = plex_sprite_msb != 0 from [76] plexShowSprite::$6 = plex_sprite_msb == 0
Inversing boolean not [76] plexShowSprite::$7 = plex_sprite_msb != 0 from [75] plexShowSprite::$6 = plex_sprite_msb == 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)PLEX_SCREEN_PTR = plexInit::plexSetScreen1_$0
Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2
@ -660,15 +656,15 @@ Alias plexSort::nxt_idx#0 = plexSort::nxt_idx#3
Alias plexSort::s#1 = plexSort::s#4
Alias plexSort::nxt_idx#1 = plexSort::nxt_idx#2
Alias plexSort::m#5 = plexSort::m#6
Alias plexShowSprite::plex_sprite_idx2#0 = plexShowSprite::$0 plexShowSprite::plex_sprite_idx2#2 plexShowSprite::plex_sprite_idx2#1
Alias plexShowSprite::plexFreeAdd1_ypos#0 = plexShowSprite::ypos#0 plexShowSprite::plexFreeAdd1_ypos#1
Alias plexShowSprite::plex_sprite_idx2#0 = plexShowSprite::plex_sprite_idx2#2 plexShowSprite::plex_sprite_idx2#1
Alias loop::sin_idx#2 = loop::sin_idx#4 loop::y_idx#0
Alias loop::sin_idx#3 = loop::sin_idx#5
Alias loop::sin_idx#1 = loop::sin_idx#17
Alias loop::sin_idx#15 = loop::sin_idx#16
Alias loop::ss#5 = loop::ss#7 loop::ss#8 loop::ss#6
Alias loop::sin_idx#11 = loop::sin_idx#13 loop::sin_idx#14 loop::sin_idx#12
Alias loop::plexFreeNextYpos1_return#0 = loop::plexFreeNextYpos1_return#2 loop::plexFreeNextYpos1_return#1 loop::plexFreeNextYpos1_return#3 loop::$7 loop::rasterY#0
Alias loop::plexFreeNextYpos1_return#0 = loop::plexFreeNextYpos1_return#2 loop::plexFreeNextYpos1_return#1 loop::plexFreeNextYpos1_return#3 loop::rasterY#0
Alias loop::ss#2 = loop::ss#3 loop::ss#4
Alias loop::sin_idx#10 = loop::sin_idx#9 loop::sin_idx#8 loop::sin_idx#7
Successful SSA optimization Pass2AliasElimination
@ -689,7 +685,7 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values plexSort::m#3 plexSort::m#2
Identical Phi Values loop::sin_idx#11 loop::sin_idx#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [64] plexShowSprite::$10 = plexShowSprite::xpos_idx#0 * SIZEOF_WORD
Identified duplicate assignment right side [63] plexShowSprite::$10 = plexShowSprite::xpos_idx#0 * SIZEOF_WORD
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition plexInit::$1 [8] if(plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1
Simple Condition plexSort::$3 [16] if(plexSort::nxt_y#0>=PLEX_YPOS[PLEX_SORTED_IDX[plexSort::m#2]]) goto plexSort::@2

View File

@ -116,10 +116,9 @@ scroll_bit: {
// if(current_bit==0)
lda.z current_bit
bne __b1
// next_char()
// unsigned int c = next_char()
jsr next_char
txa
// unsigned int c = next_char()
sta.z c
lda #0
sta.z c+1

View File

@ -1,5 +1,7 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement scroll_bit::$5
Eliminating unused variable with no statement scroll_bit::$6
CONTROL FLOW GRAPH SSA
@ -137,8 +139,7 @@ scroll_bit::@7: scope:[scroll_bit] from scroll_bit::@1
asm { sei }
*PROCPORT = $32
scroll_bit::$4 = SCREEN + $28
scroll_bit::$5 = scroll_bit::$4 + $27
scroll_bit::sc#0 = scroll_bit::$5
scroll_bit::sc#0 = scroll_bit::$4 + $27
scroll_bit::r#0 = 0
to:scroll_bit::@3
scroll_bit::@2: scope:[scroll_bit] from scroll_bit
@ -149,9 +150,8 @@ scroll_bit::@2: scope:[scroll_bit] from scroll_bit
scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@2
nxt#16 = phi( scroll_bit::@2/nxt#8 )
next_char::return#3 = phi( scroll_bit::@2/next_char::return#0 )
scroll_bit::$6 = next_char::return#3
scroll_bit::c#0 = next_char::return#3
nxt#4 = nxt#16
scroll_bit::c#0 = scroll_bit::$6
scroll_bit::$7 = scroll_bit::c#0 * 8
scroll_bit::$8 = CHARGEN + scroll_bit::$7
current_chargen#4 = scroll_bit::$8
@ -531,8 +531,6 @@ byte*~ scroll_bit::$12
bool~ scroll_bit::$13
bool~ scroll_bit::$2
byte*~ scroll_bit::$4
byte*~ scroll_bit::$5
byte~ scroll_bit::$6
number~ scroll_bit::$7
byte*~ scroll_bit::$8
byte~ scroll_bit::$9
@ -601,7 +599,7 @@ Adding number conversion cast (unumber) scroll_bit::$0 in scroll_bit::$0 = curre
Adding number conversion cast (unumber) 0 in scroll_bit::$1 = current_bit#4 == 0
Adding number conversion cast (unumber) $32 in *PROCPORT = $32
Adding number conversion cast (unumber) $28 in scroll_bit::$4 = SCREEN + $28
Adding number conversion cast (unumber) $27 in scroll_bit::$5 = scroll_bit::$4 + $27
Adding number conversion cast (unumber) $27 in scroll_bit::sc#0 = scroll_bit::$4 + $27
Adding number conversion cast (unumber) 8 in scroll_bit::$7 = scroll_bit::c#0 * 8
Adding number conversion cast (unumber) scroll_bit::$7 in scroll_bit::$7 = scroll_bit::c#0 * (unumber)8
Adding number conversion cast (unumber) $80 in current_bit#5 = $80
@ -726,8 +724,8 @@ Inferred type updated to byte in scroll_hard::$21 = scroll_hard::i#3 + 1
Inferred type updated to byte in scroll_hard::$24 = scroll_hard::i#3 + 1
Inversing boolean not [30] scroll_soft::$1 = scroll#2 != $ff from [29] scroll_soft::$0 = scroll#2 == $ff
Inversing boolean not [51] scroll_bit::$2 = current_bit#4 != 0 from [50] scroll_bit::$1 = current_bit#4 == 0
Inversing boolean not [78] scroll_bit::$11 = scroll_bit::$9 == 0 from [77] scroll_bit::$10 = scroll_bit::$9 != 0
Inversing boolean not [100] next_char::$1 = next_char::c#0 != 0 from [99] next_char::$0 = next_char::c#0 == 0
Inversing boolean not [76] scroll_bit::$11 = scroll_bit::$9 == 0 from [75] scroll_bit::$10 = scroll_bit::$9 != 0
Inversing boolean not [98] next_char::$1 = next_char::c#0 != 0 from [97] next_char::$0 = next_char::c#0 == 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias scroll#20 = scroll#21
Alias current_bit#31 = current_bit#32
@ -756,11 +754,9 @@ Alias current_bit#4 = scroll_bit::$0
Alias current_chargen#21 = current_chargen#26
Alias current_bit#23 = current_bit#28
Alias nxt#37 = nxt#39
Alias scroll_bit::sc#0 = scroll_bit::$5
Alias nxt#26 = nxt#31
Alias next_char::return#0 = next_char::return#3
Alias nxt#16 = nxt#4
Alias scroll_bit::c#0 = scroll_bit::$6
Alias current_chargen#4 = scroll_bit::$8
Alias scroll_bit::sc#1 = scroll_bit::$12
Alias scroll_bit::sc#3 = scroll_bit::sc#4
@ -2190,13 +2186,12 @@ scroll_bit: {
bne __b1
// [23] phi from scroll_bit to scroll_bit::@2 [phi:scroll_bit->scroll_bit::@2]
// scroll_bit::@2
// next_char()
// unsigned int c = next_char()
// [24] call next_char
jsr next_char
// [25] next_char::return#0 = next_char::return#1 -- vbuaa=vbuxx
txa
// scroll_bit::@8
// unsigned int c = next_char()
// [26] scroll_bit::c#0 = next_char::return#0 -- vwuz1=vbuaa
sta.z c
lda #0

View File

@ -1,6 +1,7 @@
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call main::$0 = call toD018 SCREEN LOGO
Inlined call call __init
Eliminating unused variable with no statement memset::$2
CONTROL FLOW GRAPH SSA
@ -22,8 +23,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -180,7 +180,6 @@ byte* main::toD0181_screen#1
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -273,7 +272,6 @@ Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2

View File

@ -9,6 +9,8 @@ Setting inferred volatile on symbol affected by address-of: getin::ch in asm { j
Inlined call call SEI
Inlined call call CLI
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement irq_line::$10
CONTROL FLOW GRAPH SSA
@ -30,8 +32,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -168,8 +169,7 @@ irq_line::@13: scope:[irq_line] from irq_line::@18 irq_line::@19
irq_line::@14: scope:[irq_line] from irq_line::@13
irq_line::b#5 = phi( irq_line::@13/irq_line::b#2 )
irq_line::idx#2 = phi( irq_line::@13/irq_line::idx#4 )
irq_line::$10 = BARS + SIN[irq_line::idx#2]
irq_line::bar#0 = irq_line::$10
irq_line::bar#0 = BARS + SIN[irq_line::idx#2]
irq_line::i2#0 = 0
to:irq_line::@16
irq_line::@15: scope:[irq_line] from irq_line::@13
@ -246,7 +246,6 @@ volatile byte hstop loadstore
__interrupt(rom_min_cx16) void irq_line()
bool~ irq_line::$0
bool~ irq_line::$1
byte*~ irq_line::$10
word~ irq_line::$11
bool~ irq_line::$12
word~ irq_line::$2
@ -306,7 +305,6 @@ void main()
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -398,14 +396,13 @@ Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [2] memset::$1 = memset::num#1 <= 0 from [1] memset::$0 = memset::num#1 > 0
Inversing boolean not [41] irq_line::$1 = cnt != 0 from [40] irq_line::$0 = cnt == 0
Inversing boolean not [70] irq_line::$8 = hstart > (byte)$140/4 from [69] irq_line::$7 = hstart <= (byte)$140/4
Inversing boolean not [40] irq_line::$1 = cnt != 0 from [39] irq_line::$0 = cnt == 0
Inversing boolean not [69] irq_line::$8 = hstart > (byte)$140/4 from [68] irq_line::$7 = hstart <= (byte)$140/4
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#1 memset::return#3 memset::return#1
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -418,7 +415,6 @@ Alias irq_line::l#4 = irq_line::l#7 irq_line::l#5
Alias memset::num#0 = irq_line::$2
Alias irq_line::idx#2 = irq_line::idx#4
Alias irq_line::b#2 = irq_line::b#5
Alias irq_line::bar#0 = irq_line::$10
Alias irq_line::i2#2 = irq_line::i2#3
Alias irq_line::bar#1 = irq_line::bar#2
Alias irq_line::idx#3 = irq_line::idx#6 irq_line::idx#5

View File

@ -90,12 +90,11 @@ gotoxy: {
sta.z conio_cursor_x
// conio_cursor_y = y
stx.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
txa
sta.z __7
lda #0
sta.z __7+1
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
lda.z __7
asl
sta.z __8

View File

@ -5,6 +5,9 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Fixing struct type SIZE_OF struct printf_buffer_number to 12
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement memcpy::$0
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement gotoxy::$4
Eliminating unused variable with no statement printf_buffer
Eliminating unused variable with no statement main::$0
@ -18,8 +21,7 @@ memcpy: scope:[memcpy] from cscroll::@3 cscroll::@4
memcpy::src#0 = ((byte*)) memcpy::source#2
memcpy::dst#0 = ((byte*)) memcpy::destination#2
memcpy::$2 = (byte*)memcpy::source#2
memcpy::$0 = memcpy::$2 + memcpy::num#2
memcpy::src_end#0 = memcpy::$0
memcpy::src_end#0 = memcpy::$2 + memcpy::num#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
memcpy::destination#4 = phi( memcpy/memcpy::destination#2, memcpy::@2/memcpy::destination#5 )
@ -66,8 +68,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -117,8 +118,7 @@ gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4
conio_cursor_x = gotoxy::x#4
conio_cursor_y = gotoxy::y#4
gotoxy::$7 = (word)gotoxy::y#4
gotoxy::$4 = gotoxy::$7 * $28
gotoxy::line_offset#0 = gotoxy::$4
gotoxy::line_offset#0 = gotoxy::$7 * $28
gotoxy::$5 = CONIO_SCREEN_TEXT + gotoxy::line_offset#0
conio_line_text = gotoxy::$5
gotoxy::$6 = CONIO_SCREEN_COLORS + gotoxy::line_offset#0
@ -370,7 +370,6 @@ bool~ gotoxy::$0
bool~ gotoxy::$1
bool~ gotoxy::$2
bool~ gotoxy::$3
number~ gotoxy::$4
byte*~ gotoxy::$5
byte*~ gotoxy::$6
word~ gotoxy::$7
@ -396,7 +395,6 @@ void main()
constant byte* main::s[$e] = "hello world!
"
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
byte*~ memcpy::$0
bool~ memcpy::$1
byte*~ memcpy::$2
void* memcpy::destination
@ -437,7 +435,6 @@ byte* memcpy::src_end#2
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -480,8 +477,7 @@ Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#2 > 0
Adding number conversion cast (unumber) $19 in gotoxy::$0 = gotoxy::y#3 > $19
Adding number conversion cast (unumber) $28 in gotoxy::$2 = gotoxy::x#3 >= $28
Adding number conversion cast (unumber) 0 in gotoxy::y#0 = 0
Adding number conversion cast (unumber) $28 in gotoxy::$4 = gotoxy::$7 * $28
Adding number conversion cast (unumber) gotoxy::$4 in gotoxy::$4 = gotoxy::$7 * (unumber)$28
Adding number conversion cast (unumber) $28 in gotoxy::line_offset#0 = gotoxy::$7 * $28
Adding number conversion cast (unumber) 0 in gotoxy::x#0 = 0
Adding number conversion cast (unumber) $28 in cputc::$1 = conio_cursor_x == $28
Adding number conversion cast (unumber) $28 in conio_line_text = conio_line_text + $28
@ -578,17 +574,15 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in gotoxy::$4 = gotoxy::$7 * $28
Inversing boolean not [20] memset::$1 = memset::num#2 <= 0 from [19] memset::$0 = memset::num#2 > 0
Inversing boolean not [40] gotoxy::$1 = gotoxy::y#3 <= $19 from [39] gotoxy::$0 = gotoxy::y#3 > $19
Inversing boolean not [44] gotoxy::$3 = gotoxy::x#3 < $28 from [43] gotoxy::$2 = gotoxy::x#3 >= $28
Inversing boolean not [70] cputc::$2 = conio_cursor_x != $28 from [69] cputc::$1 = conio_cursor_x == $28
Inversing boolean not [94] cscroll::$1 = conio_cursor_y != $19 from [93] cscroll::$0 = conio_cursor_y == $19
Inversing boolean not [127] conio_c64_init::$1 = conio_c64_init::line#0 < $19 from [126] conio_c64_init::$0 = conio_c64_init::line#0 >= $19
Inversing boolean not [19] memset::$1 = memset::num#2 <= 0 from [18] memset::$0 = memset::num#2 > 0
Inversing boolean not [38] gotoxy::$1 = gotoxy::y#3 <= $19 from [37] gotoxy::$0 = gotoxy::y#3 > $19
Inversing boolean not [42] gotoxy::$3 = gotoxy::x#3 < $28 from [41] gotoxy::$2 = gotoxy::x#3 >= $28
Inversing boolean not [67] cputc::$2 = conio_cursor_x != $28 from [66] cputc::$1 = conio_cursor_x == $28
Inversing boolean not [91] cscroll::$1 = conio_cursor_y != $19 from [90] cscroll::$0 = conio_cursor_y == $19
Inversing boolean not [124] conio_c64_init::$1 = conio_c64_init::line#0 < $19 from [123] conio_c64_init::$0 = conio_c64_init::line#0 >= $19
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
Alias memcpy::src_end#0 = memcpy::$0
Alias memcpy::src#2 = memcpy::src#3
Alias memcpy::dst#2 = memcpy::dst#3
Alias memcpy::src_end#1 = memcpy::src_end#2
@ -597,13 +591,11 @@ Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
Alias memset::str#5 = memset::str#6
Alias gotoxy::x#5 = gotoxy::x#6
Alias gotoxy::line_offset#0 = gotoxy::$4
Alias gotoxy::y#5 = gotoxy::y#6
Alias cputc::c#1 = cputc::c#2
Alias cputs::c#1 = cputs::$0 cputs::c#2
@ -2239,13 +2231,12 @@ gotoxy: {
// conio_cursor_y = y
// [23] conio_cursor_y = gotoxy::y#4 -- vbuz1=vbuxx
stx.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
// [24] gotoxy::$7 = (word)gotoxy::y#4 -- vwuz1=_word_vbuxx
txa
sta.z __7
lda #0
sta.z __7+1
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
// [25] gotoxy::$8 = gotoxy::$7 << 2 -- vwuz1=vwuz2_rol_2
lda.z __7
asl

View File

@ -231,7 +231,9 @@ main: {
// memoryPage: Page address of the memory that the block should point to in the 1MB memory space of the MEGA65.
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
memoryRemapBlock: {
// Find the page offset (the number of pages to offset the block)
.const pageOffset = $100-$40
// Which block is being remapped? (0-7)
.const block = $40>>5
.const blockBits = 1<<block
// memoryRemap(blockBits, pageOffset, pageOffset)
@ -282,10 +284,9 @@ memoryRemap: {
.label __6 = $a
.label lowerPageOffset = 2
.label upperPageOffset = 4
// BYTE0(lowerPageOffset)
lda.z lowerPageOffset
// char aVal = BYTE0(lowerPageOffset)
// lower blocks offset page low
lda.z lowerPageOffset
sta.z aVal
// remapBlocks << 4
tza
@ -298,15 +299,13 @@ memoryRemap: {
lda.z lowerPageOffset+1
// BYTE1(lowerPageOffset) & 0xf
and #$f
// (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
ora.z __1
// char xVal = (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
// lower blocks to map + lower blocks offset high nibble
ora.z __1
sta.z xVal
// BYTE0(upperPageOffset)
lda.z upperPageOffset
// char yVal = BYTE0(upperPageOffset)
// upper blocks offset page
lda.z upperPageOffset
sta.z yVal
// remapBlocks & 0xf0
tza
@ -316,10 +315,9 @@ memoryRemap: {
lda.z upperPageOffset+1
// BYTE1(upperPageOffset) & 0xf
and #$f
// (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
ora.z __6
// char zVal = (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
// upper blocks to map + upper blocks offset page high nibble
ora.z __6
sta.z zVal
// asm
lda aVal

View File

@ -82,41 +82,37 @@ memoryRemap: scope:[memoryRemap] from irq::@3 main main::@6 memoryRemapBlock
[40] memoryRemap::upperPageOffset#4 = phi( irq::@3/0, main/0, main::@6/0, memoryRemapBlock/memoryRemapBlock::pageOffset#0 )
[40] memoryRemap::remapBlocks#4 = phi( irq::@3/0, main/0, main::@6/0, memoryRemapBlock/memoryRemapBlock::blockBits#0 )
[40] memoryRemap::lowerPageOffset#4 = phi( irq::@3/0, main/0, main::@6/0, memoryRemapBlock/memoryRemapBlock::pageOffset#0 )
[41] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#4
[42] memoryRemap::aVal = memoryRemap::$0
[43] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4
[44] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4
[45] memoryRemap::$3 = memoryRemap::$2 & $f
[46] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
[47] memoryRemap::xVal = memoryRemap::$4
[48] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#4
[49] memoryRemap::yVal = memoryRemap::$5
[50] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
[51] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4
[52] memoryRemap::$8 = memoryRemap::$7 & $f
[53] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
[54] memoryRemap::zVal = memoryRemap::$9
[41] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#4
[42] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4
[43] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4
[44] memoryRemap::$3 = memoryRemap::$2 & $f
[45] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
[46] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#4
[47] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
[48] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4
[49] memoryRemap::$8 = memoryRemap::$7 & $f
[50] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
[56] return
[52] return
to:@return
void memcpy_dma4(byte memcpy_dma4::dest_bank , void* memcpy_dma4::dest , byte memcpy_dma4::src_bank , void* memcpy_dma4::src , word memcpy_dma4::num)
memcpy_dma4: scope:[memcpy_dma4] from main::@4
[57] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B)
[58] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0
[59] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0
[60] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
[61] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0
[62] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
[63] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
[64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
[65] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
[66] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4
[67] *((byte*)DMA) = byte0 &memcpy_dma_command4
[68] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0
[53] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B)
[54] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0
[55] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0
[56] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
[57] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0
[58] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
[59] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
[60] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
[61] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
[62] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4
[63] *((byte*)DMA) = byte0 &memcpy_dma_command4
[64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0
to:memcpy_dma4::@return
memcpy_dma4::@return: scope:[memcpy_dma4] from memcpy_dma4
[69] return
[65] return
to:@return

View File

@ -53,6 +53,13 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement memoryRemapBlock::$0
Eliminating unused variable with no statement memoryRemapBlock::$1
Eliminating unused variable with no statement memoryRemapBlock::$2
Eliminating unused variable with no statement memcpy_dma_command
Eliminating unused variable with no statement memset_dma_command
@ -63,20 +70,16 @@ memoryRemap: scope:[memoryRemap] from irq::@3 main main::@6 memoryRemapBlock
memoryRemap::upperPageOffset#4 = phi( irq::@3/memoryRemap::upperPageOffset#3, main/memoryRemap::upperPageOffset#1, main::@6/memoryRemap::upperPageOffset#2, memoryRemapBlock/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#4 = phi( irq::@3/memoryRemap::remapBlocks#3, main/memoryRemap::remapBlocks#1, main::@6/memoryRemap::remapBlocks#2, memoryRemapBlock/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#4 = phi( irq::@3/memoryRemap::lowerPageOffset#3, main/memoryRemap::lowerPageOffset#1, main::@6/memoryRemap::lowerPageOffset#2, memoryRemapBlock/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#4
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#4
memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#4
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#4
memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -87,12 +90,9 @@ void memoryRemapBlock(byte memoryRemapBlock::blockPage , word memoryRemapBlock::
memoryRemapBlock: scope:[memoryRemapBlock] from irq main::@5
memoryRemapBlock::blockPage#2 = phi( irq/memoryRemapBlock::blockPage#1, main::@5/memoryRemapBlock::blockPage#0 )
memoryRemapBlock::memoryPage#2 = phi( irq/memoryRemapBlock::memoryPage#1, main::@5/memoryRemapBlock::memoryPage#0 )
memoryRemapBlock::$0 = memoryRemapBlock::memoryPage#2 - memoryRemapBlock::blockPage#2
memoryRemapBlock::pageOffset#0 = memoryRemapBlock::$0
memoryRemapBlock::$1 = memoryRemapBlock::blockPage#2 / $20
memoryRemapBlock::block#0 = memoryRemapBlock::$1
memoryRemapBlock::$2 = 1 << memoryRemapBlock::block#0
memoryRemapBlock::blockBits#0 = memoryRemapBlock::$2
memoryRemapBlock::pageOffset#0 = memoryRemapBlock::memoryPage#2 - memoryRemapBlock::blockPage#2
memoryRemapBlock::block#0 = memoryRemapBlock::blockPage#2 / $20
memoryRemapBlock::blockBits#0 = 1 << memoryRemapBlock::block#0
memoryRemap::remapBlocks#0 = memoryRemapBlock::blockBits#0
memoryRemap::lowerPageOffset#0 = memoryRemapBlock::pageOffset#0
memoryRemap::upperPageOffset#0 = memoryRemapBlock::pageOffset#0
@ -319,16 +319,12 @@ byte memcpy_dma4::src_bank#0
byte memcpy_dma4::src_bank#1
volatile struct DMA_LIST_F018B memcpy_dma_command4 loadstore = { command: DMA_COMMAND_COPY, count: 0, src: 0, src_bank: 0, dest: 0, dest_bank: 0, sub_command: 0, modulo: 0 }
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -352,9 +348,6 @@ volatile byte memoryRemap::xVal loadstore
volatile byte memoryRemap::yVal loadstore
volatile byte memoryRemap::zVal loadstore
void memoryRemapBlock(byte memoryRemapBlock::blockPage , word memoryRemapBlock::memoryPage)
word~ memoryRemapBlock::$0
number~ memoryRemapBlock::$1
number~ memoryRemapBlock::$2
byte memoryRemapBlock::block
byte memoryRemapBlock::block#0
byte memoryRemapBlock::blockBits
@ -378,16 +371,12 @@ Adding number conversion cast (unumber) 3 in
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#4 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) $20 in memoryRemapBlock::$1 = memoryRemapBlock::blockPage#2 / $20
Adding number conversion cast (unumber) memoryRemapBlock::$1 in memoryRemapBlock::$1 = memoryRemapBlock::blockPage#2 / (unumber)$20
Adding number conversion cast (unumber) 1 in memoryRemapBlock::$2 = 1 << memoryRemapBlock::block#0
Adding number conversion cast (unumber) memoryRemapBlock::$2 in memoryRemapBlock::$2 = (unumber)1 << memoryRemapBlock::block#0
Adding number conversion cast (unumber) $20 in memoryRemapBlock::block#0 = memoryRemapBlock::blockPage#2 / $20
Adding number conversion cast (unumber) 1 in memoryRemapBlock::blockBits#0 = 1 << memoryRemapBlock::block#0
Adding number conversion cast (unumber) 1 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
@ -520,27 +509,12 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Inferred type updated to byte in memoryRemapBlock::$1 = memoryRemapBlock::blockPage#2 / $20
Inferred type updated to byte in memoryRemapBlock::$2 = 1 << memoryRemapBlock::block#0
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Alias memoryRemapBlock::pageOffset#0 = memoryRemapBlock::$0
Alias memoryRemapBlock::block#0 = memoryRemapBlock::$1
Alias memoryRemapBlock::blockBits#0 = memoryRemapBlock::$2
Alias memcpy_dma4::num#0 = main::$1
Alias main::i#2 = main::i#3
Alias main::mem_destroy_i#3 = main::mem_destroy_i#4
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memcpy_dma4::num#1 memcpy_dma4::num#0
Identical Phi Values memcpy_dma4::src_bank#1 memcpy_dma4::src_bank#0
Identical Phi Values memcpy_dma4::src#1 memcpy_dma4::src#0
@ -549,10 +523,10 @@ Identical Phi Values memcpy_dma4::dest#1 memcpy_dma4::dest#0
Identical Phi Values main::mem_destroy_i#3 main::mem_destroy_i#1
Identical Phi Values irq::raster#1 irq::raster#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition main::$7 [80] if(main::i#2<$f0) goto main::@3
Simple Condition irq::$5 [97] if(*((byte*)VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER)==irq::raster#0) goto irq::@1
Simple Condition main::$7 [76] if(main::i#2<$f0) goto main::@3
Simple Condition irq::$5 [93] if(*((byte*)VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER)==irq::raster#0) goto irq::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [52] memcpy_dma4::num#0 = MUSIC_END - MUSIC
Constant right-side identified [48] memcpy_dma4::num#0 = MUSIC_END - MUSIC
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::remapBlocks#1 = 0
Constant memoryRemap::lowerPageOffset#1 = 0
@ -575,10 +549,10 @@ Constant memoryRemap::remapBlocks#3 = 0
Constant memoryRemap::lowerPageOffset#3 = 0
Constant memoryRemap::upperPageOffset#3 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memcpy_dma4::src#0 in [30] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
Constant value identified (byte*)memcpy_dma4::dest#0 in [32] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
Constant value identified (byte*)memcpy_dma4::src#0 in [26] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
Constant value identified (byte*)memcpy_dma4::dest#0 in [28] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
Successful SSA optimization Pass2ConstantValues
Simplifying expression containing zero (byte*)DMA in [37] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memcpy_dma_command4
Simplifying expression containing zero (byte*)DMA in [33] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memcpy_dma_command4
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
@ -591,11 +565,7 @@ Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Rewriting division to use shift [19] memoryRemapBlock::block#0 = memoryRemapBlock::blockPage#2 / $20
Rewriting division to use shift [15] memoryRemapBlock::block#0 = memoryRemapBlock::blockPage#2 / $20
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings memoryRemap::remapBlocks#1
Inlining constant with var siblings memoryRemap::lowerPageOffset#1
@ -628,15 +598,11 @@ Constant inlined memoryRemap::lowerPageOffset#2 = 0
Constant inlined memoryRemap::lowerPageOffset#1 = 0
Constant inlined main::i#0 = 0
Successful SSA optimization Pass2ConstantInlining
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemapBlock::memoryPage#2 $100
Identical Phi Values memoryRemapBlock::blockPage#2 $40
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [18] memoryRemapBlock::pageOffset#0 = $100 - $40
Constant right-side identified [19] memoryRemapBlock::block#0 = $40 >> 5
Constant right-side identified [14] memoryRemapBlock::pageOffset#0 = $100 - $40
Constant right-side identified [15] memoryRemapBlock::block#0 = $40 >> 5
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemapBlock::pageOffset#0 = $100-$40
Constant memoryRemapBlock::block#0 = $40>>5
@ -649,11 +615,7 @@ Inlining constant with var siblings memoryRemap::upperPageOffset#0
Constant inlined memoryRemap::lowerPageOffset#0 = memoryRemapBlock::pageOffset#0
Constant inlined memoryRemap::upperPageOffset#0 = memoryRemapBlock::pageOffset#0
Successful SSA optimization Pass2ConstantInlining
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [17] memoryRemapBlock::blockBits#0 = 1 << memoryRemapBlock::block#0
Constant right-side identified [13] memoryRemapBlock::blockBits#0 = 1 << memoryRemapBlock::block#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemapBlock::blockBits#0 = 1<<memoryRemapBlock::block#0
Successful SSA optimization Pass2ConstantIdentification
@ -662,28 +624,12 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings memoryRemap::remapBlocks#0
Constant inlined memoryRemap::remapBlocks#0 = memoryRemapBlock::blockBits#0
Successful SSA optimization Pass2ConstantInlining
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $4000
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Added new block during phi lifting main::@8(between main::@2 and main::@1)
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of memoryRemapBlock
@ -787,43 +733,39 @@ memoryRemap: scope:[memoryRemap] from irq::@3 main main::@6 memoryRemapBlock
[40] memoryRemap::upperPageOffset#4 = phi( irq::@3/0, main/0, main::@6/0, memoryRemapBlock/memoryRemapBlock::pageOffset#0 )
[40] memoryRemap::remapBlocks#4 = phi( irq::@3/0, main/0, main::@6/0, memoryRemapBlock/memoryRemapBlock::blockBits#0 )
[40] memoryRemap::lowerPageOffset#4 = phi( irq::@3/0, main/0, main::@6/0, memoryRemapBlock/memoryRemapBlock::pageOffset#0 )
[41] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#4
[42] memoryRemap::aVal = memoryRemap::$0
[43] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4
[44] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4
[45] memoryRemap::$3 = memoryRemap::$2 & $f
[46] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
[47] memoryRemap::xVal = memoryRemap::$4
[48] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#4
[49] memoryRemap::yVal = memoryRemap::$5
[50] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
[51] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4
[52] memoryRemap::$8 = memoryRemap::$7 & $f
[53] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
[54] memoryRemap::zVal = memoryRemap::$9
[41] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#4
[42] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4
[43] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4
[44] memoryRemap::$3 = memoryRemap::$2 & $f
[45] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
[46] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#4
[47] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0
[48] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4
[49] memoryRemap::$8 = memoryRemap::$7 & $f
[50] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
[56] return
[52] return
to:@return
void memcpy_dma4(byte memcpy_dma4::dest_bank , void* memcpy_dma4::dest , byte memcpy_dma4::src_bank , void* memcpy_dma4::src , word memcpy_dma4::num)
memcpy_dma4: scope:[memcpy_dma4] from main::@4
[57] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B)
[58] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0
[59] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0
[60] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
[61] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0
[62] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
[63] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
[64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
[65] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
[66] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4
[67] *((byte*)DMA) = byte0 &memcpy_dma_command4
[68] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0
[53] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B)
[54] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0
[55] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0
[56] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
[57] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0
[58] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
[59] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
[60] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
[61] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
[62] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4
[63] *((byte*)DMA) = byte0 &memcpy_dma_command4
[64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0
to:memcpy_dma4::@return
memcpy_dma4::@return: scope:[memcpy_dma4] from memcpy_dma4
[69] return
[65] return
to:@return
@ -848,25 +790,21 @@ void* memcpy_dma4::src
byte memcpy_dma4::src_bank
volatile struct DMA_LIST_F018B memcpy_dma_command4 loadstore = { command: DMA_COMMAND_COPY, count: 0, src: 0, src_bank: 0, dest: 0, dest_bank: 0, sub_command: 0, modulo: 0 }
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0 202.0
byte~ memoryRemap::$1 67.33333333333333
byte~ memoryRemap::$2 202.0
byte~ memoryRemap::$3 202.0
byte~ memoryRemap::$4 202.0
byte~ memoryRemap::$5 202.0
byte~ memoryRemap::$6 67.33333333333333
byte~ memoryRemap::$7 202.0
byte~ memoryRemap::$8 202.0
byte~ memoryRemap::$9 202.0
volatile byte memoryRemap::aVal loadstore 7.769230769230769
volatile byte memoryRemap::aVal loadstore 10.1
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#4 50.5
word memoryRemap::lowerPageOffset#4 67.33333333333333
byte memoryRemap::remapBlocks
byte memoryRemap::remapBlocks#4 20.2
byte memoryRemap::remapBlocks#4 28.857142857142858
word memoryRemap::upperPageOffset
word memoryRemap::upperPageOffset#4 18.363636363636363
volatile byte memoryRemap::xVal loadstore 12.625
volatile byte memoryRemap::yVal loadstore 16.833333333333332
word memoryRemap::upperPageOffset#4 25.25
volatile byte memoryRemap::xVal loadstore 16.833333333333332
volatile byte memoryRemap::yVal loadstore 20.2
volatile byte memoryRemap::zVal loadstore 101.0
void memoryRemapBlock(byte memoryRemapBlock::blockPage , word memoryRemapBlock::memoryPage)
byte memoryRemapBlock::block
@ -882,19 +820,15 @@ Initial phi equivalence classes
[ memoryRemap::remapBlocks#4 ]
[ memoryRemap::upperPageOffset#4 ]
Added variable irq::raster#0 to live range equivalence class [ irq::raster#0 ]
Added variable memoryRemap::$0 to live range equivalence class [ memoryRemap::$0 ]
Added variable memoryRemap::aVal to live range equivalence class [ memoryRemap::aVal ]
Added variable memoryRemap::$1 to live range equivalence class [ memoryRemap::$1 ]
Added variable memoryRemap::$2 to live range equivalence class [ memoryRemap::$2 ]
Added variable memoryRemap::$3 to live range equivalence class [ memoryRemap::$3 ]
Added variable memoryRemap::$4 to live range equivalence class [ memoryRemap::$4 ]
Added variable memoryRemap::xVal to live range equivalence class [ memoryRemap::xVal ]
Added variable memoryRemap::$5 to live range equivalence class [ memoryRemap::$5 ]
Added variable memoryRemap::yVal to live range equivalence class [ memoryRemap::yVal ]
Added variable memoryRemap::$6 to live range equivalence class [ memoryRemap::$6 ]
Added variable memoryRemap::$7 to live range equivalence class [ memoryRemap::$7 ]
Added variable memoryRemap::$8 to live range equivalence class [ memoryRemap::$8 ]
Added variable memoryRemap::$9 to live range equivalence class [ memoryRemap::$9 ]
Added variable memoryRemap::zVal to live range equivalence class [ memoryRemap::zVal ]
Added variable memcpy_dma4::dmaMode#0 to live range equivalence class [ memcpy_dma4::dmaMode#0 ]
Added variable memcpy_dma_command4 to live range equivalence class [ memcpy_dma_command4 ]
@ -905,19 +839,15 @@ Complete equivalence classes
[ memoryRemap::remapBlocks#4 ]
[ memoryRemap::upperPageOffset#4 ]
[ irq::raster#0 ]
[ memoryRemap::$0 ]
[ memoryRemap::aVal ]
[ memoryRemap::$1 ]
[ memoryRemap::$2 ]
[ memoryRemap::$3 ]
[ memoryRemap::$4 ]
[ memoryRemap::xVal ]
[ memoryRemap::$5 ]
[ memoryRemap::yVal ]
[ memoryRemap::$6 ]
[ memoryRemap::$7 ]
[ memoryRemap::$8 ]
[ memoryRemap::$9 ]
[ memoryRemap::zVal ]
[ memcpy_dma4::dmaMode#0 ]
[ memcpy_dma_command4 ]
@ -927,21 +857,17 @@ Allocated zp[2]:4 [ memoryRemap::lowerPageOffset#4 ]
Allocated zp[1]:6 [ memoryRemap::remapBlocks#4 ]
Allocated zp[2]:7 [ memoryRemap::upperPageOffset#4 ]
Allocated zp[1]:9 [ irq::raster#0 ]
Allocated zp[1]:10 [ memoryRemap::$0 ]
Allocated zp[1]:11 [ memoryRemap::aVal ]
Allocated zp[1]:12 [ memoryRemap::$1 ]
Allocated zp[1]:13 [ memoryRemap::$2 ]
Allocated zp[1]:14 [ memoryRemap::$3 ]
Allocated zp[1]:15 [ memoryRemap::$4 ]
Allocated zp[1]:16 [ memoryRemap::xVal ]
Allocated zp[1]:17 [ memoryRemap::$5 ]
Allocated zp[1]:18 [ memoryRemap::yVal ]
Allocated zp[1]:19 [ memoryRemap::$6 ]
Allocated zp[1]:20 [ memoryRemap::$7 ]
Allocated zp[1]:21 [ memoryRemap::$8 ]
Allocated zp[1]:22 [ memoryRemap::$9 ]
Allocated zp[1]:23 [ memoryRemap::zVal ]
Allocated zp[1]:24 [ memcpy_dma4::dmaMode#0 ]
Allocated zp[1]:10 [ memoryRemap::aVal ]
Allocated zp[1]:11 [ memoryRemap::$1 ]
Allocated zp[1]:12 [ memoryRemap::$2 ]
Allocated zp[1]:13 [ memoryRemap::$3 ]
Allocated zp[1]:14 [ memoryRemap::xVal ]
Allocated zp[1]:15 [ memoryRemap::yVal ]
Allocated zp[1]:16 [ memoryRemap::$6 ]
Allocated zp[1]:17 [ memoryRemap::$7 ]
Allocated zp[1]:18 [ memoryRemap::$8 ]
Allocated zp[1]:19 [ memoryRemap::zVal ]
Allocated zp[1]:20 [ memcpy_dma4::dmaMode#0 ]
Allocated mem[12] [ memcpy_dma_command4 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [0] *((byte*)VICII+OFFSET_STRUCT_MOS6569_VICII_IRQ_STATUS) = IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a
@ -964,25 +890,27 @@ Statement [28] *HARDWARE_IRQ = &irq [ ] ( [ ] { } ) always clobbers reg byte a
Statement [35] DEFAULT_SCREEN[main::i#2] = MUSIC[main::i#2] [ main::mem_destroy_i#1 main::i#2 ] ( [ main::mem_destroy_i#1 main::i#2 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::mem_destroy_i#2 main::mem_destroy_i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::i#2 main::i#1 ]
Statement [43] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] ( memoryRemap:4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:23 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } ) always clobbers reg byte a
Statement [41] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] ( memoryRemap:4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemap:23 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:6 [ memoryRemap::remapBlocks#4 ]
Statement [45] memoryRemap::$3 = memoryRemap::$2 & $f [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] ( memoryRemap:4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:23 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:12 [ memoryRemap::$1 ]
Statement [50] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] ( memoryRemap:4 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:23 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } ) always clobbers reg byte a
Statement [52] memoryRemap::$8 = memoryRemap::$7 & $f [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] ( memoryRemap:4 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:23 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:19 [ memoryRemap::$6 ]
Statement [42] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] ( memoryRemap:4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:23 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } ) always clobbers reg byte a
Statement [44] memoryRemap::$3 = memoryRemap::$2 & $f [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] ( memoryRemap:4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:23 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:11 [ memoryRemap::$1 ]
Statement [46] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] ( memoryRemap:4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemap:23 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } ) always clobbers reg byte a
Statement [47] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] ( memoryRemap:4 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:23 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } ) always clobbers reg byte a
Statement [49] memoryRemap::$8 = memoryRemap::$7 & $f [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] ( memoryRemap:4 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:23 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:16 [ memoryRemap::$6 ]
Statement asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom } always clobbers reg byte a reg byte x reg byte y reg byte z
Statement [58] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:24 [ memcpy_dma4::dmaMode#0 ]
Statement [59] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [60] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [61] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [62] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [63] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [65] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [66] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [67] *((byte*)DMA) = byte0 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 ] { } ) always clobbers reg byte a
Statement [54] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:20 [ memcpy_dma4::dmaMode#0 ]
Statement [55] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [56] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [57] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [58] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [59] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [60] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [61] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [62] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [63] *((byte*)DMA) = byte0 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 ] { } ) always clobbers reg byte a
Statement [0] *((byte*)VICII+OFFSET_STRUCT_MOS6569_VICII_IRQ_STATUS) = IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a
Statement [3] call *musicPlay [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y reg byte z
Statement [8] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y reg byte z
@ -1001,49 +929,47 @@ Statement [26] *((byte*)VICII+OFFSET_STRUCT_MOS6569_VICII_CONTROL1) = *((byte*)V
Statement [27] *((byte*)VICII+OFFSET_STRUCT_MOS6569_VICII_IRQ_ENABLE) = IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a
Statement [28] *HARDWARE_IRQ = &irq [ ] ( [ ] { } ) always clobbers reg byte a
Statement [35] DEFAULT_SCREEN[main::i#2] = MUSIC[main::i#2] [ main::mem_destroy_i#1 main::i#2 ] ( [ main::mem_destroy_i#1 main::i#2 ] { } ) always clobbers reg byte a
Statement [43] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] ( memoryRemap:4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:23 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } ) always clobbers reg byte a
Statement [45] memoryRemap::$3 = memoryRemap::$2 & $f [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] ( memoryRemap:4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:23 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } ) always clobbers reg byte a
Statement [50] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] ( memoryRemap:4 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:23 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } ) always clobbers reg byte a
Statement [52] memoryRemap::$8 = memoryRemap::$7 & $f [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] ( memoryRemap:4 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:23 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } ) always clobbers reg byte a
Statement [41] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] ( memoryRemap:4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemap:23 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal ] { } ) always clobbers reg byte a
Statement [42] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] ( memoryRemap:4 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemap:23 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::lowerPageOffset#4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 ] { } ) always clobbers reg byte a
Statement [44] memoryRemap::$3 = memoryRemap::$2 & $f [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] ( memoryRemap:4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemap:23 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::$1 memoryRemap::$3 ] { } ) always clobbers reg byte a
Statement [46] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] ( memoryRemap:4 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemap:23 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::remapBlocks#4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal ] { } ) always clobbers reg byte a
Statement [47] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] ( memoryRemap:4 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemap:23 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::upperPageOffset#4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 ] { } ) always clobbers reg byte a
Statement [49] memoryRemap::$8 = memoryRemap::$7 & $f [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] ( memoryRemap:4 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:10 [ memcpy_dma_command4 memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemap:23 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:2::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } memoryRemapBlock:20::memoryRemap:38 [ memoryRemap::aVal memoryRemap::xVal memoryRemap::yVal memoryRemap::$6 memoryRemap::$8 ] { } ) always clobbers reg byte a
Statement asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom } always clobbers reg byte a reg byte x reg byte y reg byte z
Statement [58] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [59] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [60] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [61] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [62] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [63] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [65] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [66] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [67] *((byte*)DMA) = byte0 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 ] { } ) always clobbers reg byte a
Statement [54] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [55] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [56] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [57] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [58] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [59] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [60] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [61] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [62] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 memcpy_dma_command4 ] { } ) always clobbers reg byte a
Statement [63] *((byte*)DMA) = byte0 &memcpy_dma_command4 [ memcpy_dma4::dmaMode#0 ] ( memcpy_dma4:18 [ memcpy_dma4::dmaMode#0 ] { } ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::mem_destroy_i#2 main::mem_destroy_i#1 ] : zp[1]:2 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:3 [ main::i#2 main::i#1 ] : zp[1]:3 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[2]:4 [ memoryRemap::lowerPageOffset#4 ] : zp[2]:4 ,
Potential registers zp[1]:6 [ memoryRemap::remapBlocks#4 ] : zp[1]:6 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[2]:7 [ memoryRemap::upperPageOffset#4 ] : zp[2]:7 ,
Potential registers zp[1]:9 [ irq::raster#0 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:10 [ memoryRemap::$0 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:11 [ memoryRemap::aVal ] : zp[1]:11 ,
Potential registers zp[1]:12 [ memoryRemap::$1 ] : zp[1]:12 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:13 [ memoryRemap::$2 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:14 [ memoryRemap::$3 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:15 [ memoryRemap::$4 ] : zp[1]:15 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:16 [ memoryRemap::xVal ] : zp[1]:16 ,
Potential registers zp[1]:17 [ memoryRemap::$5 ] : zp[1]:17 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:18 [ memoryRemap::yVal ] : zp[1]:18 ,
Potential registers zp[1]:19 [ memoryRemap::$6 ] : zp[1]:19 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:20 [ memoryRemap::$7 ] : zp[1]:20 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:21 [ memoryRemap::$8 ] : zp[1]:21 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:22 [ memoryRemap::$9 ] : zp[1]:22 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:23 [ memoryRemap::zVal ] : zp[1]:23 ,
Potential registers zp[1]:24 [ memcpy_dma4::dmaMode#0 ] : zp[1]:24 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:10 [ memoryRemap::aVal ] : zp[1]:10 ,
Potential registers zp[1]:11 [ memoryRemap::$1 ] : zp[1]:11 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:12 [ memoryRemap::$2 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:13 [ memoryRemap::$3 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:14 [ memoryRemap::xVal ] : zp[1]:14 ,
Potential registers zp[1]:15 [ memoryRemap::yVal ] : zp[1]:15 ,
Potential registers zp[1]:16 [ memoryRemap::$6 ] : zp[1]:16 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:17 [ memoryRemap::$7 ] : zp[1]:17 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:18 [ memoryRemap::$8 ] : zp[1]:18 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:19 [ memoryRemap::zVal ] : zp[1]:19 ,
Potential registers zp[1]:20 [ memcpy_dma4::dmaMode#0 ] : zp[1]:20 , reg byte x , reg byte y , reg byte z ,
Potential registers mem[12] [ memcpy_dma_command4 ] : mem[12] ,
REGISTER UPLIFT SCOPES
Uplift Scope [memoryRemap] 202: zp[1]:10 [ memoryRemap::$0 ] 202: zp[1]:13 [ memoryRemap::$2 ] 202: zp[1]:14 [ memoryRemap::$3 ] 202: zp[1]:15 [ memoryRemap::$4 ] 202: zp[1]:17 [ memoryRemap::$5 ] 202: zp[1]:20 [ memoryRemap::$7 ] 202: zp[1]:21 [ memoryRemap::$8 ] 202: zp[1]:22 [ memoryRemap::$9 ] 101: zp[1]:23 [ memoryRemap::zVal ] 67.33: zp[1]:12 [ memoryRemap::$1 ] 67.33: zp[1]:19 [ memoryRemap::$6 ] 50.5: zp[2]:4 [ memoryRemap::lowerPageOffset#4 ] 20.2: zp[1]:6 [ memoryRemap::remapBlocks#4 ] 18.36: zp[2]:7 [ memoryRemap::upperPageOffset#4 ] 16.83: zp[1]:18 [ memoryRemap::yVal ] 12.62: zp[1]:16 [ memoryRemap::xVal ] 7.77: zp[1]:11 [ memoryRemap::aVal ]
Uplift Scope [memoryRemap] 202: zp[1]:12 [ memoryRemap::$2 ] 202: zp[1]:13 [ memoryRemap::$3 ] 202: zp[1]:17 [ memoryRemap::$7 ] 202: zp[1]:18 [ memoryRemap::$8 ] 101: zp[1]:19 [ memoryRemap::zVal ] 67.33: zp[2]:4 [ memoryRemap::lowerPageOffset#4 ] 67.33: zp[1]:11 [ memoryRemap::$1 ] 67.33: zp[1]:16 [ memoryRemap::$6 ] 28.86: zp[1]:6 [ memoryRemap::remapBlocks#4 ] 25.25: zp[2]:7 [ memoryRemap::upperPageOffset#4 ] 20.2: zp[1]:15 [ memoryRemap::yVal ] 16.83: zp[1]:14 [ memoryRemap::xVal ] 10.1: zp[1]:10 [ memoryRemap::aVal ]
Uplift Scope [main] 370.33: zp[1]:3 [ main::i#2 main::i#1 ] 89.4: zp[1]:2 [ main::mem_destroy_i#2 main::mem_destroy_i#1 ]
Uplift Scope [irq] 6.5: zp[1]:9 [ irq::raster#0 ]
Uplift Scope [memcpy_dma4] 2: zp[1]:24 [ memcpy_dma4::dmaMode#0 ]
Uplift Scope [memcpy_dma4] 2: zp[1]:20 [ memcpy_dma4::dmaMode#0 ]
Uplift Scope [MOS6526_CIA]
Uplift Scope [MOS6569_VICII]
Uplift Scope [MOS6581_SID]
@ -1055,53 +981,45 @@ Uplift Scope [DMA_LIST_F018A]
Uplift Scope [DMA_LIST_F018B]
Uplift Scope [] 0: mem[12] [ memcpy_dma_command4 ]
Uplifting [memoryRemap] best 4838 combination reg byte a [ memoryRemap::$0 ] reg byte a [ memoryRemap::$2 ] reg byte a [ memoryRemap::$3 ] zp[1]:15 [ memoryRemap::$4 ] zp[1]:17 [ memoryRemap::$5 ] zp[1]:20 [ memoryRemap::$7 ] zp[1]:21 [ memoryRemap::$8 ] zp[1]:22 [ memoryRemap::$9 ] zp[1]:23 [ memoryRemap::zVal ] zp[1]:12 [ memoryRemap::$1 ] zp[1]:19 [ memoryRemap::$6 ] zp[2]:4 [ memoryRemap::lowerPageOffset#4 ] zp[1]:6 [ memoryRemap::remapBlocks#4 ] zp[2]:7 [ memoryRemap::upperPageOffset#4 ] zp[1]:18 [ memoryRemap::yVal ] zp[1]:16 [ memoryRemap::xVal ] zp[1]:11 [ memoryRemap::aVal ]
Limited combination testing to 100 combinations of 25000000 possible.
Uplifting [main] best 3548 combination reg byte y [ main::i#2 main::i#1 ] reg byte x [ main::mem_destroy_i#2 main::mem_destroy_i#1 ]
Uplifting [irq] best 3515 combination reg byte a [ irq::raster#0 ]
Uplifting [memcpy_dma4] best 3509 combination reg byte x [ memcpy_dma4::dmaMode#0 ]
Uplifting [MOS6526_CIA] best 3509 combination
Uplifting [MOS6569_VICII] best 3509 combination
Uplifting [MOS6581_SID] best 3509 combination
Uplifting [MOS4569_VICIII] best 3509 combination
Uplifting [MEGA65_VICIV] best 3509 combination
Uplifting [memoryRemapBlock] best 3509 combination
Uplifting [F018_DMAGIC] best 3509 combination
Uplifting [DMA_LIST_F018A] best 3509 combination
Uplifting [DMA_LIST_F018B] best 3509 combination
Uplifting [] best 3509 combination mem[12] [ memcpy_dma_command4 ]
Attempting to uplift remaining variables inzp[1]:15 [ memoryRemap::$4 ]
Uplifting [memoryRemap] best 3503 combination reg byte a [ memoryRemap::$4 ]
Attempting to uplift remaining variables inzp[1]:17 [ memoryRemap::$5 ]
Uplifting [memoryRemap] best 3497 combination reg byte a [ memoryRemap::$5 ]
Attempting to uplift remaining variables inzp[1]:20 [ memoryRemap::$7 ]
Uplifting [memoryRemap] best 3491 combination reg byte a [ memoryRemap::$7 ]
Attempting to uplift remaining variables inzp[1]:21 [ memoryRemap::$8 ]
Uplifting [memoryRemap] best 3485 combination reg byte a [ memoryRemap::$8 ]
Attempting to uplift remaining variables inzp[1]:22 [ memoryRemap::$9 ]
Uplifting [memoryRemap] best 3479 combination reg byte a [ memoryRemap::$9 ]
Attempting to uplift remaining variables inzp[1]:23 [ memoryRemap::zVal ]
Uplifting [memoryRemap] best 3479 combination zp[1]:23 [ memoryRemap::zVal ]
Attempting to uplift remaining variables inzp[1]:12 [ memoryRemap::$1 ]
Uplifting [memoryRemap] best 3479 combination zp[1]:12 [ memoryRemap::$1 ]
Attempting to uplift remaining variables inzp[1]:19 [ memoryRemap::$6 ]
Uplifting [memoryRemap] best 3479 combination zp[1]:19 [ memoryRemap::$6 ]
Uplifting [memoryRemap] best 4814 combination reg byte a [ memoryRemap::$2 ] reg byte a [ memoryRemap::$3 ] reg byte a [ memoryRemap::$7 ] zp[1]:18 [ memoryRemap::$8 ] zp[1]:19 [ memoryRemap::zVal ] zp[2]:4 [ memoryRemap::lowerPageOffset#4 ] zp[1]:11 [ memoryRemap::$1 ] zp[1]:16 [ memoryRemap::$6 ] zp[1]:6 [ memoryRemap::remapBlocks#4 ] zp[2]:7 [ memoryRemap::upperPageOffset#4 ] zp[1]:15 [ memoryRemap::yVal ] zp[1]:14 [ memoryRemap::xVal ] zp[1]:10 [ memoryRemap::aVal ]
Limited combination testing to 100 combinations of 40000 possible.
Uplifting [main] best 3524 combination reg byte y [ main::i#2 main::i#1 ] reg byte x [ main::mem_destroy_i#2 main::mem_destroy_i#1 ]
Uplifting [irq] best 3491 combination reg byte a [ irq::raster#0 ]
Uplifting [memcpy_dma4] best 3485 combination reg byte x [ memcpy_dma4::dmaMode#0 ]
Uplifting [MOS6526_CIA] best 3485 combination
Uplifting [MOS6569_VICII] best 3485 combination
Uplifting [MOS6581_SID] best 3485 combination
Uplifting [MOS4569_VICIII] best 3485 combination
Uplifting [MEGA65_VICIV] best 3485 combination
Uplifting [memoryRemapBlock] best 3485 combination
Uplifting [F018_DMAGIC] best 3485 combination
Uplifting [DMA_LIST_F018A] best 3485 combination
Uplifting [DMA_LIST_F018B] best 3485 combination
Uplifting [] best 3485 combination mem[12] [ memcpy_dma_command4 ]
Attempting to uplift remaining variables inzp[1]:18 [ memoryRemap::$8 ]
Uplifting [memoryRemap] best 3479 combination reg byte a [ memoryRemap::$8 ]
Attempting to uplift remaining variables inzp[1]:19 [ memoryRemap::zVal ]
Uplifting [memoryRemap] best 3479 combination zp[1]:19 [ memoryRemap::zVal ]
Attempting to uplift remaining variables inzp[1]:11 [ memoryRemap::$1 ]
Uplifting [memoryRemap] best 3479 combination zp[1]:11 [ memoryRemap::$1 ]
Attempting to uplift remaining variables inzp[1]:16 [ memoryRemap::$6 ]
Uplifting [memoryRemap] best 3479 combination zp[1]:16 [ memoryRemap::$6 ]
Attempting to uplift remaining variables inzp[1]:6 [ memoryRemap::remapBlocks#4 ]
Uplifting [memoryRemap] best 3463 combination reg byte z [ memoryRemap::remapBlocks#4 ]
Attempting to uplift remaining variables inzp[1]:18 [ memoryRemap::yVal ]
Uplifting [memoryRemap] best 3463 combination zp[1]:18 [ memoryRemap::yVal ]
Attempting to uplift remaining variables inzp[1]:16 [ memoryRemap::xVal ]
Uplifting [memoryRemap] best 3463 combination zp[1]:16 [ memoryRemap::xVal ]
Attempting to uplift remaining variables inzp[1]:11 [ memoryRemap::aVal ]
Uplifting [memoryRemap] best 3463 combination zp[1]:11 [ memoryRemap::aVal ]
Attempting to uplift remaining variables inzp[1]:15 [ memoryRemap::yVal ]
Uplifting [memoryRemap] best 3463 combination zp[1]:15 [ memoryRemap::yVal ]
Attempting to uplift remaining variables inzp[1]:14 [ memoryRemap::xVal ]
Uplifting [memoryRemap] best 3463 combination zp[1]:14 [ memoryRemap::xVal ]
Attempting to uplift remaining variables inzp[1]:10 [ memoryRemap::aVal ]
Uplifting [memoryRemap] best 3463 combination zp[1]:10 [ memoryRemap::aVal ]
Allocated (was zp[2]:4) zp[2]:2 [ memoryRemap::lowerPageOffset#4 ]
Allocated (was zp[2]:7) zp[2]:4 [ memoryRemap::upperPageOffset#4 ]
Allocated (was zp[1]:11) zp[1]:6 [ memoryRemap::aVal ]
Allocated (was zp[1]:12) zp[1]:7 [ memoryRemap::$1 ]
Allocated (was zp[1]:16) zp[1]:8 [ memoryRemap::xVal ]
Allocated (was zp[1]:18) zp[1]:9 [ memoryRemap::yVal ]
Allocated (was zp[1]:19) zp[1]:10 [ memoryRemap::$6 ]
Allocated (was zp[1]:23) zp[1]:11 [ memoryRemap::zVal ]
Allocated (was zp[1]:10) zp[1]:6 [ memoryRemap::aVal ]
Allocated (was zp[1]:11) zp[1]:7 [ memoryRemap::$1 ]
Allocated (was zp[1]:14) zp[1]:8 [ memoryRemap::xVal ]
Allocated (was zp[1]:15) zp[1]:9 [ memoryRemap::yVal ]
Allocated (was zp[1]:16) zp[1]:10 [ memoryRemap::$6 ]
Allocated (was zp[1]:19) zp[1]:11 [ memoryRemap::zVal ]
Interrupt procedure irq clobbers AXYZcnzvidePSB
ASSEMBLER BEFORE OPTIMIZATION
@ -1420,7 +1338,9 @@ main: {
// memoryPage: Page address of the memory that the block should point to in the 1MB memory space of the MEGA65.
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
memoryRemapBlock: {
// Find the page offset (the number of pages to offset the block)
.const pageOffset = $100-$40
// Which block is being remapped? (0-7)
.const block = $40>>5
.const blockBits = 1<<block
// [38] call memoryRemap
@ -1480,44 +1400,40 @@ memoryRemap: {
.label __6 = $a
.label lowerPageOffset = 2
.label upperPageOffset = 4
// [41] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#4 -- vbuaa=_byte0_vwuz1
lda.z lowerPageOffset
// [42] memoryRemap::aVal = memoryRemap::$0 -- vbuz1=vbuaa
// [41] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#4 -- vbuz1=_byte0_vwuz2
// lower blocks offset page low
lda.z lowerPageOffset
sta.z aVal
// [43] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 -- vbuz1=vbuzz_rol_4
// [42] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 -- vbuz1=vbuzz_rol_4
tza
asl
asl
asl
asl
sta.z __1
// [44] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4 -- vbuaa=_byte1_vwuz1
// [43] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4 -- vbuaa=_byte1_vwuz1
lda.z lowerPageOffset+1
// [45] memoryRemap::$3 = memoryRemap::$2 & $f -- vbuaa=vbuaa_band_vbuc1
// [44] memoryRemap::$3 = memoryRemap::$2 & $f -- vbuaa=vbuaa_band_vbuc1
and #$f
// [46] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3 -- vbuaa=vbuz1_bor_vbuaa
ora.z __1
// [47] memoryRemap::xVal = memoryRemap::$4 -- vbuz1=vbuaa
// [45] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3 -- vbuz1=vbuz2_bor_vbuaa
// lower blocks to map + lower blocks offset high nibble
ora.z __1
sta.z xVal
// [48] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#4 -- vbuaa=_byte0_vwuz1
lda.z upperPageOffset
// [49] memoryRemap::yVal = memoryRemap::$5 -- vbuz1=vbuaa
// [46] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#4 -- vbuz1=_byte0_vwuz2
// upper blocks offset page
lda.z upperPageOffset
sta.z yVal
// [50] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 -- vbuz1=vbuzz_band_vbuc1
// [47] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 -- vbuz1=vbuzz_band_vbuc1
tza
and #$f0
sta.z __6
// [51] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4 -- vbuaa=_byte1_vwuz1
// [48] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4 -- vbuaa=_byte1_vwuz1
lda.z upperPageOffset+1
// [52] memoryRemap::$8 = memoryRemap::$7 & $f -- vbuaa=vbuaa_band_vbuc1
// [49] memoryRemap::$8 = memoryRemap::$7 & $f -- vbuaa=vbuaa_band_vbuc1
and #$f
// [53] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8 -- vbuaa=vbuz1_bor_vbuaa
ora.z __6
// [54] memoryRemap::zVal = memoryRemap::$9 -- vbuz1=vbuaa
// [50] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8 -- vbuz1=vbuz2_bor_vbuaa
// upper blocks to map + upper blocks offset page high nibble
ora.z __6
sta.z zVal
// asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
lda aVal
@ -1529,7 +1445,7 @@ memoryRemap: {
jmp __breturn
// memoryRemap::@return
__breturn:
// [56] return
// [52] return
rts
}
// memcpy_dma4
@ -1546,56 +1462,56 @@ memcpy_dma4: {
.const src_bank = 0
.label dest = 0
.label src = upperCodeData
// [57] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) -- vbuxx=_deref_pbuc1
// [53] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) -- vbuxx=_deref_pbuc1
// Remember current F018 A/B mode
ldx DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B
// [58] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 -- _deref_pwuc1=vwuc2
// [54] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 -- _deref_pwuc1=vwuc2
// Set up command
lda #<num
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT
lda #>num
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT+1
// [59] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 -- _deref_pbuc1=vbuc2
// [55] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 -- _deref_pbuc1=vbuc2
lda #src_bank
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK
// [60] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 -- _deref_qbuc1=pbuc2
// [56] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 -- _deref_qbuc1=pbuc2
lda #<src
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC
lda #>src
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC+1
// [61] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 -- _deref_pbuc1=vbuc2
// [57] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 -- _deref_pbuc1=vbuc2
lda #dest_bank
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
// [62] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 -- _deref_qbuc1=pbuc2
// [58] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 -- _deref_qbuc1=pbuc2
lda #<dest
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST
lda #>dest
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST+1
// [63] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 -- _deref_pbuc1=vbuc2
// [59] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 -- _deref_pbuc1=vbuc2
// Set F018B mode
lda #1
sta DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B
// [64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 -- _deref_pbuc1=vbuc2
// [60] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 -- _deref_pbuc1=vbuc2
// Set address of DMA list
lda #0
sta DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB
// [65] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 -- _deref_pbuc1=vbuc2
// [61] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 -- _deref_pbuc1=vbuc2
lda #0
sta DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK
// [66] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
// [62] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
lda #>memcpy_dma_command4
sta DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB
// [67] *((byte*)DMA) = byte0 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
// [63] *((byte*)DMA) = byte0 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
// Trigger the DMA (without option lists)
lda #<memcpy_dma_command4
sta DMA
// [68] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0 -- _deref_pbuc1=vbuxx
// [64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0 -- _deref_pbuc1=vbuxx
// Re-enable F018A mode
stx DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B
jmp __breturn
// memcpy_dma4::@return
__breturn:
// [69] return
// [65] return
rts
}
// File Data
@ -1734,25 +1650,21 @@ byte memcpy_dma4::src_bank
constant byte memcpy_dma4::src_bank#0 src_bank = 0
volatile struct DMA_LIST_F018B memcpy_dma_command4 loadstore mem[12] = { command: DMA_COMMAND_COPY, count: 0, src: 0, src_bank: 0, dest: 0, dest_bank: 0, sub_command: 0, modulo: 0 }
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0 reg byte a 202.0
byte~ memoryRemap::$1 zp[1]:7 67.33333333333333
byte~ memoryRemap::$2 reg byte a 202.0
byte~ memoryRemap::$3 reg byte a 202.0
byte~ memoryRemap::$4 reg byte a 202.0
byte~ memoryRemap::$5 reg byte a 202.0
byte~ memoryRemap::$6 zp[1]:10 67.33333333333333
byte~ memoryRemap::$7 reg byte a 202.0
byte~ memoryRemap::$8 reg byte a 202.0
byte~ memoryRemap::$9 reg byte a 202.0
volatile byte memoryRemap::aVal loadstore zp[1]:6 7.769230769230769
volatile byte memoryRemap::aVal loadstore zp[1]:6 10.1
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#4 lowerPageOffset zp[2]:2 50.5
word memoryRemap::lowerPageOffset#4 lowerPageOffset zp[2]:2 67.33333333333333
byte memoryRemap::remapBlocks
byte memoryRemap::remapBlocks#4 reg byte z 20.2
byte memoryRemap::remapBlocks#4 reg byte z 28.857142857142858
word memoryRemap::upperPageOffset
word memoryRemap::upperPageOffset#4 upperPageOffset zp[2]:4 18.363636363636363
volatile byte memoryRemap::xVal loadstore zp[1]:8 12.625
volatile byte memoryRemap::yVal loadstore zp[1]:9 16.833333333333332
word memoryRemap::upperPageOffset#4 upperPageOffset zp[2]:4 25.25
volatile byte memoryRemap::xVal loadstore zp[1]:8 16.833333333333332
volatile byte memoryRemap::yVal loadstore zp[1]:9 20.2
volatile byte memoryRemap::zVal loadstore zp[1]:11 101.0
void memoryRemapBlock(byte memoryRemapBlock::blockPage , word memoryRemapBlock::memoryPage)
byte memoryRemapBlock::block
@ -1774,19 +1686,15 @@ zp[2]:2 [ memoryRemap::lowerPageOffset#4 ]
reg byte z [ memoryRemap::remapBlocks#4 ]
zp[2]:4 [ memoryRemap::upperPageOffset#4 ]
reg byte a [ irq::raster#0 ]
reg byte a [ memoryRemap::$0 ]
zp[1]:6 [ memoryRemap::aVal ]
zp[1]:7 [ memoryRemap::$1 ]
reg byte a [ memoryRemap::$2 ]
reg byte a [ memoryRemap::$3 ]
reg byte a [ memoryRemap::$4 ]
zp[1]:8 [ memoryRemap::xVal ]
reg byte a [ memoryRemap::$5 ]
zp[1]:9 [ memoryRemap::yVal ]
zp[1]:10 [ memoryRemap::$6 ]
reg byte a [ memoryRemap::$7 ]
reg byte a [ memoryRemap::$8 ]
reg byte a [ memoryRemap::$9 ]
zp[1]:11 [ memoryRemap::zVal ]
reg byte x [ memcpy_dma4::dmaMode#0 ]
mem[12] [ memcpy_dma_command4 ]
@ -2105,7 +2013,9 @@ main: {
// memoryPage: Page address of the memory that the block should point to in the 1MB memory space of the MEGA65.
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
memoryRemapBlock: {
// Find the page offset (the number of pages to offset the block)
.const pageOffset = $100-$40
// Which block is being remapped? (0-7)
.const block = $40>>5
.const blockBits = 1<<block
// memoryRemap(blockBits, pageOffset, pageOffset)
@ -2164,15 +2074,13 @@ memoryRemap: {
.label __6 = $a
.label lowerPageOffset = 2
.label upperPageOffset = 4
// BYTE0(lowerPageOffset)
// [41] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#4 -- vbuaa=_byte0_vwuz1
lda.z lowerPageOffset
// char aVal = BYTE0(lowerPageOffset)
// [42] memoryRemap::aVal = memoryRemap::$0 -- vbuz1=vbuaa
// [41] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#4 -- vbuz1=_byte0_vwuz2
// lower blocks offset page low
lda.z lowerPageOffset
sta.z aVal
// remapBlocks << 4
// [43] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 -- vbuz1=vbuzz_rol_4
// [42] memoryRemap::$1 = memoryRemap::remapBlocks#4 << 4 -- vbuz1=vbuzz_rol_4
tza
asl
asl
@ -2180,42 +2088,36 @@ memoryRemap: {
asl
sta.z __1
// BYTE1(lowerPageOffset)
// [44] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4 -- vbuaa=_byte1_vwuz1
// [43] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#4 -- vbuaa=_byte1_vwuz1
lda.z lowerPageOffset+1
// BYTE1(lowerPageOffset) & 0xf
// [45] memoryRemap::$3 = memoryRemap::$2 & $f -- vbuaa=vbuaa_band_vbuc1
// [44] memoryRemap::$3 = memoryRemap::$2 & $f -- vbuaa=vbuaa_band_vbuc1
and #$f
// (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
// [46] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3 -- vbuaa=vbuz1_bor_vbuaa
ora.z __1
// char xVal = (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
// [47] memoryRemap::xVal = memoryRemap::$4 -- vbuz1=vbuaa
// [45] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3 -- vbuz1=vbuz2_bor_vbuaa
// lower blocks to map + lower blocks offset high nibble
ora.z __1
sta.z xVal
// BYTE0(upperPageOffset)
// [48] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#4 -- vbuaa=_byte0_vwuz1
lda.z upperPageOffset
// char yVal = BYTE0(upperPageOffset)
// [49] memoryRemap::yVal = memoryRemap::$5 -- vbuz1=vbuaa
// [46] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#4 -- vbuz1=_byte0_vwuz2
// upper blocks offset page
lda.z upperPageOffset
sta.z yVal
// remapBlocks & 0xf0
// [50] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 -- vbuz1=vbuzz_band_vbuc1
// [47] memoryRemap::$6 = memoryRemap::remapBlocks#4 & $f0 -- vbuz1=vbuzz_band_vbuc1
tza
and #$f0
sta.z __6
// BYTE1(upperPageOffset)
// [51] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4 -- vbuaa=_byte1_vwuz1
// [48] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#4 -- vbuaa=_byte1_vwuz1
lda.z upperPageOffset+1
// BYTE1(upperPageOffset) & 0xf
// [52] memoryRemap::$8 = memoryRemap::$7 & $f -- vbuaa=vbuaa_band_vbuc1
// [49] memoryRemap::$8 = memoryRemap::$7 & $f -- vbuaa=vbuaa_band_vbuc1
and #$f
// (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
// [53] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8 -- vbuaa=vbuz1_bor_vbuaa
ora.z __6
// char zVal = (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
// [54] memoryRemap::zVal = memoryRemap::$9 -- vbuz1=vbuaa
// [50] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8 -- vbuz1=vbuz2_bor_vbuaa
// upper blocks to map + upper blocks offset page high nibble
ora.z __6
sta.z zVal
// asm
// asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
@ -2227,7 +2129,7 @@ memoryRemap: {
eom
// memoryRemap::@return
// }
// [56] return
// [52] return
rts
}
// memcpy_dma4
@ -2245,65 +2147,65 @@ memcpy_dma4: {
.label dest = 0
.label src = upperCodeData
// char dmaMode = DMA->EN018B
// [57] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) -- vbuxx=_deref_pbuc1
// [53] memcpy_dma4::dmaMode#0 = *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) -- vbuxx=_deref_pbuc1
// Remember current F018 A/B mode
ldx DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B
// memcpy_dma_command4.count = num
// [58] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 -- _deref_pwuc1=vwuc2
// [54] *((word*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = memcpy_dma4::num#0 -- _deref_pwuc1=vwuc2
// Set up command
lda #<num
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT
lda #>num
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_COUNT+1
// memcpy_dma_command4.src_bank = src_bank
// [59] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 -- _deref_pbuc1=vbuc2
// [55] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK) = memcpy_dma4::src_bank#0 -- _deref_pbuc1=vbuc2
lda #src_bank
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK
// memcpy_dma_command4.src = src
// [60] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 -- _deref_qbuc1=pbuc2
// [56] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0 -- _deref_qbuc1=pbuc2
lda #<src
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC
lda #>src
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC+1
// memcpy_dma_command4.dest_bank = dest_bank
// [61] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 -- _deref_pbuc1=vbuc2
// [57] *((byte*)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK) = memcpy_dma4::dest_bank#0 -- _deref_pbuc1=vbuc2
lda #dest_bank
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
// memcpy_dma_command4.dest = dest
// [62] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 -- _deref_qbuc1=pbuc2
// [58] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0 -- _deref_qbuc1=pbuc2
lda #<dest
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST
lda #>dest
sta memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST+1
// DMA->EN018B = 1
// [63] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 -- _deref_pbuc1=vbuc2
// [59] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1 -- _deref_pbuc1=vbuc2
// Set F018B mode
lda #1
sta DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B
// DMA->ADDRMB = 0
// [64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 -- _deref_pbuc1=vbuc2
// [60] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0 -- _deref_pbuc1=vbuc2
// Set address of DMA list
lda #0
sta DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB
// DMA->ADDRBANK = 0
// [65] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 -- _deref_pbuc1=vbuc2
// [61] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0 -- _deref_pbuc1=vbuc2
sta DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK
// DMA-> ADDRMSB = BYTE1(&memcpy_dma_command4)
// [66] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
// [62] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
lda #>memcpy_dma_command4
sta DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB
// DMA-> ADDRLSBTRIG = BYTE0(&memcpy_dma_command4)
// [67] *((byte*)DMA) = byte0 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
// [63] *((byte*)DMA) = byte0 &memcpy_dma_command4 -- _deref_pbuc1=vbuc2
// Trigger the DMA (without option lists)
lda #<memcpy_dma_command4
sta DMA
// DMA->EN018B = dmaMode
// [68] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0 -- _deref_pbuc1=vbuxx
// [64] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memcpy_dma4::dmaMode#0 -- _deref_pbuc1=vbuxx
// Re-enable F018A mode
stx DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B
// memcpy_dma4::@return
// }
// [69] return
// [65] return
rts
}
// File Data

View File

@ -60,25 +60,21 @@ byte memcpy_dma4::src_bank
constant byte memcpy_dma4::src_bank#0 src_bank = 0
volatile struct DMA_LIST_F018B memcpy_dma_command4 loadstore mem[12] = { command: DMA_COMMAND_COPY, count: 0, src: 0, src_bank: 0, dest: 0, dest_bank: 0, sub_command: 0, modulo: 0 }
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0 reg byte a 202.0
byte~ memoryRemap::$1 zp[1]:7 67.33333333333333
byte~ memoryRemap::$2 reg byte a 202.0
byte~ memoryRemap::$3 reg byte a 202.0
byte~ memoryRemap::$4 reg byte a 202.0
byte~ memoryRemap::$5 reg byte a 202.0
byte~ memoryRemap::$6 zp[1]:10 67.33333333333333
byte~ memoryRemap::$7 reg byte a 202.0
byte~ memoryRemap::$8 reg byte a 202.0
byte~ memoryRemap::$9 reg byte a 202.0
volatile byte memoryRemap::aVal loadstore zp[1]:6 7.769230769230769
volatile byte memoryRemap::aVal loadstore zp[1]:6 10.1
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#4 lowerPageOffset zp[2]:2 50.5
word memoryRemap::lowerPageOffset#4 lowerPageOffset zp[2]:2 67.33333333333333
byte memoryRemap::remapBlocks
byte memoryRemap::remapBlocks#4 reg byte z 20.2
byte memoryRemap::remapBlocks#4 reg byte z 28.857142857142858
word memoryRemap::upperPageOffset
word memoryRemap::upperPageOffset#4 upperPageOffset zp[2]:4 18.363636363636363
volatile byte memoryRemap::xVal loadstore zp[1]:8 12.625
volatile byte memoryRemap::yVal loadstore zp[1]:9 16.833333333333332
word memoryRemap::upperPageOffset#4 upperPageOffset zp[2]:4 25.25
volatile byte memoryRemap::xVal loadstore zp[1]:8 16.833333333333332
volatile byte memoryRemap::yVal loadstore zp[1]:9 20.2
volatile byte memoryRemap::zVal loadstore zp[1]:11 101.0
void memoryRemapBlock(byte memoryRemapBlock::blockPage , word memoryRemapBlock::memoryPage)
byte memoryRemapBlock::block
@ -100,19 +96,15 @@ zp[2]:2 [ memoryRemap::lowerPageOffset#4 ]
reg byte z [ memoryRemap::remapBlocks#4 ]
zp[2]:4 [ memoryRemap::upperPageOffset#4 ]
reg byte a [ irq::raster#0 ]
reg byte a [ memoryRemap::$0 ]
zp[1]:6 [ memoryRemap::aVal ]
zp[1]:7 [ memoryRemap::$1 ]
reg byte a [ memoryRemap::$2 ]
reg byte a [ memoryRemap::$3 ]
reg byte a [ memoryRemap::$4 ]
zp[1]:8 [ memoryRemap::xVal ]
reg byte a [ memoryRemap::$5 ]
zp[1]:9 [ memoryRemap::yVal ]
zp[1]:10 [ memoryRemap::$6 ]
reg byte a [ memoryRemap::$7 ]
reg byte a [ memoryRemap::$8 ]
reg byte a [ memoryRemap::$9 ]
zp[1]:11 [ memoryRemap::zVal ]
reg byte x [ memcpy_dma4::dmaMode#0 ]
mem[12] [ memcpy_dma_command4 ]

View File

@ -15,6 +15,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::xVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
CONTROL FLOW GRAPH SSA
@ -23,20 +27,16 @@ memoryRemap: scope:[memoryRemap] from main
memoryRemap::upperPageOffset#1 = phi( main/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( main/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( main/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -85,16 +85,12 @@ constant byte OFFSET_STRUCT_F018_DMAGIC_EN018B = 3
void __start()
void main()
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -113,12 +109,10 @@ Adding number conversion cast (unumber) $50 in
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) 0 in memoryRemap::remapBlocks#0 = 0
Adding number conversion cast (unumber) 0 in memoryRemap::lowerPageOffset#0 = 0
Adding number conversion cast (unumber) 0 in memoryRemap::upperPageOffset#0 = 0
@ -164,14 +158,8 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
@ -180,7 +168,7 @@ Constant memoryRemap::remapBlocks#0 = 0
Constant memoryRemap::lowerPageOffset#0 = 0
Constant memoryRemap::upperPageOffset#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero (byte*)DMA in [25] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &DMA_SCREEN_UP
Simplifying expression containing zero (byte*)DMA in [21] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &DMA_SCREEN_UP
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG
Successful SSA optimization PassNEliminateUnusedVars
@ -189,33 +177,27 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [0] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [2] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [3] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [7] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [9] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [10] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [1] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [2] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [6] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [7] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [5] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [12] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [4] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [9] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
@ -223,28 +205,21 @@ Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Constant right-side identified [1] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [5] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [4] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
Eliminating unused constant memoryRemap::$2
Eliminating unused constant memoryRemap::$7
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined memoryRemap::$4 = 0
Constant inlined memoryRemap::$5 = 0
Constant inlined memoryRemap::$8 = 0
Constant inlined memoryRemap::$0 = 0
Constant inlined memoryRemap::$9 = 0
Constant inlined memoryRemap::$3 = 0
Successful SSA optimization Pass2ConstantInlining
Finalized unsigned number type (byte) 8

View File

@ -41,6 +41,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::xVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement memcpy_dma_command4
Eliminating unused variable with no statement memset_dma_command
@ -51,20 +55,16 @@ memoryRemap: scope:[memoryRemap] from main
memoryRemap::upperPageOffset#1 = phi( main/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( main/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( main/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -148,16 +148,12 @@ void* memcpy_dma::src#0
void* memcpy_dma::src#1
volatile struct DMA_LIST_F018B memcpy_dma_command loadstore = { command: DMA_COMMAND_COPY, count: 0, src: 0, src_bank: 0, dest: 0, dest_bank: 0, sub_command: 0, modulo: 0 }
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -175,12 +171,10 @@ volatile byte memoryRemap::zVal loadstore
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) 1 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
@ -227,14 +221,8 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $50
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
@ -242,7 +230,7 @@ Identical Phi Values memcpy_dma::num#1 memcpy_dma::num#0
Identical Phi Values memcpy_dma::src#1 memcpy_dma::src#0
Identical Phi Values memcpy_dma::dest#1 memcpy_dma::dest#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [35] memcpy_dma::num#0 = (unumber)$18*$50
Constant right-side identified [31] memcpy_dma::num#0 = (unumber)$18*$50
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::remapBlocks#0 = 0
Constant memoryRemap::lowerPageOffset#0 = 0
@ -251,10 +239,10 @@ Constant memcpy_dma::dest#0 = (void*)DEFAULT_SCREEN
Constant memcpy_dma::src#0 = (void*)DEFAULT_SCREEN+$50
Constant memcpy_dma::num#0 = (unumber)$18*$50
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memcpy_dma::src#0 in [20] *((byte**)&memcpy_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma::src#0
Constant value identified (byte*)memcpy_dma::dest#0 in [21] *((byte**)&memcpy_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma::dest#0
Constant value identified (byte*)memcpy_dma::src#0 in [16] *((byte**)&memcpy_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma::src#0
Constant value identified (byte*)memcpy_dma::dest#0 in [17] *((byte**)&memcpy_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma::dest#0
Successful SSA optimization Pass2ConstantValues
Simplifying expression containing zero (byte*)DMA in [26] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memcpy_dma_command
Simplifying expression containing zero (byte*)DMA in [22] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memcpy_dma_command
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG
Successful SSA optimization PassNEliminateUnusedVars
@ -263,33 +251,27 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [0] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [2] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [3] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [7] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [9] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [10] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [1] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [2] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [6] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [7] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [5] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [12] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [4] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [9] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
@ -297,28 +279,21 @@ Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Constant right-side identified [1] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [5] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [4] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
Eliminating unused constant memoryRemap::$2
Eliminating unused constant memoryRemap::$7
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined memoryRemap::$4 = 0
Constant inlined memoryRemap::$5 = 0
Constant inlined memoryRemap::$8 = 0
Constant inlined memoryRemap::$0 = 0
Constant inlined memoryRemap::$9 = 0
Constant inlined memoryRemap::$3 = 0
Successful SSA optimization Pass2ConstantInlining
Finalized unsigned number type (byte) 8

View File

@ -41,6 +41,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::xVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement memcpy_dma_command
Eliminating unused variable with no statement memset_dma_command
@ -51,20 +55,16 @@ memoryRemap: scope:[memoryRemap] from main
memoryRemap::upperPageOffset#1 = phi( main/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( main/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( main/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -162,16 +162,12 @@ byte memcpy_dma4::src_bank#0
byte memcpy_dma4::src_bank#1
volatile struct DMA_LIST_F018B memcpy_dma_command4 loadstore = { command: DMA_COMMAND_COPY, count: 0, src: 0, src_bank: 0, dest: 0, dest_bank: 0, sub_command: 0, modulo: 0 }
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -189,12 +185,10 @@ volatile byte memoryRemap::zVal loadstore
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) 1 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
@ -249,14 +243,8 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $50
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
@ -266,7 +254,7 @@ Identical Phi Values memcpy_dma4::src#1 memcpy_dma4::src#0
Identical Phi Values memcpy_dma4::dest_bank#1 memcpy_dma4::dest_bank#0
Identical Phi Values memcpy_dma4::dest#1 memcpy_dma4::dest#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [39] memcpy_dma4::num#0 = (unumber)$18*$50
Constant right-side identified [35] memcpy_dma4::num#0 = (unumber)$18*$50
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::remapBlocks#0 = 0
Constant memoryRemap::lowerPageOffset#0 = 0
@ -277,10 +265,10 @@ Constant memcpy_dma4::src_bank#0 = 0
Constant memcpy_dma4::src#0 = (void*)DEFAULT_SCREEN+$50
Constant memcpy_dma4::num#0 = (unumber)$18*$50
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memcpy_dma4::src#0 in [21] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
Constant value identified (byte*)memcpy_dma4::dest#0 in [23] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
Constant value identified (byte*)memcpy_dma4::src#0 in [17] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memcpy_dma4::src#0
Constant value identified (byte*)memcpy_dma4::dest#0 in [19] *((byte**)&memcpy_dma_command4+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memcpy_dma4::dest#0
Successful SSA optimization Pass2ConstantValues
Simplifying expression containing zero (byte*)DMA in [28] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memcpy_dma_command4
Simplifying expression containing zero (byte*)DMA in [24] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memcpy_dma_command4
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG
Successful SSA optimization PassNEliminateUnusedVars
@ -289,33 +277,27 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [0] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [2] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [3] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [7] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [9] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [10] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [1] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [2] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [6] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [7] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [5] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [12] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [4] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [9] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
@ -323,28 +305,21 @@ Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Constant right-side identified [1] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [5] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [4] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
Eliminating unused constant memoryRemap::$2
Eliminating unused constant memoryRemap::$7
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined memoryRemap::$4 = 0
Constant inlined memoryRemap::$5 = 0
Constant inlined memoryRemap::$8 = 0
Constant inlined memoryRemap::$0 = 0
Constant inlined memoryRemap::$9 = 0
Constant inlined memoryRemap::$3 = 0
Successful SSA optimization Pass2ConstantInlining
Finalized unsigned number type (byte) 8

View File

@ -41,6 +41,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::xVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement memcpy_dma_command
Eliminating unused variable with no statement memcpy_dma_command4
Eliminating unused variable with no statement memset_dma_command
@ -52,20 +56,16 @@ memoryRemap: scope:[memoryRemap] from main
memoryRemap::upperPageOffset#1 = phi( main/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( main/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( main/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -208,16 +208,12 @@ byte memcpy_dma256::src_mb#0
byte memcpy_dma256::src_mb#1
constant byte* memcpy_dma_command256[] = { DMA_OPTION_SRC_MB, 0, DMA_OPTION_DEST_MB, 0, DMA_OPTION_FORMAT_F018B, DMA_OPTION_END, DMA_COMMAND_COPY, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -235,12 +231,10 @@ volatile byte memoryRemap::zVal loadstore
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) 1 in memcpy_dma_command256[1] = memcpy_dma256::src_mb#1
Adding number conversion cast (unumber) 3 in memcpy_dma_command256[3] = memcpy_dma256::dest_mb#1
Adding number conversion cast (unumber) 6 in memcpy_dma256::$0 = & memcpy_dma_command256[6]
@ -312,14 +306,8 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $50
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
@ -331,12 +319,12 @@ Identical Phi Values memcpy_dma256::src#1 memcpy_dma256::src#0
Identical Phi Values memcpy_dma256::dest_bank#1 memcpy_dma256::dest_bank#0
Identical Phi Values memcpy_dma256::dest#1 memcpy_dma256::dest#0
Successful SSA optimization Pass2IdenticalPhiElimination
Rewriting array member address-of to pointer addition [21] memcpy_dma256::$0 = memcpy_dma_command256 + 6
Rewriting array member address-of to pointer addition [17] memcpy_dma256::$0 = memcpy_dma_command256 + 6
Successful SSA optimization PassNArrayElementAddressOfRewriting
Constant right-side identified [21] memcpy_dma256::$0 = memcpy_dma_command256 + 6
Constant right-side identified [41] memcpy_dma256::$1 = byte1 memcpy_dma_command256
Constant right-side identified [43] memcpy_dma256::$2 = byte0 memcpy_dma_command256
Constant right-side identified [57] memcpy_dma256::num#0 = (unumber)$18*$50
Constant right-side identified [17] memcpy_dma256::$0 = memcpy_dma_command256 + 6
Constant right-side identified [37] memcpy_dma256::$1 = byte1 memcpy_dma_command256
Constant right-side identified [39] memcpy_dma256::$2 = byte0 memcpy_dma_command256
Constant right-side identified [53] memcpy_dma256::num#0 = (unumber)$18*$50
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memcpy_dma256::$0 = memcpy_dma_command256+6
Constant memcpy_dma256::$1 = byte1 memcpy_dma_command256
@ -360,53 +348,47 @@ Constant memcpy_dma256::$10 = (byte**)memcpy_dma256::f018b#0
Constant memcpy_dma256::$11 = (byte*)memcpy_dma256::f018b#0
Constant memcpy_dma256::$12 = (byte**)memcpy_dma256::f018b#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memcpy_dma256::src#0 in [31] *memcpy_dma256::$5 = (byte*)memcpy_dma256::src#0
Constant value identified (byte*)memcpy_dma256::dest#0 in [37] *memcpy_dma256::$7 = (byte*)memcpy_dma256::dest#0
Constant value identified (byte*)memcpy_dma256::src#0 in [27] *memcpy_dma256::$5 = (byte*)memcpy_dma256::src#0
Constant value identified (byte*)memcpy_dma256::dest#0 in [33] *memcpy_dma256::$7 = (byte*)memcpy_dma256::dest#0
Successful SSA optimization Pass2ConstantValues
Converting *(pointer+n) to pointer[n] [25] *memcpy_dma256::$3 = memcpy_dma256::num#0 -- memcpy_dma256::$8[OFFSET_STRUCT_DMA_LIST_F018B_COUNT]
Converting *(pointer+n) to pointer[n] [28] *memcpy_dma256::$4 = memcpy_dma256::src_bank#0 -- memcpy_dma256::$9[OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK]
Converting *(pointer+n) to pointer[n] [31] *memcpy_dma256::$5 = (byte*)memcpy_dma256::src#0 -- memcpy_dma256::$10[OFFSET_STRUCT_DMA_LIST_F018B_SRC]
Converting *(pointer+n) to pointer[n] [34] *memcpy_dma256::$6 = memcpy_dma256::dest_bank#0 -- memcpy_dma256::$11[OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK]
Converting *(pointer+n) to pointer[n] [37] *memcpy_dma256::$7 = (byte*)memcpy_dma256::dest#0 -- memcpy_dma256::$12[OFFSET_STRUCT_DMA_LIST_F018B_DEST]
Converting *(pointer+n) to pointer[n] [21] *memcpy_dma256::$3 = memcpy_dma256::num#0 -- memcpy_dma256::$8[OFFSET_STRUCT_DMA_LIST_F018B_COUNT]
Converting *(pointer+n) to pointer[n] [24] *memcpy_dma256::$4 = memcpy_dma256::src_bank#0 -- memcpy_dma256::$9[OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK]
Converting *(pointer+n) to pointer[n] [27] *memcpy_dma256::$5 = (byte*)memcpy_dma256::src#0 -- memcpy_dma256::$10[OFFSET_STRUCT_DMA_LIST_F018B_SRC]
Converting *(pointer+n) to pointer[n] [30] *memcpy_dma256::$6 = memcpy_dma256::dest_bank#0 -- memcpy_dma256::$11[OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK]
Converting *(pointer+n) to pointer[n] [33] *memcpy_dma256::$7 = (byte*)memcpy_dma256::dest#0 -- memcpy_dma256::$12[OFFSET_STRUCT_DMA_LIST_F018B_DEST]
Successful SSA optimization Pass2InlineDerefIdx
Eliminating unused variable memcpy_dma256::$3 and assignment [19] memcpy_dma256::$3 = memcpy_dma256::$8 + OFFSET_STRUCT_DMA_LIST_F018B_COUNT
Eliminating unused variable memcpy_dma256::$4 and assignment [21] memcpy_dma256::$4 = memcpy_dma256::$9 + OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK
Eliminating unused variable memcpy_dma256::$5 and assignment [23] memcpy_dma256::$5 = memcpy_dma256::$10 + OFFSET_STRUCT_DMA_LIST_F018B_SRC
Eliminating unused variable memcpy_dma256::$6 and assignment [25] memcpy_dma256::$6 = memcpy_dma256::$11 + OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
Eliminating unused variable memcpy_dma256::$7 and assignment [27] memcpy_dma256::$7 = memcpy_dma256::$12 + OFFSET_STRUCT_DMA_LIST_F018B_DEST
Eliminating unused variable memcpy_dma256::$3 and assignment [15] memcpy_dma256::$3 = memcpy_dma256::$8 + OFFSET_STRUCT_DMA_LIST_F018B_COUNT
Eliminating unused variable memcpy_dma256::$4 and assignment [17] memcpy_dma256::$4 = memcpy_dma256::$9 + OFFSET_STRUCT_DMA_LIST_F018B_SRC_BANK
Eliminating unused variable memcpy_dma256::$5 and assignment [19] memcpy_dma256::$5 = memcpy_dma256::$10 + OFFSET_STRUCT_DMA_LIST_F018B_SRC
Eliminating unused variable memcpy_dma256::$6 and assignment [21] memcpy_dma256::$6 = memcpy_dma256::$11 + OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
Eliminating unused variable memcpy_dma256::$7 and assignment [23] memcpy_dma256::$7 = memcpy_dma256::$12 + OFFSET_STRUCT_DMA_LIST_F018B_DEST
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [0] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [2] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [3] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [7] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [9] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [10] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [1] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [2] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [6] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [7] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [5] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [12] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [4] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [9] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
@ -414,17 +396,14 @@ Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Constant right-side identified [1] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [5] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [4] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
@ -432,19 +411,15 @@ Eliminating unused constant memoryRemap::$2
Eliminating unused constant memoryRemap::$7
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined memcpy_dma256::$9 = (byte*)memcpy_dma256::f018b#0
Constant inlined memcpy_dma256::$2 = byte0 memcpy_dma_command256
Constant inlined memcpy_dma256::$1 = byte1 memcpy_dma_command256
Constant inlined memcpy_dma256::$8 = (word*)memcpy_dma256::f018b#0
Constant inlined memoryRemap::$0 = 0
Constant inlined memcpy_dma256::$0 = memcpy_dma_command256+6
Constant inlined memoryRemap::$3 = 0
Constant inlined memoryRemap::$4 = 0
Constant inlined memcpy_dma256::$12 = (byte**)memcpy_dma256::f018b#0
Constant inlined memoryRemap::$5 = 0
Constant inlined memcpy_dma256::$2 = byte0 memcpy_dma_command256
Constant inlined memcpy_dma256::$10 = (byte**)memcpy_dma256::f018b#0
Constant inlined memcpy_dma256::$1 = byte1 memcpy_dma_command256
Constant inlined memcpy_dma256::$11 = (byte*)memcpy_dma256::f018b#0
Constant inlined memoryRemap::$8 = 0
Constant inlined memoryRemap::$9 = 0
Constant inlined memcpy_dma256::$8 = (word*)memcpy_dma256::f018b#0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(memcpy_dma_command256+1)
Consolidated array index constant in *(memcpy_dma_command256+3)

View File

@ -41,6 +41,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::xVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement memcpy_dma_command
Eliminating unused variable with no statement memcpy_dma_command4
@ -51,20 +55,16 @@ memoryRemap: scope:[memoryRemap] from main
memoryRemap::upperPageOffset#1 = phi( main/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( main/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( main/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -135,16 +135,12 @@ constant byte OFFSET_STRUCT_F018_DMAGIC_EN018B = 3
void __start()
void main()
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -175,12 +171,10 @@ volatile struct DMA_LIST_F018B memset_dma_command loadstore = { command: DMA_COM
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) 1 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
@ -223,14 +217,8 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
@ -238,7 +226,7 @@ Identical Phi Values memset_dma::num#1 memset_dma::num#0
Identical Phi Values memset_dma::fill#1 memset_dma::fill#0
Identical Phi Values memset_dma::dest#1 memset_dma::dest#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [35] memset_dma::num#0 = (unumber)$50*$a
Constant right-side identified [31] memset_dma::num#0 = (unumber)$50*$a
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::remapBlocks#0 = 0
Constant memoryRemap::lowerPageOffset#0 = 0
@ -247,10 +235,10 @@ Constant memset_dma::dest#0 = (void*)DEFAULT_SCREEN
Constant memset_dma::fill#0 = '*'
Constant memset_dma::num#0 = (unumber)$50*$a
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memset_dma::fill#0 in [20] *((byte**)&memset_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memset_dma::fill#0
Constant value identified (byte*)memset_dma::dest#0 in [21] *((byte**)&memset_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memset_dma::dest#0
Constant value identified (byte*)memset_dma::fill#0 in [16] *((byte**)&memset_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (byte*)memset_dma::fill#0
Constant value identified (byte*)memset_dma::dest#0 in [17] *((byte**)&memset_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (byte*)memset_dma::dest#0
Successful SSA optimization Pass2ConstantValues
Simplifying expression containing zero (byte*)DMA in [26] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memset_dma_command
Simplifying expression containing zero (byte*)DMA in [22] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memset_dma_command
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG
Successful SSA optimization PassNEliminateUnusedVars
@ -259,33 +247,27 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [0] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [2] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [3] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [7] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [9] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [10] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [1] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [2] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [6] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [7] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [5] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [12] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [4] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [9] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
@ -293,28 +275,21 @@ Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Constant right-side identified [1] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [5] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [4] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
Eliminating unused constant memoryRemap::$2
Eliminating unused constant memoryRemap::$7
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined memoryRemap::$4 = 0
Constant inlined memoryRemap::$5 = 0
Constant inlined memoryRemap::$8 = 0
Constant inlined memoryRemap::$0 = 0
Constant inlined memoryRemap::$9 = 0
Constant inlined memoryRemap::$3 = 0
Successful SSA optimization Pass2ConstantInlining
Finalized unsigned number type (byte) 8

View File

@ -41,6 +41,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::xVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement memcpy_dma_command
Eliminating unused variable with no statement memcpy_dma_command4
Eliminating unused variable with no statement memset_dma_command
@ -52,20 +56,16 @@ memoryRemap: scope:[memoryRemap] from main
memoryRemap::upperPageOffset#1 = phi( main/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( main/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( main/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -158,16 +158,12 @@ constant byte OFFSET_STRUCT_F018_DMAGIC_ETRIG = 5
void __start()
void main()
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -217,12 +213,10 @@ constant byte* memset_dma_command256[] = { DMA_OPTION_DEST_MB, 0, DMA_OPTION_FO
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) 1 in memset_dma_command256[1] = memset_dma256::dest_mb#1
Adding number conversion cast (unumber) 4 in memset_dma256::$0 = & memset_dma_command256[4]
Adding number conversion cast (unumber) 1 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
@ -279,14 +273,8 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
@ -296,12 +284,12 @@ Identical Phi Values memset_dma256::dest_bank#1 memset_dma256::dest_bank#0
Identical Phi Values memset_dma256::dest#1 memset_dma256::dest#0
Identical Phi Values memset_dma256::fill#1 memset_dma256::fill#0
Successful SSA optimization Pass2IdenticalPhiElimination
Rewriting array member address-of to pointer addition [20] memset_dma256::$0 = memset_dma_command256 + 4
Rewriting array member address-of to pointer addition [16] memset_dma256::$0 = memset_dma_command256 + 4
Successful SSA optimization PassNArrayElementAddressOfRewriting
Constant right-side identified [20] memset_dma256::$0 = memset_dma_command256 + 4
Constant right-side identified [37] memset_dma256::$1 = byte1 memset_dma_command256
Constant right-side identified [39] memset_dma256::$2 = byte0 memset_dma_command256
Constant right-side identified [51] memset_dma256::num#0 = (unumber)$50*$a
Constant right-side identified [16] memset_dma256::$0 = memset_dma_command256 + 4
Constant right-side identified [33] memset_dma256::$1 = byte1 memset_dma_command256
Constant right-side identified [35] memset_dma256::$2 = byte0 memset_dma_command256
Constant right-side identified [47] memset_dma256::num#0 = (unumber)$50*$a
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memset_dma256::$0 = memset_dma_command256+4
Constant memset_dma256::$1 = byte1 memset_dma_command256
@ -322,51 +310,45 @@ Constant memset_dma256::$8 = (byte*)memset_dma256::f018b#0
Constant memset_dma256::$9 = (byte**)memset_dma256::f018b#0
Constant memset_dma256::$10 = (byte**)memset_dma256::f018b#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memset_dma256::dest#0 in [30] *memset_dma256::$5 = (byte*)memset_dma256::dest#0
Constant value identified (byte*)memset_dma256::fill#0 in [33] *memset_dma256::$6 = (byte*)memset_dma256::fill#0
Constant value identified (byte*)memset_dma256::dest#0 in [26] *memset_dma256::$5 = (byte*)memset_dma256::dest#0
Constant value identified (byte*)memset_dma256::fill#0 in [29] *memset_dma256::$6 = (byte*)memset_dma256::fill#0
Successful SSA optimization Pass2ConstantValues
Converting *(pointer+n) to pointer[n] [24] *memset_dma256::$3 = memset_dma256::num#0 -- memset_dma256::$7[OFFSET_STRUCT_DMA_LIST_F018B_COUNT]
Converting *(pointer+n) to pointer[n] [27] *memset_dma256::$4 = memset_dma256::dest_bank#0 -- memset_dma256::$8[OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK]
Converting *(pointer+n) to pointer[n] [30] *memset_dma256::$5 = (byte*)memset_dma256::dest#0 -- memset_dma256::$9[OFFSET_STRUCT_DMA_LIST_F018B_DEST]
Converting *(pointer+n) to pointer[n] [33] *memset_dma256::$6 = (byte*)memset_dma256::fill#0 -- memset_dma256::$10[OFFSET_STRUCT_DMA_LIST_F018B_SRC]
Converting *(pointer+n) to pointer[n] [20] *memset_dma256::$3 = memset_dma256::num#0 -- memset_dma256::$7[OFFSET_STRUCT_DMA_LIST_F018B_COUNT]
Converting *(pointer+n) to pointer[n] [23] *memset_dma256::$4 = memset_dma256::dest_bank#0 -- memset_dma256::$8[OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK]
Converting *(pointer+n) to pointer[n] [26] *memset_dma256::$5 = (byte*)memset_dma256::dest#0 -- memset_dma256::$9[OFFSET_STRUCT_DMA_LIST_F018B_DEST]
Converting *(pointer+n) to pointer[n] [29] *memset_dma256::$6 = (byte*)memset_dma256::fill#0 -- memset_dma256::$10[OFFSET_STRUCT_DMA_LIST_F018B_SRC]
Successful SSA optimization Pass2InlineDerefIdx
Eliminating unused variable memset_dma256::$3 and assignment [18] memset_dma256::$3 = memset_dma256::$7 + OFFSET_STRUCT_DMA_LIST_F018B_COUNT
Eliminating unused variable memset_dma256::$4 and assignment [20] memset_dma256::$4 = memset_dma256::$8 + OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
Eliminating unused variable memset_dma256::$5 and assignment [22] memset_dma256::$5 = memset_dma256::$9 + OFFSET_STRUCT_DMA_LIST_F018B_DEST
Eliminating unused variable memset_dma256::$6 and assignment [24] memset_dma256::$6 = memset_dma256::$10 + OFFSET_STRUCT_DMA_LIST_F018B_SRC
Eliminating unused variable memset_dma256::$3 and assignment [14] memset_dma256::$3 = memset_dma256::$7 + OFFSET_STRUCT_DMA_LIST_F018B_COUNT
Eliminating unused variable memset_dma256::$4 and assignment [16] memset_dma256::$4 = memset_dma256::$8 + OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
Eliminating unused variable memset_dma256::$5 and assignment [18] memset_dma256::$5 = memset_dma256::$9 + OFFSET_STRUCT_DMA_LIST_F018B_DEST
Eliminating unused variable memset_dma256::$6 and assignment [20] memset_dma256::$6 = memset_dma256::$10 + OFFSET_STRUCT_DMA_LIST_F018B_SRC
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [0] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [2] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [3] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [7] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [9] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [10] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [1] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [2] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [6] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [7] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [5] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [12] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [4] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [9] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
@ -374,17 +356,14 @@ Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Constant right-side identified [1] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [5] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [4] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
@ -393,17 +372,13 @@ Eliminating unused constant memoryRemap::$7
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined memset_dma256::$1 = byte1 memset_dma_command256
Constant inlined memset_dma256::$2 = byte0 memset_dma_command256
Constant inlined memset_dma256::$0 = memset_dma_command256+4
Constant inlined memset_dma256::$10 = (byte**)memset_dma256::f018b#0
Constant inlined memoryRemap::$0 = 0
Constant inlined memoryRemap::$3 = 0
Constant inlined memoryRemap::$4 = 0
Constant inlined memoryRemap::$5 = 0
Constant inlined memset_dma256::$0 = memset_dma_command256+4
Constant inlined memoryRemap::$8 = 0
Constant inlined memset_dma256::$9 = (byte**)memset_dma256::f018b#0
Constant inlined memoryRemap::$9 = 0
Constant inlined memset_dma256::$7 = (word*)memset_dma256::f018b#0
Constant inlined memset_dma256::$8 = (byte*)memset_dma256::f018b#0
Constant inlined memset_dma256::$10 = (byte**)memset_dma256::f018b#0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(memset_dma_command256+1)
Consolidated array index constant in *((word*)memset_dma256::f018b#0+OFFSET_STRUCT_DMA_LIST_F018B_COUNT)

View File

@ -42,6 +42,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call SEI
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement memcpy_dma_command
Eliminating unused variable with no statement memcpy_dma_command4
@ -52,20 +56,16 @@ memoryRemap: scope:[memoryRemap] from main::@13
memoryRemap::upperPageOffset#1 = phi( main::@13/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( main::@13/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( main::@13/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -399,16 +399,12 @@ byte main::y#1
byte main::y#2
byte main::y#3
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -474,12 +470,10 @@ constant byte* memset_dma_command256[] = { DMA_OPTION_DEST_MB, 0, DMA_OPTION_FO
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) 1 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
Adding number conversion cast (unumber) 0 in *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
@ -660,15 +654,9 @@ Finalized unsigned number type (byte) $2d
Finalized unsigned number type (byte) $2d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Inferred type updated to byte in main::$9 = $2d * SIZEOF_WORD
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Alias main::r#2 = main::r#3
Alias main::erow#5 = main::erow#6
Alias main::i#2 = main::i#3
@ -683,10 +671,6 @@ Alias main::y#2 = main::y#3
Alias main::logo_dest#2 = main::logo_dest#4 main::logo_dest#3
Alias main::col#3 = main::col#5 main::col#4
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memoryRemap::lowerPageOffset#1 memoryRemap::lowerPageOffset#0
Identical Phi Values memoryRemap::remapBlocks#1 memoryRemap::remapBlocks#0
Identical Phi Values memoryRemap::upperPageOffset#1 memoryRemap::upperPageOffset#0
@ -701,20 +685,20 @@ Identical Phi Values main::logo_src#2 main::logo_src#5
Identical Phi Values main::logo_dest#2 main::logo_dest#5
Identical Phi Values main::col#3 main::col#2
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition main::$5 [102] if(main::r#2<$19) goto main::@2
Simple Condition main::$6 [110] if(main::i#2<$2d) goto main::@5
Simple Condition main::$7 [120] if(main::col#2<$2d) goto main::@8
Simple Condition main::$8 [124] if(main::y#2<(byte)$19*8) goto main::@10
Simple Condition main::$5 [98] if(main::r#2<$19) goto main::@2
Simple Condition main::$6 [106] if(main::i#2<$2d) goto main::@5
Simple Condition main::$7 [116] if(main::col#2<$2d) goto main::@8
Simple Condition main::$8 [120] if(main::y#2<(byte)$19*8) goto main::@10
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting array member address-of to pointer addition [32] memset_dma256::$0 = memset_dma_command256 + 4
Rewriting array member address-of to pointer addition [28] memset_dma256::$0 = memset_dma_command256 + 4
Successful SSA optimization PassNArrayElementAddressOfRewriting
Constant right-side identified [32] memset_dma256::$0 = memset_dma_command256 + 4
Constant right-side identified [49] memset_dma256::$1 = byte1 memset_dma_command256
Constant right-side identified [51] memset_dma256::$2 = byte0 memset_dma_command256
Constant right-side identified [86] memset_dma::num#0 = (unumber)$2d*$19*2
Constant right-side identified [92] memset_dma256::num#0 = (unumber)$2d*$19*2
Constant right-side identified [96] memset_dma::num#1 = (unumber)$2d*$20*8
Constant right-side identified [115] main::$9 = $2d * SIZEOF_WORD
Constant right-side identified [28] memset_dma256::$0 = memset_dma_command256 + 4
Constant right-side identified [45] memset_dma256::$1 = byte1 memset_dma_command256
Constant right-side identified [47] memset_dma256::$2 = byte0 memset_dma_command256
Constant right-side identified [82] memset_dma::num#0 = (unumber)$2d*$19*2
Constant right-side identified [88] memset_dma256::num#0 = (unumber)$2d*$19*2
Constant right-side identified [92] memset_dma::num#1 = (unumber)$2d*$20*8
Constant right-side identified [111] main::$9 = $2d * SIZEOF_WORD
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memset_dma256::$0 = memset_dma_command256+4
Constant memset_dma256::$1 = byte1 memset_dma_command256
@ -749,25 +733,25 @@ Constant memset_dma256::$8 = (byte*)memset_dma256::f018b#0
Constant memset_dma256::$9 = (byte**)memset_dma256::f018b#0
Constant memset_dma256::$10 = (byte**)memset_dma256::f018b#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memset_dma256::dest#0 in [42] *memset_dma256::$5 = (byte*)memset_dma256::dest#0
Constant value identified (byte*)memset_dma256::fill#0 in [45] *memset_dma256::$6 = (byte*)memset_dma256::fill#0
Constant value identified (byte*)memset_dma256::dest#0 in [38] *memset_dma256::$5 = (byte*)memset_dma256::dest#0
Constant value identified (byte*)memset_dma256::fill#0 in [41] *memset_dma256::$6 = (byte*)memset_dma256::fill#0
Successful SSA optimization Pass2ConstantValues
Converting *(pointer+n) to pointer[n] [36] *memset_dma256::$3 = memset_dma256::num#0 -- memset_dma256::$7[OFFSET_STRUCT_DMA_LIST_F018B_COUNT]
Converting *(pointer+n) to pointer[n] [39] *memset_dma256::$4 = memset_dma256::dest_bank#0 -- memset_dma256::$8[OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK]
Converting *(pointer+n) to pointer[n] [42] *memset_dma256::$5 = (byte*)memset_dma256::dest#0 -- memset_dma256::$9[OFFSET_STRUCT_DMA_LIST_F018B_DEST]
Converting *(pointer+n) to pointer[n] [45] *memset_dma256::$6 = (byte*)memset_dma256::fill#0 -- memset_dma256::$10[OFFSET_STRUCT_DMA_LIST_F018B_SRC]
Converting *(pointer+n) to pointer[n] [32] *memset_dma256::$3 = memset_dma256::num#0 -- memset_dma256::$7[OFFSET_STRUCT_DMA_LIST_F018B_COUNT]
Converting *(pointer+n) to pointer[n] [35] *memset_dma256::$4 = memset_dma256::dest_bank#0 -- memset_dma256::$8[OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK]
Converting *(pointer+n) to pointer[n] [38] *memset_dma256::$5 = (byte*)memset_dma256::dest#0 -- memset_dma256::$9[OFFSET_STRUCT_DMA_LIST_F018B_DEST]
Converting *(pointer+n) to pointer[n] [41] *memset_dma256::$6 = (byte*)memset_dma256::fill#0 -- memset_dma256::$10[OFFSET_STRUCT_DMA_LIST_F018B_SRC]
Successful SSA optimization Pass2InlineDerefIdx
Simplifying constant evaluating to zero byte0 SCREEN in [77] *((byte*)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_LOLO) = byte0 SCREEN
Simplifying constant evaluating to zero byte0 CHARSET in [81] *((byte*)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOLO) = byte0 CHARSET
Simplifying constant evaluating to zero byte0 SCREEN in [73] *((byte*)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_LOLO) = byte0 SCREEN
Simplifying constant evaluating to zero byte0 CHARSET in [77] *((byte*)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOLO) = byte0 CHARSET
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero (byte*)DMA in [26] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memset_dma_command
Simplifying expression containing zero (byte*)DMA in [22] *((byte*)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG) = byte0 &memset_dma_command
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Eliminating unused variable memset_dma256::$3 and assignment [30] memset_dma256::$3 = memset_dma256::$7 + OFFSET_STRUCT_DMA_LIST_F018B_COUNT
Eliminating unused variable memset_dma256::$4 and assignment [32] memset_dma256::$4 = memset_dma256::$8 + OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
Eliminating unused variable memset_dma256::$5 and assignment [34] memset_dma256::$5 = memset_dma256::$9 + OFFSET_STRUCT_DMA_LIST_F018B_DEST
Eliminating unused variable memset_dma256::$6 and assignment [36] memset_dma256::$6 = memset_dma256::$10 + OFFSET_STRUCT_DMA_LIST_F018B_SRC
Eliminating unused variable memset_dma256::$3 and assignment [26] memset_dma256::$3 = memset_dma256::$7 + OFFSET_STRUCT_DMA_LIST_F018B_COUNT
Eliminating unused variable memset_dma256::$4 and assignment [28] memset_dma256::$4 = memset_dma256::$8 + OFFSET_STRUCT_DMA_LIST_F018B_DEST_BANK
Eliminating unused variable memset_dma256::$5 and assignment [30] memset_dma256::$5 = memset_dma256::$9 + OFFSET_STRUCT_DMA_LIST_F018B_DEST
Eliminating unused variable memset_dma256::$6 and assignment [32] memset_dma256::$6 = memset_dma256::$10 + OFFSET_STRUCT_DMA_LIST_F018B_SRC
Eliminating unused constant OFFSET_STRUCT_F018_DMAGIC_ADDRLSBTRIG
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure __start
@ -775,33 +759,27 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Constant right-side identified [0] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [2] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [3] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [7] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [9] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [10] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [1] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [2] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [6] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [7] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [0] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [5] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [5] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [12] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [4] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [9] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant memoryRemap::remapBlocks#0
Eliminating unused constant memoryRemap::lowerPageOffset#0
@ -809,17 +787,14 @@ Eliminating unused constant memoryRemap::upperPageOffset#0
Eliminating unused constant memoryRemap::$1
Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Constant right-side identified [1] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [5] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [4] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
@ -862,14 +837,10 @@ Constant inlined memset_dma256::$2 = byte0 memset_dma_command256
Constant inlined memset_dma256::$0 = memset_dma_command256+4
Constant inlined main::erow#0 = SCREEN
Constant inlined main::y#0 = 0
Constant inlined memoryRemap::$0 = 0
Constant inlined memoryRemap::$3 = 0
Constant inlined main::logo_src#0 = LOGO
Constant inlined memoryRemap::$4 = 0
Constant inlined memoryRemap::$5 = 0
Constant inlined memoryRemap::$8 = 0
Constant inlined main::$9 = $2d*SIZEOF_WORD
Constant inlined memoryRemap::$9 = 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(memset_dma_command256+1)
Consolidated array index constant in *((word*)memset_dma256::f018b#0+OFFSET_STRUCT_DMA_LIST_F018B_COUNT)

View File

@ -171,12 +171,11 @@ gotoxy: {
sta.z conio_cursor_x
// conio_cursor_y = y
stx.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
txa
sta.z __7
lda #0
sta.z __7+1
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
lda.z __7
asl
sta.z __8

View File

@ -19,6 +19,14 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVa
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call SEI
Inlined call call __init
Eliminating unused variable with no statement memcpy::$0
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement gotoxy::$4
Eliminating unused variable with no statement memoryRemap::$0
Eliminating unused variable with no statement memoryRemap::$4
Eliminating unused variable with no statement memoryRemap::$5
Eliminating unused variable with no statement memoryRemap::$9
Eliminating unused variable with no statement conio_mega65_init::$2
Eliminating unused variable with no statement printf_buffer
Eliminating unused variable with no statement main::$0
@ -32,8 +40,7 @@ memcpy: scope:[memcpy] from cscroll::@3 cscroll::@4
memcpy::src#0 = ((byte*)) memcpy::source#2
memcpy::dst#0 = ((byte*)) memcpy::destination#2
memcpy::$2 = (byte*)memcpy::source#2
memcpy::$0 = memcpy::$2 + memcpy::num#2
memcpy::src_end#0 = memcpy::$0
memcpy::src_end#0 = memcpy::$2 + memcpy::num#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
memcpy::destination#4 = phi( memcpy/memcpy::destination#2, memcpy::@2/memcpy::destination#5 )
@ -80,8 +87,7 @@ memset::@2: scope:[memset] from memset
memset::num#3 = phi( memset/memset::num#2 )
memset::str#3 = phi( memset/memset::str#4 )
memset::$4 = (byte*)memset::str#3
memset::$2 = memset::$4 + memset::num#3
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#3
memset::dst#0 = ((byte*)) memset::str#3
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -131,8 +137,7 @@ gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4
conio_cursor_x = gotoxy::x#4
conio_cursor_y = gotoxy::y#4
gotoxy::$7 = (word)gotoxy::y#4
gotoxy::$4 = gotoxy::$7 * $50
gotoxy::line_offset#0 = gotoxy::$4
gotoxy::line_offset#0 = gotoxy::$7 * $50
gotoxy::$5 = CONIO_SCREEN_TEXT + gotoxy::line_offset#0
conio_line_text = gotoxy::$5
gotoxy::$6 = CONIO_SCREEN_COLORS + gotoxy::line_offset#0
@ -221,20 +226,16 @@ memoryRemap: scope:[memoryRemap] from conio_mega65_init::@3
memoryRemap::upperPageOffset#1 = phi( conio_mega65_init::@3/memoryRemap::upperPageOffset#0 )
memoryRemap::remapBlocks#1 = phi( conio_mega65_init::@3/memoryRemap::remapBlocks#0 )
memoryRemap::lowerPageOffset#1 = phi( conio_mega65_init::@3/memoryRemap::lowerPageOffset#0 )
memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::aVal = memoryRemap::$0
memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#1
memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#1
memoryRemap::$3 = memoryRemap::$2 & $f
memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
memoryRemap::xVal = memoryRemap::$4
memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#1
memoryRemap::yVal = memoryRemap::$5
memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#1
memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#1
memoryRemap::$8 = memoryRemap::$7 & $f
memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
memoryRemap::zVal = memoryRemap::$9
memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
@ -311,8 +312,7 @@ conio_mega65_init::@4: scope:[conio_mega65_init] from conio_mega65_init::@3
*IO_KEY = $47
*IO_KEY = $53
*IO_BANK = *IO_BANK | CRAM2K
conio_mega65_init::$2 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
conio_mega65_init::line#0 = conio_mega65_init::$2
conio_mega65_init::line#0 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
conio_mega65_init::$3 = conio_mega65_init::line#0 >= $19
conio_mega65_init::$4 = ! conio_mega65_init::$3
if(conio_mega65_init::$4) goto conio_mega65_init::@1
@ -386,7 +386,6 @@ byte conio_cursor_y loadstore
byte* conio_line_color loadstore
byte* conio_line_text loadstore
void conio_mega65_init()
number~ conio_mega65_init::$2
bool~ conio_mega65_init::$3
bool~ conio_mega65_init::$4
constant byte* const conio_mega65_init::BASIC_CURSOR_LINE = (byte*)$eb
@ -428,7 +427,6 @@ bool~ gotoxy::$0
bool~ gotoxy::$1
bool~ gotoxy::$2
bool~ gotoxy::$3
number~ gotoxy::$4
byte*~ gotoxy::$5
byte*~ gotoxy::$6
word~ gotoxy::$7
@ -453,7 +451,6 @@ byte gotoxy::y#6
void main()
constant byte* main::s[$d] = "hello world!"
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
byte*~ memcpy::$0
bool~ memcpy::$1
byte*~ memcpy::$2
void* memcpy::destination
@ -492,16 +489,12 @@ byte* memcpy::src_end#0
byte* memcpy::src_end#1
byte* memcpy::src_end#2
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0
byte~ memoryRemap::$1
byte~ memoryRemap::$2
number~ memoryRemap::$3
number~ memoryRemap::$4
byte~ memoryRemap::$5
number~ memoryRemap::$6
byte~ memoryRemap::$7
number~ memoryRemap::$8
number~ memoryRemap::$9
volatile byte memoryRemap::aVal loadstore
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0
@ -518,7 +511,6 @@ volatile byte memoryRemap::zVal loadstore
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -561,8 +553,7 @@ Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#2 > 0
Adding number conversion cast (unumber) $19 in gotoxy::$0 = gotoxy::y#3 > $19
Adding number conversion cast (unumber) $50 in gotoxy::$2 = gotoxy::x#3 >= $50
Adding number conversion cast (unumber) 0 in gotoxy::y#0 = 0
Adding number conversion cast (unumber) $50 in gotoxy::$4 = gotoxy::$7 * $50
Adding number conversion cast (unumber) gotoxy::$4 in gotoxy::$4 = gotoxy::$7 * (unumber)$50
Adding number conversion cast (unumber) $50 in gotoxy::line_offset#0 = gotoxy::$7 * $50
Adding number conversion cast (unumber) 0 in gotoxy::x#0 = 0
Adding number conversion cast (unumber) $50 in cputc::$1 = conio_cursor_x == $50
Adding number conversion cast (unumber) $50 in conio_line_text = conio_line_text + $50
@ -572,12 +563,10 @@ Adding number conversion cast (unumber) 0 in cputs::$2 = 0 != cputs::$0
Adding number conversion cast (unumber) 4 in memoryRemap::$1 = memoryRemap::remapBlocks#1 << 4
Adding number conversion cast (unumber) $f in memoryRemap::$3 = memoryRemap::$2 & $f
Adding number conversion cast (unumber) memoryRemap::$3 in memoryRemap::$3 = memoryRemap::$2 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$4 in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Adding number conversion cast (unumber) $f0 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Adding number conversion cast (unumber) memoryRemap::$6 in memoryRemap::$6 = memoryRemap::remapBlocks#1 & (unumber)$f0
Adding number conversion cast (unumber) $f in memoryRemap::$8 = memoryRemap::$7 & $f
Adding number conversion cast (unumber) memoryRemap::$8 in memoryRemap::$8 = memoryRemap::$7 & (unumber)$f
Adding number conversion cast (unumber) memoryRemap::$9 in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Adding number conversion cast (unumber) $19 in cscroll::$0 = conio_cursor_y == $19
Adding number conversion cast (unumber) 0 in cscroll::$7 = 0 != conio_scroll_enable
Adding number conversion cast (unumber) $50 in memcpy::source#0 = (void*)CONIO_SCREEN_TEXT+$50
@ -599,8 +588,7 @@ Adding number conversion cast (unumber) 0 in memoryRemap::lowerPageOffset#0 = 0
Adding number conversion cast (unumber) 0 in memoryRemap::upperPageOffset#0 = 0
Adding number conversion cast (unumber) $47 in *IO_KEY = $47
Adding number conversion cast (unumber) $53 in *IO_KEY = $53
Adding number conversion cast (unumber) 1 in conio_mega65_init::$2 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
Adding number conversion cast (unumber) conio_mega65_init::$2 in conio_mega65_init::$2 = *conio_mega65_init::BASIC_CURSOR_LINE + (unumber)1
Adding number conversion cast (unumber) 1 in conio_mega65_init::line#0 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
Adding number conversion cast (unumber) $19 in conio_mega65_init::$3 = conio_mega65_init::line#0 >= $19
Adding number conversion cast (unumber) 0 in gotoxy::x#2 = 0
Adding number conversion cast (unumber) $19-1 in conio_mega65_init::line#1 = $19-1
@ -702,27 +690,18 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in gotoxy::$4 = gotoxy::$7 * $50
Inferred type updated to byte in memoryRemap::$3 = memoryRemap::$2 & $f
Inferred type updated to byte in memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Inferred type updated to byte in memoryRemap::$6 = memoryRemap::remapBlocks#1 & $f0
Inferred type updated to byte in memoryRemap::$8 = memoryRemap::$7 & $f
Inferred type updated to byte in memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Inferred type updated to byte in conio_mega65_init::$2 = *conio_mega65_init::BASIC_CURSOR_LINE + 1
Inversing boolean not [20] memset::$1 = memset::num#2 <= 0 from [19] memset::$0 = memset::num#2 > 0
Inversing boolean not [40] gotoxy::$1 = gotoxy::y#3 <= $19 from [39] gotoxy::$0 = gotoxy::y#3 > $19
Inversing boolean not [44] gotoxy::$3 = gotoxy::x#3 < $50 from [43] gotoxy::$2 = gotoxy::x#3 >= $50
Inversing boolean not [70] cputc::$2 = conio_cursor_x != $50 from [69] cputc::$1 = conio_cursor_x == $50
Inversing boolean not [111] cscroll::$1 = conio_cursor_y != $19 from [110] cscroll::$0 = conio_cursor_y == $19
Inversing boolean not [153] conio_mega65_init::$4 = conio_mega65_init::line#0 < $19 from [152] conio_mega65_init::$3 = conio_mega65_init::line#0 >= $19
Inversing boolean not [19] memset::$1 = memset::num#2 <= 0 from [18] memset::$0 = memset::num#2 > 0
Inversing boolean not [38] gotoxy::$1 = gotoxy::y#3 <= $19 from [37] gotoxy::$0 = gotoxy::y#3 > $19
Inversing boolean not [42] gotoxy::$3 = gotoxy::x#3 < $50 from [41] gotoxy::$2 = gotoxy::x#3 >= $50
Inversing boolean not [67] cputc::$2 = conio_cursor_x != $50 from [66] cputc::$1 = conio_cursor_x == $50
Inversing boolean not [104] cscroll::$1 = conio_cursor_y != $19 from [103] cscroll::$0 = conio_cursor_y == $19
Inversing boolean not [145] conio_mega65_init::$4 = conio_mega65_init::line#0 < $19 from [144] conio_mega65_init::$3 = conio_mega65_init::line#0 >= $19
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Alias memcpy::src_end#0 = memcpy::$0
Alias memcpy::src#2 = memcpy::src#3
Alias memcpy::dst#2 = memcpy::dst#3
Alias memcpy::src_end#1 = memcpy::src_end#2
@ -731,34 +710,23 @@ Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
Alias memset::num#2 = memset::num#3
Alias memset::c#4 = memset::c#5
Alias memset::end#0 = memset::$2
Alias memset::c#2 = memset::c#3
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
Alias memset::str#5 = memset::str#6
Alias gotoxy::x#5 = gotoxy::x#6
Alias gotoxy::line_offset#0 = gotoxy::$4
Alias gotoxy::y#5 = gotoxy::y#6
Alias cputc::c#1 = cputc::c#2
Alias cputs::c#1 = cputs::$0 cputs::c#2
Alias cputs::s#0 = cputs::s#5 cputs::s#4
Alias conio_mega65_init::line#0 = conio_mega65_init::$2
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Alias gotoxy::x#3 = gotoxy::x#5
Alias gotoxy::y#4 = gotoxy::y#5
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values memcpy::src_end#1 memcpy::src_end#0
Identical Phi Values memcpy::destination#3 memcpy::destination#2
Identical Phi Values memset::end#1 memset::end#0
@ -781,13 +749,13 @@ Simple Condition cputc::$0 [45] if(cputc::c#0=='
') goto cputc::@1
Simple Condition cputc::$2 [51] if(conio_cursor_x!=$50) goto cputc::@return
Simple Condition cputs::$2 [66] if(0!=cputs::c#1) goto cputs::@2
Simple Condition cscroll::$1 [88] if(conio_cursor_y!=$19) goto cscroll::@return
Simple Condition cscroll::$7 [90] if(0!=conio_scroll_enable) goto cscroll::@3
Simple Condition conio_mega65_init::$4 [128] if(conio_mega65_init::line#0<$19) goto conio_mega65_init::@1
Simple Condition cscroll::$1 [84] if(conio_cursor_y!=$19) goto cscroll::@return
Simple Condition cscroll::$7 [86] if(0!=conio_scroll_enable) goto cscroll::@3
Simple Condition conio_mega65_init::$4 [124] if(conio_mega65_init::line#0<$19) goto conio_mega65_init::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [93] memcpy::num#0 = (unumber)$19*$50-$50
Constant right-side identified [98] memcpy::num#1 = (unumber)$19*$50-$50
Constant right-side identified [133] conio_mega65_init::line#1 = (unumber)$19-1
Constant right-side identified [89] memcpy::num#0 = (unumber)$19*$50-$50
Constant right-side identified [94] memcpy::num#1 = (unumber)$19*$50-$50
Constant right-side identified [129] conio_mega65_init::line#1 = (unumber)$19-1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant gotoxy::y#0 = 0
Constant gotoxy::x#0 = 0
@ -816,7 +784,7 @@ Constant conio_scroll_enable = 1
Successful SSA optimization Pass2ConstantIdentification
Constant memset::c#1 = conio_textcolor
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [90] if(0!=conio_scroll_enable) goto cscroll::@3
if() condition always true - replacing block destination [86] if(0!=conio_scroll_enable) goto cscroll::@3
Successful SSA optimization Pass2ConstantIfs
Rewriting conditional comparison [27] if(gotoxy::y#3<=$19) goto gotoxy::@1
Removing PHI-reference to removed block (cscroll::@2) in block gotoxy
@ -824,10 +792,10 @@ Removing PHI-reference to removed block (cscroll::@2) in block gotoxy
Removing unused block cscroll::@2
Removing unused block cscroll::@8
Successful SSA optimization Pass2EliminateUnusedBlocks
Eliminating unused variable memcpy::return#2 and assignment [74] memcpy::return#2 = memcpy::destination#2
Eliminating unused variable memcpy::return#3 and assignment [76] memcpy::return#3 = memcpy::destination#2
Eliminating unused variable memset::return#2 and assignment [78] memset::return#2 = memset::str#3
Eliminating unused variable memset::return#3 and assignment [80] memset::return#3 = memset::str#3
Eliminating unused variable memcpy::return#2 and assignment [70] memcpy::return#2 = memcpy::destination#2
Eliminating unused variable memcpy::return#3 and assignment [72] memcpy::return#3 = memcpy::destination#2
Eliminating unused variable memset::return#2 and assignment [74] memset::return#2 = memset::str#3
Eliminating unused variable memset::return#3 and assignment [76] memset::return#3 = memset::str#3
Eliminating unused constant gotoxy::x#1
Eliminating unused constant gotoxy::y#1
Eliminating unused constant cputs::c#0
@ -843,38 +811,32 @@ Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
Alias candidate removed (volatile)memoryRemap::aVal = memoryRemap::$0
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$4
Alias candidate removed (volatile)memoryRemap::yVal = memoryRemap::$5
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$9
Identical Phi Values gotoxy::y#3 gotoxy::y#2
Identical Phi Values gotoxy::x#3 gotoxy::x#2
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [56] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [58] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [59] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [63] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [65] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [66] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Constant right-side identified [56] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Constant right-side identified [57] memoryRemap::$1 = memoryRemap::remapBlocks#0 << 4
Constant right-side identified [58] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant right-side identified [61] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Constant right-side identified [62] memoryRemap::$6 = memoryRemap::remapBlocks#0 & $f0
Constant right-side identified [63] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$1 = memoryRemap::remapBlocks#0<<4
Constant memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#0
Constant memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#0
Constant memoryRemap::$6 = memoryRemap::remapBlocks#0&$f0
Constant memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [24] if(gotoxy::x#2<$50) goto gotoxy::@2
Successful SSA optimization Pass2ConstantIfs
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0<<4 in
Simplifying constant evaluating to zero byte1 memoryRemap::lowerPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero memoryRemap::remapBlocks#0&$f0 in
Simplifying constant evaluating to zero byte1 memoryRemap::upperPageOffset#0 in
Simplifying constant evaluating to zero byte0 memoryRemap::lowerPageOffset#0 in [56] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#0
Simplifying constant evaluating to zero byte0 memoryRemap::upperPageOffset#0 in [61] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#0
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap::$3 in [61] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [68] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
Simplifying expression containing zero memoryRemap::$3 in [60] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
Simplifying expression containing zero memoryRemap::$8 in [65] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing PHI-reference to removed block (gotoxy::@4) in block gotoxy::@2
Removing unused block gotoxy::@4
@ -888,19 +850,16 @@ Eliminating unused constant memoryRemap::$6
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
Alias candidate removed (volatile)memoryRemap::$4 = memoryRemap::$3 memoryRemap::xVal
Alias candidate removed (volatile)memoryRemap::$9 = memoryRemap::$8 memoryRemap::zVal
Alias candidate removed (volatile)memoryRemap::xVal = memoryRemap::$3
Alias candidate removed (volatile)memoryRemap::zVal = memoryRemap::$8
Identical Phi Values gotoxy::x#4 gotoxy::x#2
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [55] memoryRemap::$3 = memoryRemap::$2 & $f
Constant right-side identified [59] memoryRemap::$8 = memoryRemap::$7 & $f
Constant right-side identified [58] memoryRemap::$8 = memoryRemap::$7 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memoryRemap::$3 = memoryRemap::$2&$f
Constant memoryRemap::$8 = memoryRemap::$7&$f
Successful SSA optimization Pass2ConstantIdentification
Constant memoryRemap::$4 = memoryRemap::$3
Constant memoryRemap::$9 = memoryRemap::$8
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero memoryRemap::$2&$f in
Simplifying constant evaluating to zero memoryRemap::$7&$f in
Successful SSA optimization PassNSimplifyConstantZero
@ -931,31 +890,27 @@ Inlining constant with var siblings memset::c#1
Inlining constant with var siblings gotoxy::y#0
Inlining constant with var siblings cputs::s#1
Inlining constant with var siblings conio_mega65_init::line#1
Constant inlined memset::str#1 = (void*)COLORRAM+(word)$19*$50-$50
Constant inlined memset::str#0 = (void*)DEFAULT_SCREEN+(word)$19*$50-$50
Constant inlined CONIO_SCREEN_COLORS = COLORRAM
Constant inlined cputs::s#1 = main::s
Constant inlined conio_textcolor = LIGHT_BLUE
Constant inlined memcpy::destination#0 = (void*)DEFAULT_SCREEN
Constant inlined memset::num#1 = $50
Constant inlined memcpy::destination#1 = (void*)COLORRAM
Constant inlined memset::num#0 = $50
Constant inlined conio_mega65_init::line#1 = (byte)$19-1
Constant inlined memcpy::source#1 = (void*)COLORRAM+$50
Constant inlined CONIO_SCREEN_TEXT = DEFAULT_SCREEN
Constant inlined CONIO_TEXTCOLOR_DEFAULT = LIGHT_BLUE
Constant inlined memset::str#1 = (void*)COLORRAM+(word)$19*$50-$50
Constant inlined memset::str#0 = (void*)DEFAULT_SCREEN+(word)$19*$50-$50
Constant inlined CONIO_SCREEN_COLORS = COLORRAM
Constant inlined memcpy::source#0 = (void*)DEFAULT_SCREEN+$50
Constant inlined conio_mega65_init::line#1 = (byte)$19-1
Constant inlined memcpy::num#1 = (word)$19*$50-$50
Constant inlined memcpy::num#0 = (word)$19*$50-$50
Constant inlined memoryRemap::$0 = 0
Constant inlined memcpy::source#1 = (void*)COLORRAM+$50
Constant inlined gotoxy::y#0 = 0
Constant inlined memoryRemap::$3 = 0
Constant inlined memoryRemap::$4 = 0
Constant inlined memoryRemap::$5 = 0
Constant inlined CONIO_SCREEN_TEXT = DEFAULT_SCREEN
Constant inlined memset::c#0 = ' '
Constant inlined memset::c#1 = LIGHT_BLUE
Constant inlined memoryRemap::$8 = 0
Constant inlined memoryRemap::$9 = 0
Constant inlined CONIO_TEXTCOLOR_DEFAULT = LIGHT_BLUE
Successful SSA optimization Pass2ConstantInlining
Alias candidate removed (volatile)conio_line_text = gotoxy::$5
Alias candidate removed (volatile)conio_line_color = gotoxy::$6
@ -2753,13 +2708,12 @@ gotoxy: {
// conio_cursor_y = y
// [36] conio_cursor_y = gotoxy::y#4 -- vbuz1=vbuxx
stx.z conio_cursor_y
// (unsigned int)y*CONIO_WIDTH
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
// [37] gotoxy::$7 = (word)gotoxy::y#4 -- vwuz1=_word_vbuxx
txa
sta.z __7
lda #0
sta.z __7+1
// unsigned int line_offset = (unsigned int)y*CONIO_WIDTH
// [38] gotoxy::$8 = gotoxy::$7 << 2 -- vwuz1=vwuz2_rol_2
lda.z __7
asl

View File

@ -132,6 +132,7 @@ main: {
memoryRemapBlock: {
.label pageOffset = 2
// unsigned int pageOffset = memoryPage-blockPage
// Find the page offset (the number of pages to offset the block)
stx.z $ff
lda #<$100
sec
@ -141,6 +142,7 @@ memoryRemapBlock: {
sbc #0
sta.z pageOffset+1
// char block = blockPage / $20
// Which block is being remapped? (0-7)
txa
lsr
lsr
@ -201,10 +203,9 @@ memoryRemap: {
.label __6 = $d
.label lowerPageOffset = 2
.label upperPageOffset = 4
// BYTE0(lowerPageOffset)
lda.z lowerPageOffset
// char aVal = BYTE0(lowerPageOffset)
// lower blocks offset page low
lda.z lowerPageOffset
sta.z aVal
// remapBlocks << 4
tza
@ -217,15 +218,13 @@ memoryRemap: {
lda.z lowerPageOffset+1
// BYTE1(lowerPageOffset) & 0xf
and #$f
// (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
ora.z __1
// char xVal = (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
// lower blocks to map + lower blocks offset high nibble
ora.z __1
sta.z xVal
// BYTE0(upperPageOffset)
lda.z upperPageOffset
// char yVal = BYTE0(upperPageOffset)
// upper blocks offset page
lda.z upperPageOffset
sta.z yVal
// remapBlocks & 0xf0
tza
@ -235,10 +234,9 @@ memoryRemap: {
lda.z upperPageOffset+1
// BYTE1(upperPageOffset) & 0xf
and #$f
// (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
ora.z __6
// char zVal = (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
// upper blocks to map + upper blocks offset page high nibble
ora.z __6
sta.z zVal
// asm
lda aVal
@ -311,19 +309,17 @@ memoryRemap256M: {
ror.z __0+2
ror.z __0+1
ror.z __0
// BYTE1((unsigned int)(lowerPageOffset>>4))
lda.z __0+1
// char lMb = BYTE1((unsigned int)(lowerPageOffset>>4))
// lower blocks offset megabytes
lda.z __0+1
sta.z lMb
// char uMb = BYTE1((unsigned int)(upperPageOffset>>4))
// upper blocks offset megabytes
lda #0
sta.z uMb
// BYTE0(lowerPageOffset)
lda.z lowerPageOffset
// char aVal = BYTE0(lowerPageOffset)
// lower blocks offset page low
lda.z lowerPageOffset
sta.z aVal
// remapBlocks << 4
tza
@ -336,10 +332,9 @@ memoryRemap256M: {
lda.z lowerPageOffset+1
// BYTE1(lowerPageOffset) & 0xf
and #$f
// (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
ora.z __5
// char xVal = (remapBlocks << 4) | (BYTE1(lowerPageOffset) & 0xf)
// lower blocks to map + lower blocks offset high nibble
ora.z __5
sta.z xVal
// char yVal = BYTE0(upperPageOffset)
// upper blocks offset page
@ -348,7 +343,6 @@ memoryRemap256M: {
// remapBlocks & 0xf0
tza
and #$f0
// (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
// char zVal = (remapBlocks & 0xf0) | (BYTE1(upperPageOffset) & 0xf)
// upper blocks to map + upper blocks offset page high nibble
sta.z zVal

View File

@ -67,47 +67,39 @@ memoryRemap: scope:[memoryRemap] from main::@8 memoryRemapBlock
[33] memoryRemap::upperPageOffset#2 = phi( main::@8/$80, memoryRemapBlock/memoryRemap::upperPageOffset#0 )
[33] memoryRemap::remapBlocks#2 = phi( main::@8/MEMORYBLOCK_4000|MEMORYBLOCK_8000, memoryRemapBlock/memoryRemap::remapBlocks#0 )
[33] memoryRemap::lowerPageOffset#2 = phi( main::@8/$c0, memoryRemapBlock/memoryRemap::lowerPageOffset#0 )
[34] memoryRemap::$0 = byte0 memoryRemap::lowerPageOffset#2
[35] memoryRemap::aVal = memoryRemap::$0
[36] memoryRemap::$1 = memoryRemap::remapBlocks#2 << 4
[37] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#2
[38] memoryRemap::$3 = memoryRemap::$2 & $f
[39] memoryRemap::$4 = memoryRemap::$1 | memoryRemap::$3
[40] memoryRemap::xVal = memoryRemap::$4
[41] memoryRemap::$5 = byte0 memoryRemap::upperPageOffset#2
[42] memoryRemap::yVal = memoryRemap::$5
[43] memoryRemap::$6 = memoryRemap::remapBlocks#2 & $f0
[44] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#2
[45] memoryRemap::$8 = memoryRemap::$7 & $f
[46] memoryRemap::$9 = memoryRemap::$6 | memoryRemap::$8
[47] memoryRemap::zVal = memoryRemap::$9
[34] memoryRemap::aVal = byte0 memoryRemap::lowerPageOffset#2
[35] memoryRemap::$1 = memoryRemap::remapBlocks#2 << 4
[36] memoryRemap::$2 = byte1 memoryRemap::lowerPageOffset#2
[37] memoryRemap::$3 = memoryRemap::$2 & $f
[38] memoryRemap::xVal = memoryRemap::$1 | memoryRemap::$3
[39] memoryRemap::yVal = byte0 memoryRemap::upperPageOffset#2
[40] memoryRemap::$6 = memoryRemap::remapBlocks#2 & $f0
[41] memoryRemap::$7 = byte1 memoryRemap::upperPageOffset#2
[42] memoryRemap::$8 = memoryRemap::$7 & $f
[43] memoryRemap::zVal = memoryRemap::$6 | memoryRemap::$8
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
[49] return
[45] return
to:@return
void memoryRemap256M(byte memoryRemap256M::remapBlocks , dword memoryRemap256M::lowerPageOffset , dword memoryRemap256M::upperPageOffset)
memoryRemap256M: scope:[memoryRemap256M] from main::@3 main::@6
[50] memoryRemap256M::remapBlocks#2 = phi( main::@3/MEMORYBLOCK_4000, main::@6/0 )
[50] memoryRemap256M::lowerPageOffset#2 = phi( main::@3/$ff800-$40, main::@6/0 )
[51] memoryRemap256M::$0 = memoryRemap256M::lowerPageOffset#2 >> 4
[52] memoryRemap256M::$1 = byte1 (word)memoryRemap256M::$0
[53] memoryRemap256M::lMb = memoryRemap256M::$1
[54] memoryRemap256M::uMb = 0
[55] memoryRemap256M::$4 = byte0 memoryRemap256M::lowerPageOffset#2
[56] memoryRemap256M::aVal = memoryRemap256M::$4
[57] memoryRemap256M::$5 = memoryRemap256M::remapBlocks#2 << 4
[58] memoryRemap256M::$6 = byte1 memoryRemap256M::lowerPageOffset#2
[59] memoryRemap256M::$7 = memoryRemap256M::$6 & $f
[60] memoryRemap256M::$8 = memoryRemap256M::$5 | memoryRemap256M::$7
[61] memoryRemap256M::xVal = memoryRemap256M::$8
[62] memoryRemap256M::yVal = 0
[63] memoryRemap256M::$10 = memoryRemap256M::remapBlocks#2 & $f0
[64] memoryRemap256M::$13 = memoryRemap256M::$10
[65] memoryRemap256M::zVal = memoryRemap256M::$13
[46] memoryRemap256M::remapBlocks#2 = phi( main::@3/MEMORYBLOCK_4000, main::@6/0 )
[46] memoryRemap256M::lowerPageOffset#2 = phi( main::@3/$ff800-$40, main::@6/0 )
[47] memoryRemap256M::$0 = memoryRemap256M::lowerPageOffset#2 >> 4
[48] memoryRemap256M::lMb = byte1 (word)memoryRemap256M::$0
[49] memoryRemap256M::uMb = 0
[50] memoryRemap256M::aVal = byte0 memoryRemap256M::lowerPageOffset#2
[51] memoryRemap256M::$5 = memoryRemap256M::remapBlocks#2 << 4
[52] memoryRemap256M::$6 = byte1 memoryRemap256M::lowerPageOffset#2
[53] memoryRemap256M::$7 = memoryRemap256M::$6 & $f
[54] memoryRemap256M::xVal = memoryRemap256M::$5 | memoryRemap256M::$7
[55] memoryRemap256M::yVal = 0
[56] memoryRemap256M::$10 = memoryRemap256M::remapBlocks#2 & $f0
[57] memoryRemap256M::zVal = memoryRemap256M::$10
asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap256M::@return
memoryRemap256M::@return: scope:[memoryRemap256M] from memoryRemap256M
[67] return
[59] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -12,49 +12,41 @@ byte main::i1
byte main::i1#1 reg byte x 22.0
byte main::i1#2 reg byte x 13.75
void memoryRemap(byte memoryRemap::remapBlocks , word memoryRemap::lowerPageOffset , word memoryRemap::upperPageOffset)
byte~ memoryRemap::$0 reg byte a 202.0
byte~ memoryRemap::$1 zp[1]:22 67.33333333333333
byte~ memoryRemap::$2 reg byte a 202.0
byte~ memoryRemap::$3 reg byte a 202.0
byte~ memoryRemap::$4 reg byte a 202.0
byte~ memoryRemap::$5 reg byte a 202.0
byte~ memoryRemap::$6 zp[1]:13 67.33333333333333
byte~ memoryRemap::$7 reg byte a 202.0
byte~ memoryRemap::$8 reg byte a 202.0
byte~ memoryRemap::$9 reg byte a 202.0
volatile byte memoryRemap::aVal loadstore zp[1]:10 7.769230769230769
volatile byte memoryRemap::aVal loadstore zp[1]:10 10.1
word memoryRemap::lowerPageOffset
word memoryRemap::lowerPageOffset#0 lowerPageOffset zp[2]:2 11.0
word memoryRemap::lowerPageOffset#2 lowerPageOffset zp[2]:2 53.25
word memoryRemap::lowerPageOffset#2 lowerPageOffset zp[2]:2 71.0
byte memoryRemap::remapBlocks
byte memoryRemap::remapBlocks#0 reg byte z 7.333333333333333
byte memoryRemap::remapBlocks#2 reg byte z 21.299999999999997
byte memoryRemap::remapBlocks#2 reg byte z 30.42857142857143
word memoryRemap::upperPageOffset
word memoryRemap::upperPageOffset#0 upperPageOffset zp[2]:4 22.0
word memoryRemap::upperPageOffset#2 upperPageOffset zp[2]:4 19.363636363636363
volatile byte memoryRemap::xVal loadstore zp[1]:11 12.625
volatile byte memoryRemap::yVal loadstore zp[1]:12 16.833333333333332
word memoryRemap::upperPageOffset#2 upperPageOffset zp[2]:4 26.625
volatile byte memoryRemap::xVal loadstore zp[1]:11 16.833333333333332
volatile byte memoryRemap::yVal loadstore zp[1]:12 20.2
volatile byte memoryRemap::zVal loadstore zp[1]:14 101.0
void memoryRemap256M(byte memoryRemap256M::remapBlocks , dword memoryRemap256M::lowerPageOffset , dword memoryRemap256M::upperPageOffset)
dword~ memoryRemap256M::$0 zp[4]:15 11.0
byte~ memoryRemap256M::$1 reg byte a 22.0
byte~ memoryRemap256M::$10 reg byte a 22.0
byte~ memoryRemap256M::$13 reg byte a 22.0
byte~ memoryRemap256M::$4 reg byte a 22.0
byte~ memoryRemap256M::$5 zp[1]:22 7.333333333333333
byte~ memoryRemap256M::$6 reg byte a 22.0
byte~ memoryRemap256M::$7 reg byte a 22.0
byte~ memoryRemap256M::$8 reg byte a 22.0
volatile byte memoryRemap256M::aVal loadstore zp[1]:21 1.1
volatile byte memoryRemap256M::lMb loadstore zp[1]:19 0.8461538461538461
volatile byte memoryRemap256M::aVal loadstore zp[1]:21 1.375
volatile byte memoryRemap256M::lMb loadstore zp[1]:19 1.1
dword memoryRemap256M::lowerPageOffset
dword memoryRemap256M::lowerPageOffset#2 lowerPageOffset zp[4]:6 4.125
dword memoryRemap256M::lowerPageOffset#2 lowerPageOffset zp[4]:6 5.5
byte memoryRemap256M::remapBlocks
byte memoryRemap256M::remapBlocks#2 reg byte z 1.6923076923076923
volatile byte memoryRemap256M::uMb loadstore zp[1]:20 0.9166666666666666
byte memoryRemap256M::remapBlocks#2 reg byte z 2.2
volatile byte memoryRemap256M::uMb loadstore zp[1]:20 1.2222222222222223
dword memoryRemap256M::upperPageOffset
volatile byte memoryRemap256M::xVal loadstore zp[1]:23 2.2
volatile byte memoryRemap256M::yVal loadstore zp[1]:24 2.75
volatile byte memoryRemap256M::xVal loadstore zp[1]:23 2.75
volatile byte memoryRemap256M::yVal loadstore zp[1]:24 3.6666666666666665
volatile byte memoryRemap256M::zVal loadstore zp[1]:25 11.0
void memoryRemapBlock(byte memoryRemapBlock::blockPage , word memoryRemapBlock::memoryPage)
byte memoryRemapBlock::block
@ -78,31 +70,23 @@ reg byte z [ memoryRemap256M::remapBlocks#2 ]
reg byte a [ main::$7 ]
reg byte a [ memoryRemapBlock::block#0 ]
reg byte a [ memoryRemapBlock::blockBits#0 ]
reg byte a [ memoryRemap::$0 ]
zp[1]:10 [ memoryRemap::aVal ]
reg byte a [ memoryRemap::$2 ]
reg byte a [ memoryRemap::$3 ]
reg byte a [ memoryRemap::$4 ]
zp[1]:11 [ memoryRemap::xVal ]
reg byte a [ memoryRemap::$5 ]
zp[1]:12 [ memoryRemap::yVal ]
zp[1]:13 [ memoryRemap::$6 ]
reg byte a [ memoryRemap::$7 ]
reg byte a [ memoryRemap::$8 ]
reg byte a [ memoryRemap::$9 ]
zp[1]:14 [ memoryRemap::zVal ]
zp[4]:15 [ memoryRemap256M::$0 ]
reg byte a [ memoryRemap256M::$1 ]
zp[1]:19 [ memoryRemap256M::lMb ]
zp[1]:20 [ memoryRemap256M::uMb ]
reg byte a [ memoryRemap256M::$4 ]
zp[1]:21 [ memoryRemap256M::aVal ]
zp[1]:22 [ memoryRemap256M::$5 memoryRemap::$1 ]
reg byte a [ memoryRemap256M::$6 ]
reg byte a [ memoryRemap256M::$7 ]
reg byte a [ memoryRemap256M::$8 ]
zp[1]:23 [ memoryRemap256M::xVal ]
zp[1]:24 [ memoryRemap256M::yVal ]
reg byte a [ memoryRemap256M::$10 ]
reg byte a [ memoryRemap256M::$13 ]
zp[1]:25 [ memoryRemap256M::zVal ]

View File

@ -193,6 +193,7 @@ irq: {
cpx #$13
bcc __b29
// char greet_offset = greet_idx*16
// Set up greetings
lda.z greet_idx
asl
asl
@ -333,6 +334,7 @@ irq: {
jmp __b18
__b17:
// char col = SINE[sin_col]/4
// Greeting colors
lda SINE,y
lsr
lsr

View File

@ -24,6 +24,10 @@ Setting inferred volatile on symbol affected by address-of: memoryRemap256M::yVa
Setting inferred volatile on symbol affected by address-of: memoryRemap256M::zVal in asm { ldalMb ldx#$0f ldyuMb ldz#$0f map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement irq::$1
Eliminating unused variable with no statement irq::$17
Eliminating unused variable with no statement irq::$20
CONTROL FLOW GRAPH SSA
@ -45,8 +49,7 @@ memset::@2: scope:[memset] from memset
memset::num#2 = phi( memset/memset::num#1 )
memset::str#2 = phi( memset/memset::str#3 )
memset::$4 = (byte*)memset::str#2
memset::$2 = memset::$4 + memset::num#2
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#2
memset::dst#0 = ((byte*)) memset::str#2
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -259,8 +262,7 @@ irq::@16: scope:[irq] from irq::@17 irq::@3
irq::@17: scope:[irq] from irq::@16
irq::i#3 = phi( irq::@16/irq::i#2 )
irq::sin_col#2 = phi( irq::@16/irq::sin_col#3 )
irq::$17 = SINE[irq::sin_col#2] / 4
irq::col1#0 = irq::$17
irq::col1#0 = SINE[irq::sin_col#2] / 4
(COLORRAM+GREET_ROW*$28)[irq::i#3] = irq::col1#0
irq::col1#1 = irq::col1#0 / 2
(COLORRAM+LOGO_ROW*$28+0*$28-1)[irq::i#3] = irq::col1#1
@ -300,8 +302,7 @@ irq::@23: scope:[irq] from irq::@22
irq::barcnt#3 = phi( irq::@22/irq::barcnt#2 )
irq::sin_bar#2 = phi( irq::@22/irq::sin_bar#4 )
irq::idx#0 = SINE[irq::sin_bar#2]
irq::$20 = irq::barcnt#3 * $10
irq::barcol#0 = irq::$20
irq::barcol#0 = irq::barcnt#3 * $10
irq::i1#0 = 0
to:irq::@25
irq::@24: scope:[irq] from irq::@22
@ -375,8 +376,7 @@ irq::@32: scope:[irq] from irq::@31
irq::i3#1 = ++ irq::i3#3
to:irq::@31
irq::@33: scope:[irq] from irq::@31
irq::$1 = greet_idx * $10
irq::greet_offset#0 = irq::$1
irq::greet_offset#0 = greet_idx * $10
irq::i4#0 = 0
to:irq::@34
irq::@34: scope:[irq] from irq::@33 irq::@35
@ -507,7 +507,6 @@ void __start()
volatile byte greet_idx loadstore
volatile byte greet_zoomx loadstore
__interrupt(hardware_clobber) void irq()
number~ irq::$1
number~ irq::$10
bool~ irq::$11
bool~ irq::$12
@ -515,11 +514,9 @@ bool~ irq::$13
bool~ irq::$14
bool~ irq::$15
bool~ irq::$16
number~ irq::$17
bool~ irq::$18
bool~ irq::$19
bool~ irq::$2
number~ irq::$20
bool~ irq::$21
bool~ irq::$22
bool~ irq::$23
@ -695,7 +692,6 @@ byte main::i2#3
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -763,8 +759,7 @@ Adding number conversion cast (unumber) irq::$10 in irq::$10 = irq::zoomval#0 +
Adding number conversion cast (unumber) 0 in irq::$11 = greet_zoomx == 0
Adding number conversion cast (unumber) 0 in greet_idx = 0
Adding number conversion cast (unumber) $28 in irq::$16 = irq::i#2 < $28
Adding number conversion cast (unumber) 4 in irq::$17 = SINE[irq::sin_col#2] / 4
Adding number conversion cast (unumber) irq::$17 in irq::$17 = SINE[irq::sin_col#2] / (unumber)4
Adding number conversion cast (unumber) 4 in irq::col1#0 = SINE[irq::sin_col#2] / 4
Adding number conversion cast (unumber) GREET_ROW*$28 in (COLORRAM+GREET_ROW*$28)[irq::i#3] = irq::col1#0
Adding number conversion cast (unumber) $28 in (COLORRAM+(unumber)GREET_ROW*$28)[irq::i#3] = irq::col1#0
Adding number conversion cast (unumber) 2 in irq::col1#1 = irq::col1#0 / 2
@ -796,8 +791,7 @@ Adding number conversion cast (unumber) SCROLL_ROW*$28 in (COLORRAM+SCROLL_ROW*$
Adding number conversion cast (unumber) $28 in (COLORRAM+(unumber)SCROLL_ROW*$28)[irq::i#3] = PAL_GREEN[irq::sin_col#2]
Adding number conversion cast (unumber) 0 in rasters[irq::l#3] = 0
Adding number conversion cast (unumber) $10 in irq::$19 = irq::barcnt#2 < $10
Adding number conversion cast (unumber) $10 in irq::$20 = irq::barcnt#3 * $10
Adding number conversion cast (unumber) irq::$20 in irq::$20 = irq::barcnt#3 * (unumber)$10
Adding number conversion cast (unumber) $10 in irq::barcol#0 = irq::barcnt#3 * $10
Adding number conversion cast (unumber) $10 in irq::$21 = irq::i1#2 < $10
Adding number conversion cast (unumber) $f in irq::$22 = irq::i2#2 < $f
Adding number conversion cast (unumber) $a in irq::sin_bar#1 = irq::sin_bar#3 + $a
@ -806,8 +800,7 @@ Adding number conversion cast (unumber) 2 in irq::$26 = rasters[irq::$25] / 2
Adding number conversion cast (unumber) irq::$26 in irq::$26 = rasters[irq::$25] / (unumber)2
Adding number conversion cast (unumber) 7 in irq::$27 = irq::$26 & 7
Adding number conversion cast (unumber) irq::$27 in irq::$27 = irq::$26 & (unumber)7
Adding number conversion cast (unumber) $10 in irq::$1 = greet_idx * $10
Adding number conversion cast (unumber) irq::$1 in irq::$1 = greet_idx * (unumber)$10
Adding number conversion cast (unumber) $10 in irq::greet_offset#0 = greet_idx * $10
Adding number conversion cast (unumber) $10 in irq::$28 = irq::i4#2 < $10
Adding number conversion cast (unumber) $bf in irq::$29 = GREETING[irq::greet_offset#2] & $bf
Adding number conversion cast (unumber) irq::$29 in irq::$29 = GREETING[irq::greet_offset#2] & (unumber)$bf
@ -996,25 +989,21 @@ Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $27
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in irq::$10 = irq::zoomval#0 + 1
Inferred type updated to byte in irq::$17 = SINE[irq::sin_col#2] / 4
Inferred type updated to byte in irq::$20 = irq::barcnt#3 * $10
Inferred type updated to byte in irq::$26 = rasters[irq::$25] / 2
Inferred type updated to byte in irq::$27 = irq::$26 & 7
Inferred type updated to byte in irq::$1 = greet_idx * $10
Inferred type updated to byte in irq::$29 = GREETING[irq::greet_offset#2] & $bf
Inferred type updated to byte in irq::$33 = irq::nxt#2 & $bf
Inversing boolean not [2] memset::$1 = memset::num#1 <= 0 from [1] memset::$0 = memset::num#1 > 0
Inversing boolean not [100] irq::$9 = irq::line#6 != SCROLL_Y+SCROLL_BLACKBARS+1 from [99] irq::$8 = irq::line#6 == SCROLL_Y+SCROLL_BLACKBARS+1
Inversing boolean not [109] irq::$12 = greet_zoomx != 0 from [108] irq::$11 = greet_zoomx == 0
Inversing boolean not [114] irq::$14 = greet_idx != GREET_COUNT from [113] irq::$13 = greet_idx == GREET_COUNT
Inversing boolean not [204] irq::$3 = scroll_soft != $ff from [203] irq::$2 = scroll_soft == $ff
Inversing boolean not [217] irq::$32 = irq::nxt#0 != 0 from [216] irq::$31 = irq::nxt#0 == 0
Inversing boolean not [99] irq::$9 = irq::line#6 != SCROLL_Y+SCROLL_BLACKBARS+1 from [98] irq::$8 = irq::line#6 == SCROLL_Y+SCROLL_BLACKBARS+1
Inversing boolean not [108] irq::$12 = greet_zoomx != 0 from [107] irq::$11 = greet_zoomx == 0
Inversing boolean not [113] irq::$14 = greet_idx != GREET_COUNT from [112] irq::$13 = greet_idx == GREET_COUNT
Inversing boolean not [200] irq::$3 = scroll_soft != $ff from [199] irq::$2 = scroll_soft == $ff
Inversing boolean not [213] irq::$32 = irq::nxt#0 != 0 from [212] irq::$31 = irq::nxt#0 == 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#1 memset::return#3 memset::return#1
Alias memset::str#2 = memset::str#3
Alias memset::num#1 = memset::num#2
Alias memset::c#3 = memset::c#4
Alias memset::end#0 = memset::$2
Alias memset::c#1 = memset::c#2
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -1027,11 +1016,9 @@ Alias irq::line#7 = irq::line#8
Alias irq::wobble_idx#5 = irq::wobble_idx#6
Alias irq::sin_col#2 = irq::sin_col#3
Alias irq::i#2 = irq::i#3
Alias irq::col1#0 = irq::$17
Alias irq::l#2 = irq::l#3
Alias irq::sin_bar#2 = irq::sin_bar#4
Alias irq::barcnt#2 = irq::barcnt#3
Alias irq::barcol#0 = irq::$20
Alias irq::barcol#3 = irq::barcol#5 irq::barcol#7
Alias irq::idx#3 = irq::idx#5 irq::idx#7
Alias irq::i1#2 = irq::i1#3
@ -1043,7 +1030,6 @@ Alias irq::i2#2 = irq::i2#3
Alias irq::sin_bar#3 = irq::sin_bar#7 irq::sin_bar#5
Alias irq::barcnt#4 = irq::barcnt#7 irq::barcnt#5
Alias irq::i3#2 = irq::i3#3
Alias irq::greet_offset#0 = irq::$1
Alias irq::greet_offset#2 = irq::greet_offset#3
Alias irq::i4#2 = irq::i4#3
Alias irq::i5#2 = irq::i5#3
@ -2313,6 +2299,7 @@ irq: {
// irq::@30
__b30:
// [27] irq::greet_offset#0 = greet_idx << 4 -- vbuyy=vbuz1_rol_4
// Set up greetings
lda.z greet_idx
asl
asl
@ -2541,6 +2528,7 @@ irq: {
// irq::@17
__b17:
// [72] irq::col1#0 = SINE[irq::sin_col#2] >> 2 -- vbuaa=pbuc1_derefidx_vbuyy_ror_2
// Greeting colors
lda SINE,y
lsr
lsr
@ -3489,6 +3477,7 @@ irq: {
// irq::@30
// char greet_offset = greet_idx*16
// [27] irq::greet_offset#0 = greet_idx << 4 -- vbuyy=vbuz1_rol_4
// Set up greetings
lda.z greet_idx
asl
asl
@ -3724,6 +3713,7 @@ irq: {
__b17:
// char col = SINE[sin_col]/4
// [72] irq::col1#0 = SINE[irq::sin_col#2] >> 2 -- vbuaa=pbuc1_derefidx_vbuyy_ror_2
// Greeting colors
lda SINE,y
lsr
lsr

View File

@ -126,9 +126,9 @@ vblank: {
// APU->OAMDMA = BYTE1(spriteBuffer)
lda #>SPRITE_BUFFER
sta APU+OFFSET_STRUCT_RICOH_2A03_OAMDMA
// readJoy1()
jsr readJoy1
// char joy = readJoy1()
// Read controller 1
jsr readJoy1
// if(joy)
cmp #0
beq __b1

View File

@ -34,6 +34,7 @@ Inlined call call initNES
Inlined call call enableVideoOutput
Inlined call call ppuSpriteBufferDmaTransfer SPRITE_BUFFER
Inlined call call __init
Eliminating unused variable with no statement vblank::$1
CONTROL FLOW GRAPH SSA
@ -332,8 +333,7 @@ vblank::@16: scope:[vblank] from vblank::ppuSpriteBufferDmaTransfer1
to:vblank::@17
vblank::@17: scope:[vblank] from vblank::@16
readJoy1::return#4 = phi( vblank::@16/readJoy1::return#2 )
vblank::$1 = readJoy1::return#4
vblank::joy#0 = vblank::$1
vblank::joy#0 = readJoy1::return#4
vblank::$33 = 0 != vblank::joy#0
vblank::$2 = ! vblank::$33
if(vblank::$2) goto vblank::@1
@ -673,7 +673,6 @@ byte readJoy1::return#2
byte readJoy1::return#3
byte readJoy1::return#4
__interrupt(hardware_all) void vblank()
byte~ vblank::$1
number~ vblank::$10
number~ vblank::$11
number~ vblank::$12
@ -1027,7 +1026,7 @@ Inferred type updated to byte in vblank::$23 = vblank::$22
Inferred type updated to byte for vblank::$26
Inversing boolean not [92] main::initNES1_waitForVBlank1_$1 = 0 == main::initNES1_waitForVBlank1_$0 from [91] main::initNES1_waitForVBlank1_$4 = 0 != main::initNES1_waitForVBlank1_$0
Inversing boolean not [111] main::initNES1_waitForVBlank2_$1 = 0 == main::initNES1_waitForVBlank2_$0 from [110] main::initNES1_waitForVBlank2_$4 = 0 != main::initNES1_waitForVBlank2_$0
Inversing boolean not [168] vblank::$2 = 0 == vblank::joy#0 from [167] vblank::$33 = 0 != vblank::joy#0
Inversing boolean not [167] vblank::$2 = 0 == vblank::joy#0 from [166] vblank::$33 = 0 != vblank::joy#0
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)x_sin_idx = vblank::$7
Alias candidate removed (volatile)x_sin_idx_2 = vblank::$12
@ -1051,7 +1050,6 @@ Alias ppuDataTransfer::size#0 = main::$1
Alias main::s#2 = main::s#3
Alias vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 = vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#1
Alias readJoy1::return#2 = readJoy1::return#4
Alias vblank::joy#0 = vblank::$1
Alias vblank::y_idx#0 = vblank::y_idx#12 vblank::y_idx#13
Alias vblank::$5 = vblank::$4
Alias vblank::y_idx#10 = vblank::y_idx#6 vblank::y_idx#7
@ -1090,7 +1088,7 @@ Identical Phi Values ppuDataTransfer::cpuData#1 ppuDataTransfer::cpuData#0
Identical Phi Values ppuDataTransfer::size#2 ppuDataTransfer::size#0
Identical Phi Values ppuDataTransfer::size#1 ppuDataTransfer::size#2
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [202] vblank::$28 = vblank::s#2 * SIZEOF_STRUCT_SPRITEDATA
Identified duplicate assignment right side [201] vblank::$28 = vblank::s#2 * SIZEOF_STRUCT_SPRITEDATA
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition readJoy1::$0 [10] if(readJoy1::i#2<8) goto readJoy1::@2
Simple Condition ppuDataFill::$1 [30] if(ppuDataFill::i#2<ppuDataFill::size#3) goto ppuDataFill::@2
@ -2246,6 +2244,7 @@ vblank: {
// vblank::@14
__b14:
// [12] call readJoy1
// Read controller 1
jsr readJoy1
// [13] readJoy1::return#2 = readJoy1::joy#2
jmp __b15
@ -3318,12 +3317,12 @@ vblank: {
sta APU+OFFSET_STRUCT_RICOH_2A03_OAMDMA
// [11] phi from vblank::ppuSpriteBufferDmaTransfer1 to vblank::@14 [phi:vblank::ppuSpriteBufferDmaTransfer1->vblank::@14]
// vblank::@14
// readJoy1()
// char joy = readJoy1()
// [12] call readJoy1
// Read controller 1
jsr readJoy1
// [13] readJoy1::return#2 = readJoy1::joy#2
// vblank::@15
// char joy = readJoy1()
// [14] vblank::joy#0 = readJoy1::return#2
// if(joy)
// [15] if(0==vblank::joy#0) goto vblank::@1 -- 0_eq_vbuaa_then_la1

View File

@ -2,6 +2,9 @@ Fixing struct type size struct MOS7360_TED to 63
Fixing struct type SIZE_OF struct MOS7360_TED to 63
Fixing struct type SIZE_OF struct MOS7360_TED to 63
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement main::$4
Eliminating unused variable with no statement main::$11
CONTROL FLOW GRAPH SSA
@ -23,8 +26,7 @@ memset::@2: scope:[memset] from memset
memset::num#4 = phi( memset/memset::num#3 )
memset::str#4 = phi( memset/memset::str#5 )
memset::$4 = (byte*)memset::str#4
memset::$2 = memset::$4 + memset::num#4
memset::end#0 = memset::$2
memset::end#0 = memset::$4 + memset::num#4
memset::dst#0 = ((byte*)) memset::str#4
to:memset::@3
memset::@3: scope:[memset] from memset::@2 memset::@4
@ -113,8 +115,7 @@ main::@2: scope:[main] from main::@1
main::y#5 = phi( main::@1/main::y#8 )
main::$24 = (word)main::y#5
main::$3 = main::$24 * $28
main::$4 = main::$3 + main::x#5
main::offset#0 = main::$4
main::offset#0 = main::$3 + main::x#5
main::$5 = VISITS + main::offset#0
*main::$5 = ++ *main::$5
main::$6 = VISITS + main::offset#0
@ -132,8 +133,7 @@ main::@17: scope:[main] from main::@2
rand::return#4 = phi( main::@2/rand::return#2 )
main::$10 = rand::return#4
rand_state#4 = rand_state#11
main::$11 = byte1 main::$10
main::rnd#0 = main::$11
main::rnd#0 = byte1 main::$10
main::$12 = main::rnd#0 & $80
main::$26 = 0 != main::$12
if(main::$26) goto main::@3
@ -261,7 +261,6 @@ constant byte* VISITS[$3e8] = { fill( $3e8, 0) }
void __start()
void main()
word~ main::$10
byte~ main::$11
number~ main::$12
number~ main::$13
bool~ main::$14
@ -280,7 +279,6 @@ bool~ main::$26
bool~ main::$27
bool~ main::$28
number~ main::$3
number~ main::$4
byte*~ main::$5
byte*~ main::$6
byte*~ main::$8
@ -332,7 +330,6 @@ byte main::y#9
void* memset(void* memset::str , byte memset::c , word memset::num)
bool~ memset::$0
bool~ memset::$1
byte*~ memset::$2
bool~ memset::$3
byte*~ memset::$4
byte memset::c
@ -433,7 +430,6 @@ Adding number conversion cast (unumber) 0 in *((byte*)TED+OFFSET_STRUCT_MOS7360_
Adding number conversion cast (unumber) 0 in *((byte*)TED+OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR) = 0
Adding number conversion cast (unumber) $28 in main::$3 = main::$24 * $28
Adding number conversion cast (unumber) main::$3 in main::$3 = main::$24 * (unumber)$28
Adding number conversion cast (unumber) main::$4 in main::$4 = main::$3 + main::x#5
Adding number conversion cast (unumber) $f in main::$9 = main::cnt#0 & $f
Adding number conversion cast (unumber) main::$9 in main::$9 = main::cnt#0 & (unumber)$f
Adding number conversion cast (unumber) $80 in main::$12 = main::rnd#0 & $80
@ -533,22 +529,20 @@ Finalized unsigned number type (byte) $27
Finalized unsigned number type (byte) $ff
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to word in main::$3 = main::$24 * $28
Inferred type updated to word in main::$4 = main::$3 + main::x#5
Inferred type updated to byte in main::$9 = main::cnt#0 & $f
Inferred type updated to byte in main::$12 = main::rnd#0 & $80
Inferred type updated to byte in main::$18 = main::rnd#1 & $40
Inferred type updated to byte in main::$13 = main::rnd#2 & $40
Inversing boolean not [2] memset::$1 = memset::num#3 <= 0 from [1] memset::$0 = memset::num#3 > 0
Inversing boolean not [91] main::$17 = main::y#1 != $19 from [90] main::$16 = main::y#1 == $19
Inversing boolean not [96] main::$15 = main::y#2 != $ff from [95] main::$14 = main::y#2 == $ff
Inversing boolean not [105] main::$22 = main::x#1 != $28 from [104] main::$21 = main::x#1 == $28
Inversing boolean not [110] main::$20 = main::x#2 != $ff from [109] main::$19 = main::x#2 == $ff
Inversing boolean not [88] main::$17 = main::y#1 != $19 from [87] main::$16 = main::y#1 == $19
Inversing boolean not [93] main::$15 = main::y#2 != $ff from [92] main::$14 = main::y#2 == $ff
Inversing boolean not [102] main::$22 = main::x#1 != $28 from [101] main::$21 = main::x#1 == $28
Inversing boolean not [107] main::$20 = main::x#2 != $ff from [106] main::$19 = main::x#2 == $ff
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#3 memset::return#5 memset::return#1
Alias memset::str#4 = memset::str#5
Alias memset::num#3 = memset::num#4
Alias memset::c#5 = memset::c#6
Alias memset::end#0 = memset::$2
Alias memset::c#3 = memset::c#4
Alias memset::dst#2 = memset::dst#3
Alias memset::end#1 = memset::end#2
@ -559,10 +553,9 @@ Alias rand_state#18 = rand_state#29 rand_state#32 rand_state#20
Alias main::y#11 = main::y#5 main::y#8 main::y#16 main::y#9 main::y#6 main::y#7 main::y#14 main::y#12 main::y#13 main::y#15
Alias main::x#11 = main::x#5 main::x#8 main::x#9 main::x#16 main::x#14 main::x#12 main::x#13 main::x#15 main::x#6 main::x#7
Alias rand_state#12 = rand_state#15 rand_state#16 rand_state#5
Alias main::offset#0 = main::$4
Alias rand::return#2 = rand::return#4
Alias rand_state#11 = rand_state#4 rand_state#31 rand_state#30 rand_state#25 rand_state#21 rand_state#22 rand_state#26 rand_state#27 rand_state#23 rand_state#24 rand_state#28
Alias main::rnd#0 = main::$11 main::rnd#1 main::rnd#2
Alias main::rnd#0 = main::rnd#1 main::rnd#2
Alias rand_state#17 = rand_state#6
Alias rand_state#13 = rand_state#7 rand_state#14 rand_state#8
Successful SSA optimization Pass2AliasElimination
@ -577,7 +570,7 @@ Identical Phi Values rand_state#13 rand_state#12
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values memset::return#0 memset::str#4
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [65] main::$6 = VISITS + main::offset#0
Identified duplicate assignment right side [63] main::$6 = VISITS + main::offset#0
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition memset::$1 [2] if(memset::num#3<=0) goto memset::@1
Simple Condition memset::$3 [9] if(memset::dst#2!=memset::end#0) goto memset::@4

View File

@ -61,16 +61,15 @@ call2: scope:[call2] from main main::@1
[36] call2::return = call2::$0
to:call2::@return
call2::@return: scope:[call2] from call2
[37] call2::return = call2::return
[38] return
[37] return
to:@return
byte call3(byte call3::param1 , byte call3::param2)
call3: scope:[call3] from main::@2 main::@3
[39] call3::param2#2 = phi( main::@2/2, main::@3/4 )
[39] call3::param1#2 = phi( main::@2/1, main::@3/3 )
[40] call3::return#0 = call3::param1#2 + call3::param2#2
[38] call3::param2#2 = phi( main::@2/2, main::@3/4 )
[38] call3::param1#2 = phi( main::@2/1, main::@3/3 )
[39] call3::return#0 = call3::param1#2 + call3::param2#2
to:call3::@return
call3::@return: scope:[call3] from call3
[41] return
[40] return
to:@return

View File

@ -36,7 +36,6 @@ call2: scope:[call2] from main main::@1
call2::return = call2::$0
to:call2::@return
call2::@return: scope:[call2] from call2
call2::return = call2::return
return
to:@return
@ -338,18 +337,17 @@ call2: scope:[call2] from main main::@1
[36] call2::return = call2::$0
to:call2::@return
call2::@return: scope:[call2] from call2
[37] call2::return = call2::return
[38] return
[37] return
to:@return
byte call3(byte call3::param1 , byte call3::param2)
call3: scope:[call3] from main::@2 main::@3
[39] call3::param2#2 = phi( main::@2/2, main::@3/4 )
[39] call3::param1#2 = phi( main::@2/1, main::@3/3 )
[40] call3::return#0 = call3::param1#2 + call3::param2#2
[38] call3::param2#2 = phi( main::@2/2, main::@3/4 )
[38] call3::param1#2 = phi( main::@2/1, main::@3/3 )
[39] call3::return#0 = call3::param1#2 + call3::param2#2
to:call3::@return
call3::@return: scope:[call3] from call3
[41] return
[40] return
to:@return
@ -367,7 +365,7 @@ byte call2::param1
byte call2::param1#2 11.0
byte call2::param2
byte call2::param2#2 11.0
byte call2::return loadstore 6.428571428571428
byte call2::return loadstore 3.833333333333333
byte call3(byte call3::param1 , byte call3::param2)
byte call3::param1
byte call3::param1#2 11.0
@ -457,7 +455,7 @@ Removing always clobbered register reg byte x as potential for zp[1]:15 [ call1:
Statement [31] call1::return#0 = call1::param1#0 + call1::param2#0 [ call1::return#0 ] ( call1:2 [ call1::return#0 ] { } call1:8 [ call1::return#0 ] { } ) always clobbers reg byte a
Statement [32] stackidx(byte,call1::OFFSET_STACK_RETURN) = call1::return#0 [ ] ( call1:2 [ ] { } call1:8 [ ] { } ) always clobbers reg byte x
Statement [35] call2::$0 = call2::param1#2 + call2::param2#2 [ call2::$0 ] ( call2:12 [ call2::$0 ] { { call2::return = } } call2:16 [ call2::$0 ] { { call2::return = } } ) always clobbers reg byte a
Statement [40] call3::return#0 = call3::param1#2 + call3::param2#2 [ call3::return#0 ] ( call3:20 [ call3::return#0 ] { { call3::return#0 = call3::return#2 } } call3:24 [ call3::return#0 ] { { call3::return#0 = call3::return#3 } } ) always clobbers reg byte a
Statement [39] call3::return#0 = call3::param1#2 + call3::param2#2 [ call3::return#0 ] ( call3:20 [ call3::return#0 ] { { call3::return#0 = call3::return#2 } } call3:24 [ call3::return#0 ] { { call3::return#0 = call3::return#3 } } ) always clobbers reg byte a
Statement [0] stackpush(byte) = 1 [ ] ( [ ] { { call2::return = } } ) always clobbers reg byte a
Statement [1] stackpush(byte) = 2 [ ] ( [ ] { { call2::return = } } ) always clobbers reg byte a
Statement sideeffect stackpullbytes(1) always clobbers reg byte a
@ -471,7 +469,7 @@ Statement [30] call1::param2#0 = stackidx(byte,call1::OFFSET_STACK_PARAM2) [ cal
Statement [31] call1::return#0 = call1::param1#0 + call1::param2#0 [ call1::return#0 ] ( call1:2 [ call1::return#0 ] { } call1:8 [ call1::return#0 ] { } ) always clobbers reg byte a
Statement [32] stackidx(byte,call1::OFFSET_STACK_RETURN) = call1::return#0 [ ] ( call1:2 [ ] { } call1:8 [ ] { } ) always clobbers reg byte x
Statement [35] call2::$0 = call2::param1#2 + call2::param2#2 [ call2::$0 ] ( call2:12 [ call2::$0 ] { { call2::return = } } call2:16 [ call2::$0 ] { { call2::return = } } ) always clobbers reg byte a
Statement [40] call3::return#0 = call3::param1#2 + call3::param2#2 [ call3::return#0 ] ( call3:20 [ call3::return#0 ] { { call3::return#0 = call3::return#2 } } call3:24 [ call3::return#0 ] { { call3::return#0 = call3::return#3 } } ) always clobbers reg byte a
Statement [39] call3::return#0 = call3::param1#2 + call3::param2#2 [ call3::return#0 ] ( call3:20 [ call3::return#0 ] { { call3::return#0 = call3::return#2 } } call3:24 [ call3::return#0 ] { { call3::return#0 = call3::return#3 } } ) always clobbers reg byte a
Potential registers zp[1]:2 [ call2::param1#2 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:3 [ call2::param2#2 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:4 [ call3::param1#2 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y ,
@ -493,7 +491,7 @@ Potential registers zp[1]:19 [ call3::return#0 ] : zp[1]:19 , reg byte a , reg b
REGISTER UPLIFT SCOPES
Uplift Scope [call1] 22: zp[1]:16 [ call1::param2#0 ] 22: zp[1]:17 [ call1::return#0 ] 11: zp[1]:15 [ call1::param1#0 ]
Uplift Scope [call2] 22: zp[1]:18 [ call2::$0 ] 11: zp[1]:2 [ call2::param1#2 ] 11: zp[1]:3 [ call2::param2#2 ] 6.43: zp[1]:8 [ call2::return ]
Uplift Scope [call2] 22: zp[1]:18 [ call2::$0 ] 11: zp[1]:2 [ call2::param1#2 ] 11: zp[1]:3 [ call2::param2#2 ] 3.83: zp[1]:8 [ call2::return ]
Uplift Scope [call3] 11: zp[1]:4 [ call3::param1#2 ] 11: zp[1]:5 [ call3::param2#2 ] 4: zp[1]:11 [ call3::return#2 ] 4: zp[1]:13 [ call3::return#3 ] 3.75: zp[1]:19 [ call3::return#0 ]
Uplift Scope [main] 4: zp[1]:6 [ main::$0 ] 4: zp[1]:7 [ main::$1 ] 4: zp[1]:9 [ main::$2 ] 4: zp[1]:10 [ main::$3 ] 4: zp[1]:12 [ main::$4 ] 4: zp[1]:14 [ main::$5 ]
Uplift Scope []
@ -507,12 +505,12 @@ Limited combination testing to 100 combinations of 4096 possible.
Uplifting [] best 233 combination
Attempting to uplift remaining variables inzp[1]:15 [ call1::param1#0 ]
Uplifting [call1] best 233 combination zp[1]:15 [ call1::param1#0 ]
Attempting to uplift remaining variables inzp[1]:8 [ call2::return ]
Uplifting [call2] best 233 combination zp[1]:8 [ call2::return ]
Attempting to uplift remaining variables inzp[1]:12 [ main::$4 ]
Uplifting [main] best 227 combination reg byte a [ main::$4 ]
Attempting to uplift remaining variables inzp[1]:14 [ main::$5 ]
Uplifting [main] best 221 combination reg byte a [ main::$5 ]
Attempting to uplift remaining variables inzp[1]:8 [ call2::return ]
Uplifting [call2] best 221 combination zp[1]:8 [ call2::return ]
Attempting to uplift remaining variables inzp[1]:19 [ call3::return#0 ]
Uplifting [call3] best 212 combination reg byte a [ call3::return#0 ]
Coalescing zero page register [ zp[1]:15 [ call1::param1#0 ] ] with [ zp[1]:8 [ call2::return ] ]
@ -597,11 +595,11 @@ main: {
// [19] *main::ptr = main::$3 -- _deref_pbuc1=vbuaa
sta ptr
// [20] call call3
// [39] phi from main::@2 to call3 [phi:main::@2->call3]
// [38] phi from main::@2 to call3 [phi:main::@2->call3]
call3_from___b2:
// [39] phi call3::param2#2 = 2 [phi:main::@2->call3#0] -- vbuaa=vbuc1
// [38] phi call3::param2#2 = 2 [phi:main::@2->call3#0] -- vbuaa=vbuc1
lda #2
// [39] phi call3::param1#2 = 1 [phi:main::@2->call3#1] -- vbuxx=vbuc1
// [38] phi call3::param1#2 = 1 [phi:main::@2->call3#1] -- vbuxx=vbuc1
ldx #1
jsr call3
// [21] call3::return#2 = call3::return#0
@ -612,11 +610,11 @@ main: {
// [23] *main::ptr = main::$4 -- _deref_pbuc1=vbuaa
sta ptr
// [24] call call3
// [39] phi from main::@3 to call3 [phi:main::@3->call3]
// [38] phi from main::@3 to call3 [phi:main::@3->call3]
call3_from___b3:
// [39] phi call3::param2#2 = 4 [phi:main::@3->call3#0] -- vbuaa=vbuc1
// [38] phi call3::param2#2 = 4 [phi:main::@3->call3#0] -- vbuaa=vbuc1
lda #4
// [39] phi call3::param1#2 = 3 [phi:main::@3->call3#1] -- vbuxx=vbuc1
// [38] phi call3::param1#2 = 3 [phi:main::@3->call3#1] -- vbuxx=vbuc1
ldx #3
jsr call3
// [25] call3::return#3 = call3::return#0
@ -674,22 +672,21 @@ call2: {
jmp __breturn
// call2::@return
__breturn:
// [37] call2::return = call2::return
// [38] return
// [37] return
rts
}
// call3
// A "normal" optimized ROM function that will transfer parameters and return value through registers or zeropage.
// call3(byte register(X) param1, byte register(A) param2)
call3: {
// [40] call3::return#0 = call3::param1#2 + call3::param2#2 -- vbuaa=vbuxx_plus_vbuaa
// [39] call3::return#0 = call3::param1#2 + call3::param2#2 -- vbuaa=vbuxx_plus_vbuaa
stx.z $ff
clc
adc.z $ff
jmp __breturn
// call3::@return
__breturn:
// [41] return
// [40] return
rts
}
// File Data
@ -736,7 +733,7 @@ byte call2::param1
byte call2::param1#2 reg byte x 11.0
byte call2::param2
byte call2::param2#2 reg byte a 11.0
byte call2::return loadstore zp[1]:2 6.428571428571428
byte call2::return loadstore zp[1]:2 3.833333333333333
byte call3(byte call3::param1 , byte call3::param2)
byte call3::param1
byte call3::param1#2 reg byte x 11.0
@ -860,10 +857,10 @@ main: {
sta ptr
// call3(1,2)
// [20] call call3
// [39] phi from main::@2 to call3 [phi:main::@2->call3]
// [39] phi call3::param2#2 = 2 [phi:main::@2->call3#0] -- vbuaa=vbuc1
// [38] phi from main::@2 to call3 [phi:main::@2->call3]
// [38] phi call3::param2#2 = 2 [phi:main::@2->call3#0] -- vbuaa=vbuc1
lda #2
// [39] phi call3::param1#2 = 1 [phi:main::@2->call3#1] -- vbuxx=vbuc1
// [38] phi call3::param1#2 = 1 [phi:main::@2->call3#1] -- vbuxx=vbuc1
ldx #1
jsr call3
// call3(1,2)
@ -875,10 +872,10 @@ main: {
sta ptr
// call3(3,4)
// [24] call call3
// [39] phi from main::@3 to call3 [phi:main::@3->call3]
// [39] phi call3::param2#2 = 4 [phi:main::@3->call3#0] -- vbuaa=vbuc1
// [38] phi from main::@3 to call3 [phi:main::@3->call3]
// [38] phi call3::param2#2 = 4 [phi:main::@3->call3#0] -- vbuaa=vbuc1
lda #4
// [39] phi call3::param1#2 = 3 [phi:main::@3->call3#1] -- vbuxx=vbuc1
// [38] phi call3::param1#2 = 3 [phi:main::@3->call3#1] -- vbuxx=vbuc1
ldx #3
jsr call3
// call3(3,4)
@ -936,8 +933,7 @@ call2: {
sta.z return
// call2::@return
// }
// [37] call2::return = call2::return
// [38] return
// [37] return
rts
}
// call3
@ -945,13 +941,13 @@ call2: {
// call3(byte register(X) param1, byte register(A) param2)
call3: {
// param1+param2
// [40] call3::return#0 = call3::param1#2 + call3::param2#2 -- vbuaa=vbuxx_plus_vbuaa
// [39] call3::return#0 = call3::param1#2 + call3::param2#2 -- vbuaa=vbuxx_plus_vbuaa
stx.z $ff
clc
adc.z $ff
// call3::@return
// }
// [41] return
// [40] return
rts
}
// File Data

View File

@ -15,7 +15,7 @@ byte call2::param1
byte call2::param1#2 reg byte x 11.0
byte call2::param2
byte call2::param2#2 reg byte a 11.0
byte call2::return loadstore zp[1]:2 6.428571428571428
byte call2::return loadstore zp[1]:2 3.833333333333333
byte call3(byte call3::param1 , byte call3::param2)
byte call3::param1
byte call3::param1#2 reg byte x 11.0

Some files were not shown because too many files have changed in this diff Show More