1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-10 13:38:18 +00:00

Removed the ALU subsystem. It was providing too little value for the complexity.

This commit is contained in:
jespergravgaard 2021-12-27 01:16:04 +01:00
parent 44ec5be5e8
commit 40919842e2
17 changed files with 1130 additions and 1352 deletions

View File

@ -676,7 +676,6 @@ public class Compiler {
// Find potential registers for each live range equivalence class - based on clobbering of fragments
getLog().append("REGISTER UPLIFT POTENTIAL REGISTERS");
new Pass4RegisterUpliftPotentialInitialize(program).initPotentialRegisters();
new Pass4RegisterUpliftPotentialAluAnalysis(program).findPotentialAlu();
boolean change;
do {
change = new Pass4RegisterUpliftPotentialRegisterAnalysis(program).findPotentialRegisters();

View File

@ -4,7 +4,10 @@ import dk.camelot64.kickc.asm.AsmFormat;
import dk.camelot64.kickc.fragment.signature.AsmFragmentBindings;
import dk.camelot64.kickc.fragment.signature.AsmFragmentSignature;
import dk.camelot64.kickc.fragment.signature.AsmFragmentSignatureExpr;
import dk.camelot64.kickc.model.*;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.ControlFlowGraph;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.operators.Operator;
import dk.camelot64.kickc.model.operators.OperatorBinary;
import dk.camelot64.kickc.model.operators.OperatorUnary;
@ -12,7 +15,6 @@ import dk.camelot64.kickc.model.operators.Operators;
import dk.camelot64.kickc.model.statements.*;
import dk.camelot64.kickc.model.symbols.Label;
import dk.camelot64.kickc.model.symbols.Symbol;
import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInference;
import dk.camelot64.kickc.model.values.*;
@ -122,50 +124,6 @@ final public class AsmFragmentInstanceSpecBuilder {
return new AsmFragmentInstanceSpec(program, signature, bindings, codeScopeRef);
}
public static AsmFragmentInstanceSpec assignmentAlu(StatementAssignment assignment, StatementAssignment assignmentAlu, Program program) {
AsmFragmentBindings bindings = new AsmFragmentBindings(program);
ScopeRef codeScope = program.getStatementInfos().getBlock(assignment).getScope();
AsmFragmentSignature signature = assignmentWithAluSignature(bindings, assignment, assignmentAlu);
return new AsmFragmentInstanceSpec(program, signature, bindings, codeScope);
}
private static AsmFragmentSignature assignmentWithAluSignature(AsmFragmentBindings bindingContext, StatementAssignment assignment, StatementAssignment assignmentAlu) {
if (!(assignment.getrValue2() instanceof VariableRef)) {
throw new AsmFragmentInstance.AluNotApplicableException("Error! ALU register only allowed as rValue2. " + assignment);
}
VariableRef assignmentRValue2 = (VariableRef) assignment.getrValue2();
Variable assignmentRValue2Var = bindingContext.program.getSymbolInfos().getVariable(assignmentRValue2);
Registers.Register rVal2Register = assignmentRValue2Var.getAllocation();
if (!rVal2Register.getType().equals(Registers.RegisterType.REG_ALU)) {
throw new AsmFragmentInstance.AluNotApplicableException("Error! ALU register only allowed as rValue2. " + assignment);
}
final AsmFragmentSignatureExpr lValueFragmentExpr = bindingContext.bind(assignment.getlValue());
AsmFragmentSignatureExpr rVal1FragmentExpr = null;
if (assignment.getrValue1() != null) {
rVal1FragmentExpr = bindingContext.bind(assignment.getrValue1());
}
final AsmFragmentSignatureExpr rVal2FragmentExpr = assignmentRightSideSignature(
bindingContext,
assignmentAlu.getrValue1(),
assignmentAlu.getOperator(),
assignmentAlu.getrValue2());
if (rVal1FragmentExpr == null) {
return new AsmFragmentSignature.Assignment(lValueFragmentExpr, rVal2FragmentExpr);
} else {
return new AsmFragmentSignature.Assignment(
lValueFragmentExpr,
new AsmFragmentSignatureExpr.Binary(
(OperatorBinary) assignment.getOperator(),
rVal1FragmentExpr,
rVal2FragmentExpr)
);
}
}
private static AsmFragmentSignatureExpr assignmentRightSideSignature(AsmFragmentBindings bindings, RValue rValue1, Operator operator, RValue rValue2) {
final SymbolType rValue1Type = rValue1 == null ? null : SymbolTypeInference.inferType(bindings.program.getScope(), rValue1);
if (rValue1 == null && operator == null) {

View File

@ -187,8 +187,6 @@ public class AsmFragmentBindings {
return "yy";
} else if (Registers.RegisterType.REG_Z.equals(register.getType())) {
return "zz";
} else if (Registers.RegisterType.REG_ALU.equals(register.getType())) {
throw new AsmFragmentInstance.AluNotApplicableException();
} else {
throw new RuntimeException("Not implemented " + register.getType());
}

View File

@ -10,7 +10,6 @@ import java.util.Objects;
/** The different registers available for a program */
public class Registers {
public static Register getRegisterX() {
return new RegisterXByte();
}
@ -27,10 +26,6 @@ public class Registers {
return new RegisterAByte();
}
public static Register getRegisterALU() {
return new RegisterALUByte();
}
public static Register getRegister(String name) {
switch(name.toUpperCase(Locale.ENGLISH)) {
case "A":
@ -52,7 +47,6 @@ public class Registers {
REG_Y,
REG_X,
REG_Z,
REG_ALU,
ZP_MEM,
MAIN_MEM,
CONSTANT,
@ -333,20 +327,6 @@ public class Registers {
}
/** The special ALU register. */
public static class RegisterALUByte extends RegisterCpuByte {
@Override
public RegisterType getType() {
return RegisterType.REG_ALU;
}
@Override
public String toString() {
return "reg byte alu";
}
}
/** Special register used for constants. Has no corresponding CPU register. */
public static class RegisterConstant implements Register {

View File

@ -1,119 +0,0 @@
package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.model.*;
import dk.camelot64.kickc.model.operators.Operators;
import dk.camelot64.kickc.model.values.VariableRef;
import dk.camelot64.kickc.model.statements.Statement;
import dk.camelot64.kickc.model.statements.StatementAssignment;
/***
* Find equivalence classes that could be assigned to the special ALU register.
*
* Sets the potential inside the {@link RegisterPotentials} for al variables that has the potential.
*/
public class Pass4RegisterUpliftPotentialAluAnalysis extends Pass2Base {
private LiveRangeEquivalenceClassSet liveRangeEquivalenceClassSet;
public Pass4RegisterUpliftPotentialAluAnalysis(Program program) {
super(program);
}
/***
* Look through all statements identifying statement combinations that are fit for ALU.
*
* ALU is usable for v1 in the following sequence - if v1 is alive only in the first statement:<br>
* v1 = vx *idx vy / v1 = * vx <br>
* zzz = v1 + vz / zzz = vz + v1 / zzz = vz - v1 <br>
*
*/
public void findPotentialAlu() {
RegisterPotentials registerPotentials = getProgram().getRegisterPotentials();
this.liveRangeEquivalenceClassSet = getProgram().getLiveRangeEquivalenceClassSet();
for(ControlFlowBlock block : getProgram().getGraph().getAllBlocks()) {
VariableRef potentialAluVar = null;
for(Statement statement : block.getStatements()) {
if(potentialAluVar != null) {
// Previous assignment has ALU potential - check if current statement can use it
if(statement instanceof StatementAssignment) {
StatementAssignment assignment = (StatementAssignment) statement;
if(assignment.getOperator() != null && "-".equals(assignment.getOperator().getOperator())) {
// ALU applicable if the variable is the second lValue and the first lValue is non-null
if(assignment.getrValue2().equals(potentialAluVar) && assignment.getrValue1() != null) {
// The variable has ALU potential
setHasAluPotential(registerPotentials, potentialAluVar);
}
} else if(assignment.getOperator() != null && (Operators.PLUS.equals(assignment.getOperator()) || Operators.BOOL_OR.equals(assignment.getOperator()) || Operators.WORD.equals(assignment.getOperator()))) {
// ALU applicable if the variable is one of the two values
if(assignment.getrValue2().equals(potentialAluVar) && assignment.getrValue1() != null) {
// The variable has ALU potential
setHasAluPotential(registerPotentials, potentialAluVar);
}
if(assignment.getrValue1().equals(potentialAluVar) && assignment.getrValue2() != null) {
// The variable has ALU potential
setHasAluPotential(registerPotentials, potentialAluVar);
}
}
}
}
potentialAluVar = null;
if(statement instanceof StatementAssignment) {
StatementAssignment assignment = (StatementAssignment) statement;
if(assignment.getOperator() != null && "*".equals(assignment.getOperator().getOperator()) && assignment.getrValue1() == null) {
potentialAluVar = findAluPotential(assignment);
}
if(assignment.getOperator() != null && "*idx".equals(assignment.getOperator().getOperator())) {
potentialAluVar = findAluPotential(assignment);
}
if(assignment.getOperator() != null && Operators.BYTE0.equals(assignment.getOperator()) && assignment.getrValue1() == null) {
potentialAluVar = findAluPotential(assignment);
}
if(assignment.getOperator() != null && Operators.BYTE1.equals(assignment.getOperator()) && assignment.getrValue1() == null) {
potentialAluVar = findAluPotential(assignment);
}
if(assignment.getOperator() != null && Operators.BYTE2.equals(assignment.getOperator()) && assignment.getrValue1() == null) {
potentialAluVar = findAluPotential(assignment);
}
if(assignment.getOperator() != null && Operators.BYTE3.equals(assignment.getOperator()) && assignment.getrValue1() == null) {
potentialAluVar = findAluPotential(assignment);
}
// TODO: Remove these and find a better way generate ASM for additions and other operations in 16bit
if(assignment.getOperator() != null && Operators.WORD0.equals(assignment.getOperator()) && assignment.getrValue1() == null) {
potentialAluVar = findAluPotential(assignment);
}
if(assignment.getOperator() != null && Operators.WORD1.equals(assignment.getOperator()) && assignment.getrValue1() == null) {
potentialAluVar = findAluPotential(assignment);
}
}
}
}
}
private VariableRef findAluPotential(StatementAssignment assignment) {
VariableRef potentialAluVar = null;
if(assignment.getlValue() instanceof VariableRef) {
VariableRef var = (VariableRef) assignment.getlValue();
LiveRangeEquivalenceClass varEquivalenceClass = liveRangeEquivalenceClassSet.getEquivalenceClass(var);
if(varEquivalenceClass.getVariables().size() == 1) {
// Alone in equivalence class
LiveRange liveRange = varEquivalenceClass.getLiveRange();
if(liveRange.size() == 1) {
// Only used in the following statement
potentialAluVar = var;
}
}
}
return potentialAluVar;
}
private void setHasAluPotential(RegisterPotentials registerPotentials, VariableRef ref) {
LiveRangeEquivalenceClass potentialAluEquivalenceClass = liveRangeEquivalenceClassSet.getEquivalenceClass(ref);
registerPotentials.addPotentialRegister(potentialAluEquivalenceClass, Registers.getRegisterALU());
getLog().append("Equivalence Class " + potentialAluEquivalenceClass + " has ALU potential.");
}
}

View File

@ -88,13 +88,6 @@ public class Pass4RegisterUpliftPotentialRegisterAnalysis extends Pass2Base {
referencedClasses.add(liveRangeEquivalenceClassSet.getEquivalenceClass(var));
}
// If statement assigns to an ALU potential equivalence class then always clobbered is empty
for(LiveRangeEquivalenceClass assignedClass : assignedClasses) {
if(registerPotentials.getPotentialRegisters(assignedClass).contains(Registers.getRegisterALU())) {
continue;
}
}
// Generate all combinations of potential register allocations for the referenced equivalence classes
// one statement has so few references that all combinations wont explode
RegisterCombinationIterator combinationIterator = registerPotentials.getAllCombinations(referencedClasses);
@ -173,9 +166,8 @@ public class Pass4RegisterUpliftPotentialRegisterAnalysis extends Pass2Base {
// Generate ASM
AsmProgram asm = new AsmProgram(getProgram().getTargetCpu());
asm.startChunk(block.getScope(), statement.getIndex(), statement.toString(getProgram(), false));
Pass4CodeGeneration.AsmCodegenAluState aluState = new Pass4CodeGeneration.AsmCodegenAluState();
try {
(new Pass4CodeGeneration(getProgram(), false, false)).generateStatementAsm(asm, block, statement, aluState, false);
(new Pass4CodeGeneration(getProgram(), false, false)).generateStatementAsm(asm, block, statement, false);
} catch(AsmFragmentTemplateSynthesizer.UnknownFragmentException e) {
unknownFragments.add(e.getFragmentSignature());
StringBuilder msg = new StringBuilder();

View File

@ -2060,7 +2060,6 @@ Allocated zp[1]:65 [ bitmap_init::$7 ]
Allocated zp[1]:66 [ next#5 next#0 ]
Allocated zp[2]:67 [ memset::str#3 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:47 [ bitmap_init::$4 ] has ALU potential.
Statement [0] *BORDER_COLOR = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [1] *BG_COLOR = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] *D011 = VICII_BMM|VICII_DEN|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
@ -2184,7 +2183,7 @@ Potential registers zp[1]:2 [ bitmap_plot::y#4 bitmap_plot::y#2 bitmap_plot::y#1
Potential registers zp[2]:8 [ bitmap_plot::x#4 bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#3 ] : zp[2]:8 ,
Potential registers zp[2]:40 [ bitmap_line::x2#0 ] : zp[2]:40 ,
Potential registers zp[1]:65 [ bitmap_init::$7 ] : zp[1]:65 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:47 [ bitmap_init::$4 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y , reg byte alu ,
Potential registers zp[1]:47 [ bitmap_init::$4 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:48 [ bitmap_init::$5 ] : zp[1]:48 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:49 [ bitmap_init::$6 ] : zp[1]:49 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:50 [ abs_u16::return#0 ] : zp[2]:50 ,
@ -2226,7 +2225,7 @@ Uplifting [abs_u16] best 36697 combination zp[2]:22 [ abs_u16::return#4 abs_u16:
Uplifting [sgn_u16] best 36687 combination reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$1 ] zp[2]:28 [ sgn_u16::w#2 sgn_u16::w#0 ] zp[2]:54 [ sgn_u16::return#0 ] zp[2]:56 [ sgn_u16::return#1 ] zp[2]:63 [ sgn_u16::return#4 ]
Uplifting [memset] best 36671 combination zp[2]:20 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:58 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:61 [ memset::num#2 ] zp[2]:67 [ memset::str#3 ]
Uplifting [bitmap_init] best 36221 combination zp[2]:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:48 [ bitmap_init::$5 ] zp[1]:49 [ bitmap_init::$6 ] zp[1]:65 [ bitmap_init::$7 ]
Limited combination testing to 100 combinations of 15360 possible.
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [init_screen] best 36221 combination zp[2]:42 [ init_screen::c#2 init_screen::c#1 ]
Uplifting [] best 36221 combination zp[1]:66 [ next#5 next#0 ]
Uplifting [MOS6526_CIA] best 36221 combination

View File

@ -2035,7 +2035,6 @@ Allocated zp[1]:63 [ bitmap_init::$7 ]
Allocated zp[2]:64 [ next#6 next#11 next#0 ]
Allocated zp[2]:66 [ memset::str#3 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:45 [ bitmap_init::$4 ] has ALU potential.
Statement [0] *BORDER_COLOR = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [1] *BG_COLOR = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] *D011 = VICII_BMM|VICII_DEN|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
@ -2154,7 +2153,7 @@ Potential registers zp[1]:2 [ bitmap_plot::y#4 bitmap_plot::y#2 bitmap_plot::y#1
Potential registers zp[2]:8 [ bitmap_plot::x#4 bitmap_plot::x#2 bitmap_plot::x#1 bitmap_plot::x#3 ] : zp[2]:8 ,
Potential registers zp[2]:40 [ bitmap_line::x2#0 ] : zp[2]:40 ,
Potential registers zp[1]:63 [ bitmap_init::$7 ] : zp[1]:63 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:45 [ bitmap_init::$4 ] : zp[1]:45 , reg byte a , reg byte x , reg byte y , reg byte alu ,
Potential registers zp[1]:45 [ bitmap_init::$4 ] : zp[1]:45 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:46 [ bitmap_init::$5 ] : zp[1]:46 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:47 [ bitmap_init::$6 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:48 [ abs_u16::return#0 ] : zp[2]:48 ,
@ -2195,7 +2194,7 @@ Uplifting [abs_u16] best 36592 combination zp[2]:22 [ abs_u16::return#4 abs_u16:
Uplifting [sgn_u16] best 36582 combination reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$1 ] zp[2]:28 [ sgn_u16::w#2 sgn_u16::w#0 ] zp[2]:52 [ sgn_u16::return#0 ] zp[2]:54 [ sgn_u16::return#1 ] zp[2]:61 [ sgn_u16::return#4 ]
Uplifting [memset] best 36566 combination zp[2]:20 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:56 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:59 [ memset::num#2 ] zp[2]:66 [ memset::str#3 ]
Uplifting [bitmap_init] best 36116 combination zp[2]:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:46 [ bitmap_init::$5 ] zp[1]:47 [ bitmap_init::$6 ] zp[1]:63 [ bitmap_init::$7 ]
Limited combination testing to 100 combinations of 15360 possible.
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [] best 36116 combination zp[2]:64 [ next#6 next#11 next#0 ]
Uplifting [MOS6526_CIA] best 36116 combination
Uplifting [MOS6569_VICII] best 36116 combination

View File

@ -1469,7 +1469,6 @@ Allocated zp[1]:33 [ main::y#2 main::y#1 ]
Allocated zp[1]:34 [ frame_cnt ]
Allocated zp[2]:35 [ memset::str#3 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:10 [ bitmap_init::$4 ] has ALU potential.
Statement [1] frame_cnt = 1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a
Statement [5] *BG_COLOR = WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a
Statement [6] if(0==frame_cnt) goto irq::@1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a
@ -1564,7 +1563,7 @@ Potential registers zp[1]:34 [ frame_cnt ] : zp[1]:34 ,
Potential registers zp[2]:26 [ bitmap_plot::x#0 ] : zp[2]:26 ,
Potential registers zp[1]:7 [ bitmap_plot::y#0 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:23 [ bitmap_init::$7 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:10 [ bitmap_init::$4 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , reg byte alu ,
Potential registers zp[1]:10 [ bitmap_init::$4 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:11 [ bitmap_init::$5 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:12 [ bitmap_init::$6 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:24 [ bitmap_plot::plotter#0 ] : zp[2]:24 ,
@ -1589,7 +1588,7 @@ Uplift Scope [__start]
Uplifting [memset] best 4868 combination zp[2]:2 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:16 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:21 [ memset::num#2 ] zp[2]:35 [ memset::str#3 ]
Uplifting [bitmap_init] best 4418 combination zp[2]:4 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:11 [ bitmap_init::$5 ] zp[1]:12 [ bitmap_init::$6 ] zp[1]:23 [ bitmap_init::$7 ]
Limited combination testing to 100 combinations of 15360 possible.
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [bitmap_plot] best 4379 combination reg byte x [ bitmap_plot::y#0 ] zp[2]:13 [ bitmap_plot::$1 ] reg byte x [ bitmap_plot::$2 ] zp[2]:18 [ bitmap_plot::plotter#1 ] zp[2]:24 [ bitmap_plot::plotter#0 ] zp[2]:26 [ bitmap_plot::x#0 ]
Uplifting [main] best 4379 combination zp[1]:28 [ main::vy#2 main::vy#8 main::vy#1 ] zp[2]:29 [ main::vx#2 main::vx#6 main::vx#1 ] zp[2]:31 [ main::x#2 main::x#1 ] zp[1]:33 [ main::y#2 main::y#1 ]
Uplifting [] best 4379 combination zp[1]:34 [ frame_cnt ]

View File

@ -125,7 +125,9 @@ irq: {
main: {
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
.label __6 = 2
.label __7 = $18
.label __10 = 2
.label __11 = $1a
.label __19 = $1c
.label __20 = $1c
.label cos_x = $1c
@ -207,14 +209,18 @@ main: {
rol.z __6+2
rol.z __6+3
// WORD1(xpos<<4)
lda.z __6+2
sta.z __7
lda.z __6+3
sta.z __7+1
// word x = (word)(160 + WORD1(xpos<<4))
lda #<$a0
lda #$a0
clc
adc.z __6+2
adc.z x
sta.z x
lda #>$a0
adc.z __6+3
sta.z x+1
bcc !+
inc.z x+1
!:
// signed word sin_y = SINE[idx_y]
lda.z idx_y
asl
@ -262,14 +268,18 @@ main: {
rol.z __10+2
rol.z __10+3
// WORD1(ypos<<4)
lda.z __10+2
sta.z __11
lda.z __10+3
sta.z __11+1
// word y = (word)(100 + WORD1(ypos<<4))
lda #<$64
lda #$64
clc
adc.z __10+2
adc.z y
sta.z y
lda #>$64
adc.z __10+3
sta.z y+1
bcc !+
inc.z y+1
!:
// bitmap_plot(x, (byte)y)
ldx.z y
jsr bitmap_plot

View File

@ -3548,6 +3548,7 @@ Statement [25] mul16s::b#1 = main::cos_x#0 [ frame_cnt main::idx_x#3 main::idx_y
Statement [27] mul16s::return#3 = mul16s::return#1 [ frame_cnt main::idx_x#3 main::idx_y#3 mul16s::return#3 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 mul16s::return#3 ] { { mul16s::b#1 = mul16s::b#3 main::cos_x#0 } { mul16s::return#1 = mul16s::return#3 } } ) always clobbers reg byte a
Statement [28] main::xpos#0 = mul16s::return#3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::xpos#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::xpos#0 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [29] main::$6 = main::xpos#0 << 4 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$6 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$6 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [30] main::$7 = word1 main::$6 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$7 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$7 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [31] main::x#0 = $a0 + main::$7 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [32] main::$20 = main::idx_y#3 << 1 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$20 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$20 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [33] main::$22 = SINE + main::$20 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$22 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$22 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
@ -3556,6 +3557,7 @@ Statement [35] mul16s::b#2 = main::sin_y#0 [ frame_cnt main::idx_x#3 main::idx_y
Statement [37] mul16s::return#4 = mul16s::return#1 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#4 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [38] main::ypos#0 = mul16s::return#4 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::ypos#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::ypos#0 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [39] main::$10 = main::ypos#0 << 4 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$10 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$10 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [40] main::$11 = word1 main::$10 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$11 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$11 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [41] main::y#0 = $64 + main::$11 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::y#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::y#0 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [42] bitmap_plot::x#0 = main::x#0 [ frame_cnt main::idx_x#3 main::idx_y#3 main::y#0 bitmap_plot::x#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::y#0 bitmap_plot::x#0 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [46] if(main::idx_x#1!=$200) goto main::@12 [ frame_cnt main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt main::idx_y#3 main::idx_x#1 ] { } ) always clobbers reg byte a
@ -3674,6 +3676,7 @@ Statement [25] mul16s::b#1 = main::cos_x#0 [ frame_cnt main::idx_x#3 main::idx_y
Statement [27] mul16s::return#3 = mul16s::return#1 [ frame_cnt main::idx_x#3 main::idx_y#3 mul16s::return#3 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 mul16s::return#3 ] { { mul16s::b#1 = mul16s::b#3 main::cos_x#0 } { mul16s::return#1 = mul16s::return#3 } } ) always clobbers reg byte a
Statement [28] main::xpos#0 = mul16s::return#3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::xpos#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::xpos#0 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [29] main::$6 = main::xpos#0 << 4 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$6 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$6 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [30] main::$7 = word1 main::$6 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$7 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::$7 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [31] main::x#0 = $a0 + main::$7 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [32] main::$20 = main::idx_y#3 << 1 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$20 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$20 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [33] main::$22 = SINE + main::$20 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$22 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$22 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
@ -3682,6 +3685,7 @@ Statement [35] mul16s::b#2 = main::sin_y#0 [ frame_cnt main::idx_x#3 main::idx_y
Statement [37] mul16s::return#4 = mul16s::return#1 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#4 ] { { mul16s::b#2 = mul16s::b#3 main::sin_y#0 } { mul16s::return#1 = mul16s::return#4 } } ) always clobbers reg byte a
Statement [38] main::ypos#0 = mul16s::return#4 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::ypos#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::ypos#0 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [39] main::$10 = main::ypos#0 << 4 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$10 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$10 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [40] main::$11 = word1 main::$10 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$11 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::$11 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [41] main::y#0 = $64 + main::$11 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::y#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::x#0 main::y#0 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [42] bitmap_plot::x#0 = main::x#0 [ frame_cnt main::idx_x#3 main::idx_y#3 main::y#0 bitmap_plot::x#0 ] ( main:3 [ frame_cnt main::idx_x#3 main::idx_y#3 main::y#0 bitmap_plot::x#0 ] { { bitmap_plot::x#0 = main::x#0 } } ) always clobbers reg byte a
Statement [46] if(main::idx_x#1!=$200) goto main::@12 [ frame_cnt main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt main::idx_y#3 main::idx_x#1 ] { } ) always clobbers reg byte a
@ -3911,23 +3915,23 @@ Limited combination testing to 100 combinations of 15360 possible.
Uplifting [bitmap_plot] best 26699 combination reg byte x [ bitmap_plot::y#0 ] zp[2]:126 [ bitmap_plot::$1 ] reg byte x [ bitmap_plot::$2 ] zp[2]:139 [ bitmap_plot::plotter#1 ] zp[2]:155 [ bitmap_plot::plotter#0 ] zp[2]:157 [ bitmap_plot::x#0 ]
Uplifting [sin16s_gen2] best 26699 combination zp[2]:106 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp[4]:119 [ sin16s_gen2::$6 ] zp[4]:143 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp[2]:150 [ sin16s_gen2::$8 ] zp[2]:152 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp[4]:214 [ sin16s_gen2::step#0 ]
Uplifting [div32u16u] best 26699 combination zp[2]:133 [ div32u16u::quotient_lo#0 ] zp[2]:159 [ div32u16u::quotient_hi#0 ] zp[4]:161 [ div32u16u::return#1 ] zp[4]:208 [ div32u16u::return#0 ]
Uplifting [main] best 26459 combination zp[2]:166 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp[2]:168 [ main::$19 ] zp[2]:170 [ main::$21 ] zp[2]:172 [ main::cos_x#0 ] zp[4]:178 [ main::xpos#0 ] zp[4]:182 [ main::$6 ] reg byte alu [ main::$7 ] zp[2]:188 [ main::$20 ] zp[2]:190 [ main::$22 ] zp[2]:192 [ main::sin_y#0 ] zp[4]:198 [ main::ypos#0 ] zp[4]:202 [ main::$10 ] reg byte alu [ main::$11 ] zp[2]:212 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] zp[2]:218 [ main::y#0 ] zp[2]:220 [ main::x#0 ]
Uplifting [] best 26459 combination zp[2]:108 [ rem16u#14 ] zp[1]:222 [ frame_cnt ]
Uplifting [MOS6526_CIA] best 26459 combination
Uplifting [MOS6569_VICII] best 26459 combination
Uplifting [MOS6581_SID] best 26459 combination
Uplifting [bitmap_clear] best 26459 combination
Uplifting [init_irq] best 26459 combination
Uplifting [irq] best 26459 combination
Uplifting [__start] best 26459 combination
Uplifting [main] best 26699 combination zp[2]:166 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp[2]:168 [ main::$19 ] zp[2]:170 [ main::$21 ] zp[2]:172 [ main::cos_x#0 ] zp[4]:178 [ main::xpos#0 ] zp[4]:182 [ main::$6 ] zp[2]:186 [ main::$7 ] zp[2]:188 [ main::$20 ] zp[2]:190 [ main::$22 ] zp[2]:192 [ main::sin_y#0 ] zp[4]:198 [ main::ypos#0 ] zp[4]:202 [ main::$10 ] zp[2]:206 [ main::$11 ] zp[2]:212 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] zp[2]:218 [ main::y#0 ] zp[2]:220 [ main::x#0 ]
Uplifting [] best 26699 combination zp[2]:108 [ rem16u#14 ] zp[1]:222 [ frame_cnt ]
Uplifting [MOS6526_CIA] best 26699 combination
Uplifting [MOS6569_VICII] best 26699 combination
Uplifting [MOS6581_SID] best 26699 combination
Uplifting [bitmap_clear] best 26699 combination
Uplifting [init_irq] best 26699 combination
Uplifting [irq] best 26699 combination
Uplifting [__start] best 26699 combination
Attempting to uplift remaining variables inzp[1]:124 [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 26399 combination reg byte a [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 26639 combination reg byte a [ bitmap_init::$5 ]
Attempting to uplift remaining variables inzp[1]:125 [ bitmap_init::$6 ]
Uplifting [bitmap_init] best 26339 combination reg byte a [ bitmap_init::$6 ]
Uplifting [bitmap_init] best 26579 combination reg byte a [ bitmap_init::$6 ]
Attempting to uplift remaining variables inzp[1]:154 [ bitmap_init::$7 ]
Uplifting [bitmap_init] best 26339 combination zp[1]:154 [ bitmap_init::$7 ]
Uplifting [bitmap_init] best 26579 combination zp[1]:154 [ bitmap_init::$7 ]
Attempting to uplift remaining variables inzp[1]:222 [ frame_cnt ]
Uplifting [] best 26339 combination zp[1]:222 [ frame_cnt ]
Uplifting [] best 26579 combination zp[1]:222 [ frame_cnt ]
Coalescing zero page register [ zp[2]:48 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp[2]:93 [ sin16s::usinx#1 ] ] - score: 2
Coalescing zero page register [ zp[2]:19 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 ] ] with [ zp[2]:91 [ sin16s::x3#0 ] ] - score: 2
Coalescing zero page register [ zp[2]:100 [ mul16s::a#3 mul16s::a#0 ] ] with [ zp[2]:113 [ sin16s::return#0 ] ] - score: 1
@ -3946,9 +3950,10 @@ Coalescing zero page register [ zp[2]:19 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mul
Coalescing zero page register [ zp[2]:19 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp[2]:82 [ sin16s::x4#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:168 [ main::$19 ] ] with [ zp[2]:170 [ main::$21 ] ] - score: 1
Coalescing zero page register [ zp[4]:174 [ mul16s::return#3 ] ] with [ zp[4]:178 [ main::xpos#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:220 [ main::x#0 ] ] with [ zp[2]:157 [ bitmap_plot::x#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:186 [ main::$7 ] ] with [ zp[2]:220 [ main::x#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:188 [ main::$20 ] ] with [ zp[2]:190 [ main::$22 ] ] - score: 1
Coalescing zero page register [ zp[4]:194 [ mul16s::return#4 ] ] with [ zp[4]:198 [ main::ypos#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:206 [ main::$11 ] ] with [ zp[2]:218 [ main::y#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:208 [ div32u16u::return#0 ] ] with [ zp[4]:214 [ sin16s_gen2::step#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:208 [ div32u16u::return#0 sin16s_gen2::step#0 ] ] with [ zp[4]:161 [ div32u16u::return#1 ] ] - score: 1
Coalescing zero page register [ zp[4]:115 [ mul16s::return#0 ] ] with [ zp[4]:119 [ sin16s_gen2::$6 ] ] - score: 1
@ -3968,6 +3973,7 @@ Coalescing zero page register [ zp[4]:42 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 m
Coalescing zero page register [ zp[2]:17 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp[2]:133 [ div32u16u::quotient_lo#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:19 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 ] ] with [ zp[2]:74 [ mulu16_sel::return#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:19 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 ] ] with [ zp[2]:80 [ mulu16_sel::return#10 ] ] - score: 1
Coalescing zero page register [ zp[2]:186 [ main::$7 main::x#0 ] ] with [ zp[2]:157 [ bitmap_plot::x#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:70 [ mulu16_sel::return#0 mulu16_sel::return#12 ] ] with [ zp[2]:76 [ mulu16_sel::return#2 sin16s::x3_6#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:70 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 ] ] with [ zp[2]:84 [ mulu16_sel::return#11 sin16s::x5#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:100 [ mul16s::a#3 mul16s::a#0 sin16s::return#0 mul16s::$12 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp[2]:137 [ sin16s::usinx#0 ] ] - score: 1
@ -3985,8 +3991,8 @@ Coalescing zero page register [ zp[2]:155 [ bitmap_plot::plotter#0 bitmap_plot::
Coalescing zero page register [ zp[2]:126 [ bitmap_plot::$1 ] ] with [ zp[2]:58 [ mul16s::$6 mul16s::$11 ] ]
Coalescing zero page register [ zp[2]:159 [ div32u16u::quotient_hi#0 ] ] with [ zp[2]:62 [ mul16s::$9 ] ]
Coalescing zero page register [ zp[4]:66 [ sin16s::$4 ] ] with [ zp[4]:6 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] ]
Coalescing zero page register [ zp[2]:220 [ main::x#0 bitmap_plot::x#0 ] ] with [ zp[2]:95 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ] ]
Coalescing zero page register [ zp[2]:218 [ main::y#0 ] ] with [ zp[2]:148 [ memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] ]
Coalescing zero page register [ zp[2]:186 [ main::$7 main::x#0 bitmap_plot::x#0 ] ] with [ zp[2]:95 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ] ]
Coalescing zero page register [ zp[2]:206 [ main::$11 main::y#0 ] ] with [ zp[2]:148 [ memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] ]
Coalescing zero page register [ zp[2]:155 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 sin16s_gen2::$8 ] ] with [ zp[2]:223 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 mul16s::a#3 mul16s::a#0 sin16s::return#0 mul16s::$12 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::usinx#0 ] ]
Coalescing zero page register [ zp[2]:126 [ bitmap_plot::$1 mul16s::$6 mul16s::$11 ] ] with [ zp[2]:13 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 mul16u::b#2 mul16u::b#1 mul16u::b#0 mulu16_sel::v2#5 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#3 ] ]
Coalescing zero page register [ zp[2]:97 [ sin16s::x1#0 ] ] with [ zp[2]:159 [ div32u16u::quotient_hi#0 mul16s::$9 ] ]
@ -3999,8 +4005,8 @@ Allocated (was zp[2]:19) zp[2]:14 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel
Allocated (was zp[2]:155) zp[2]:16 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 sin16s_gen2::$8 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 mul16s::a#3 mul16s::a#0 sin16s::return#0 mul16s::$12 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::usinx#0 ]
Allocated (was zp[4]:38) zp[4]:18 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ]
Allocated (was zp[2]:97) zp[2]:22 [ sin16s::x1#0 div32u16u::quotient_hi#0 mul16s::$9 ]
Allocated (was zp[2]:220) zp[2]:24 [ main::x#0 bitmap_plot::x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ]
Allocated (was zp[2]:218) zp[2]:26 [ main::y#0 memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
Allocated (was zp[2]:186) zp[2]:24 [ main::$7 main::x#0 bitmap_plot::x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ]
Allocated (was zp[2]:206) zp[2]:26 [ main::$11 main::y#0 memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
Allocated (was zp[2]:141) zp[2]:28 [ mul16s::b#3 mul16s::b#2 mul16s::b#1 main::cos_x#0 main::sin_y#0 main::$19 main::$21 main::$20 main::$22 ]
Allocated (was zp[2]:108) zp[2]:30 [ rem16u#14 ]
Allocated (was zp[4]:143) zp[4]:32 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ]
@ -4170,7 +4176,9 @@ irq: {
main: {
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
.label __6 = 2
.label __7 = $18
.label __10 = 2
.label __11 = $1a
.label __19 = $1c
.label __20 = $1c
.label cos_x = $1c
@ -4299,15 +4307,19 @@ main: {
rol.z __6+1
rol.z __6+2
rol.z __6+3
// [30] main::$7 = word1 main::$6
// [31] main::x#0 = $a0 + main::$7 -- vwuz1=vwuc1_plus__word1_vdsz2
lda #<$a0
// [30] main::$7 = word1 main::$6 -- vwuz1=_word1_vdsz2
lda.z __6+2
sta.z __7
lda.z __6+3
sta.z __7+1
// [31] main::x#0 = $a0 + main::$7 -- vwuz1=vbuc1_plus_vwuz1
lda #$a0
clc
adc.z __6+2
adc.z x
sta.z x
lda #>$a0
adc.z __6+3
sta.z x+1
bcc !+
inc.z x+1
!:
// [32] main::$20 = main::idx_y#3 << 1 -- vwuz1=vwuz2_rol_1
lda.z idx_y
asl
@ -4365,15 +4377,19 @@ main: {
rol.z __10+1
rol.z __10+2
rol.z __10+3
// [40] main::$11 = word1 main::$10
// [41] main::y#0 = $64 + main::$11 -- vwuz1=vwuc1_plus__word1_vdsz2
lda #<$64
// [40] main::$11 = word1 main::$10 -- vwuz1=_word1_vdsz2
lda.z __10+2
sta.z __11
lda.z __10+3
sta.z __11+1
// [41] main::y#0 = $64 + main::$11 -- vwuz1=vbuc1_plus_vwuz1
lda #$64
clc
adc.z __10+2
adc.z y
sta.z y
lda #>$64
adc.z __10+3
sta.z y+1
bcc !+
inc.z y+1
!:
// [42] bitmap_plot::x#0 = main::x#0
// [43] bitmap_plot::y#0 = (char)main::y#0 -- vbuxx=_byte_vwuz1
ldx.z y
@ -5999,13 +6015,13 @@ void init_irq()
__interrupt(hardware_clobber) void irq()
void main()
long main::$10 // zp[4]:2 202.0
unsigned int main::$11 // reg byte alu 202.0
unsigned int main::$11 // zp[2]:26 202.0
unsigned int main::$19 // zp[2]:28 202.0
unsigned int main::$20 // zp[2]:28 202.0
int *main::$21 // zp[2]:28 202.0
int *main::$22 // zp[2]:28 202.0
long main::$6 // zp[4]:2 202.0
unsigned int main::$7 // reg byte alu 202.0
unsigned int main::$7 // zp[2]:24 202.0
int main::cos_x
int main::cos_x#0 // cos_x zp[2]:28 202.0
unsigned int main::idx_x
@ -6190,10 +6206,8 @@ reg byte x [ divr16u::i#2 divr16u::i#1 ]
zp[2]:14 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ]
reg byte x [ mulu16_sel::select#5 ]
zp[1]:45 [ frame_cnt ]
reg byte alu [ main::$7 ]
zp[2]:24 [ main::x#0 bitmap_plot::x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ]
reg byte alu [ main::$11 ]
zp[2]:26 [ main::y#0 memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
zp[2]:24 [ main::$7 main::x#0 bitmap_plot::x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ]
zp[2]:26 [ main::$11 main::y#0 memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
reg byte x [ bitmap_plot::y#0 ]
zp[4]:36 [ div32u16u::return#0 sin16s_gen2::step#0 div32u16u::return#1 ]
zp[1]:40 [ bitmap_init::$7 ]
@ -6213,7 +6227,7 @@ zp[2]:30 [ rem16u#14 ]
FINAL ASSEMBLER
Score: 20488
Score: 20718
// File Comments
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
@ -6367,7 +6381,9 @@ irq: {
main: {
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
.label __6 = 2
.label __7 = $18
.label __10 = 2
.label __11 = $1a
.label __19 = $1c
.label __20 = $1c
.label cos_x = $1c
@ -6483,16 +6499,20 @@ main: {
rol.z __6+2
rol.z __6+3
// WORD1(xpos<<4)
// [30] main::$7 = word1 main::$6
// [30] main::$7 = word1 main::$6 -- vwuz1=_word1_vdsz2
lda.z __6+2
sta.z __7
lda.z __6+3
sta.z __7+1
// word x = (word)(160 + WORD1(xpos<<4))
// [31] main::x#0 = $a0 + main::$7 -- vwuz1=vwuc1_plus__word1_vdsz2
lda #<$a0
// [31] main::x#0 = $a0 + main::$7 -- vwuz1=vbuc1_plus_vwuz1
lda #$a0
clc
adc.z __6+2
adc.z x
sta.z x
lda #>$a0
adc.z __6+3
sta.z x+1
bcc !+
inc.z x+1
!:
// signed word sin_y = SINE[idx_y]
// [32] main::$20 = main::idx_y#3 << 1 -- vwuz1=vwuz2_rol_1
lda.z idx_y
@ -6552,16 +6572,20 @@ main: {
rol.z __10+2
rol.z __10+3
// WORD1(ypos<<4)
// [40] main::$11 = word1 main::$10
// [40] main::$11 = word1 main::$10 -- vwuz1=_word1_vdsz2
lda.z __10+2
sta.z __11
lda.z __10+3
sta.z __11+1
// word y = (word)(100 + WORD1(ypos<<4))
// [41] main::y#0 = $64 + main::$11 -- vwuz1=vwuc1_plus__word1_vdsz2
lda #<$64
// [41] main::y#0 = $64 + main::$11 -- vwuz1=vbuc1_plus_vwuz1
lda #$64
clc
adc.z __10+2
adc.z y
sta.z y
lda #>$64
adc.z __10+3
sta.z y+1
bcc !+
inc.z y+1
!:
// bitmap_plot(x, (byte)y)
// [42] bitmap_plot::x#0 = main::x#0
// [43] bitmap_plot::y#0 = (char)main::y#0 -- vbuxx=_byte_vwuz1

View File

@ -112,13 +112,13 @@ void init_irq()
__interrupt(hardware_clobber) void irq()
void main()
long main::$10 // zp[4]:2 202.0
unsigned int main::$11 // reg byte alu 202.0
unsigned int main::$11 // zp[2]:26 202.0
unsigned int main::$19 // zp[2]:28 202.0
unsigned int main::$20 // zp[2]:28 202.0
int *main::$21 // zp[2]:28 202.0
int *main::$22 // zp[2]:28 202.0
long main::$6 // zp[4]:2 202.0
unsigned int main::$7 // reg byte alu 202.0
unsigned int main::$7 // zp[2]:24 202.0
int main::cos_x
int main::cos_x#0 // cos_x zp[2]:28 202.0
unsigned int main::idx_x
@ -303,10 +303,8 @@ reg byte x [ divr16u::i#2 divr16u::i#1 ]
zp[2]:14 [ mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ]
reg byte x [ mulu16_sel::select#5 ]
zp[1]:45 [ frame_cnt ]
reg byte alu [ main::$7 ]
zp[2]:24 [ main::x#0 bitmap_plot::x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ]
reg byte alu [ main::$11 ]
zp[2]:26 [ main::y#0 memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
zp[2]:24 [ main::$7 main::x#0 bitmap_plot::x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 sin16s_gen2::i#2 sin16s_gen2::i#1 ]
zp[2]:26 [ main::$11 main::y#0 memset::num#2 memset::end#0 sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ]
reg byte x [ bitmap_plot::y#0 ]
zp[4]:36 [ div32u16u::return#0 sin16s_gen2::step#0 div32u16u::return#1 ]
zp[1]:40 [ bitmap_init::$7 ]

View File

@ -2189,7 +2189,6 @@ Allocated zp[2]:69 [ main::$14 ]
Allocated zp[1]:71 [ main::a#2 main::a#1 ]
Allocated zp[2]:72 [ memset::str#3 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:47 [ bitmap_init::$4 ] has ALU potential.
Statement [4] *D011 = VICII_BMM|VICII_DEN|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [6] *D018 = main::toD0181_return#0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [10] main::$13 = (unsigned int)COSTAB[main::a#2] [ main::i#2 main::a#2 main::$13 ] ( [ main::i#2 main::a#2 main::$13 ] { } ) always clobbers reg byte a
@ -2384,7 +2383,7 @@ Potential registers zp[2]:69 [ main::$14 ] : zp[2]:69 ,
Potential registers zp[2]:43 [ bitmap_line::x2#0 ] : zp[2]:43 ,
Potential registers zp[2]:41 [ bitmap_line::y2#0 ] : zp[2]:41 ,
Potential registers zp[1]:65 [ bitmap_init::$7 ] : zp[1]:65 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:47 [ bitmap_init::$4 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y , reg byte alu ,
Potential registers zp[1]:47 [ bitmap_init::$4 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:48 [ bitmap_init::$5 ] : zp[1]:48 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:49 [ bitmap_init::$6 ] : zp[1]:49 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:50 [ abs_u16::return#0 ] : zp[2]:50 ,
@ -2426,7 +2425,7 @@ Uplifting [abs_u16] best 32972 combination zp[2]:20 [ abs_u16::return#4 abs_u16:
Uplifting [sgn_u16] best 32962 combination reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$1 ] zp[2]:28 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp[2]:54 [ sgn_u16::return#0 ] zp[2]:56 [ sgn_u16::return#1 ] zp[2]:63 [ sgn_u16::return#4 ]
Uplifting [memset] best 32946 combination zp[2]:22 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:58 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:61 [ memset::num#2 ] zp[2]:72 [ memset::str#3 ]
Uplifting [bitmap_init] best 32496 combination zp[2]:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:48 [ bitmap_init::$5 ] zp[1]:49 [ bitmap_init::$6 ] zp[1]:65 [ bitmap_init::$7 ]
Limited combination testing to 100 combinations of 15360 possible.
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [main] best 32496 combination zp[1]:66 [ main::i#2 main::i#1 ] zp[2]:67 [ main::$13 ] zp[2]:69 [ main::$14 ] zp[1]:71 [ main::a#2 main::a#1 ]
Uplifting [MOS6526_CIA] best 32496 combination
Uplifting [MOS6569_VICII] best 32496 combination

View File

@ -831,7 +831,6 @@ Allocated zp[1]:31 [ init_plot_tables::$7 ]
Allocated zp[1]:32 [ init_plot_tables::$8 ]
Allocated zp[1]:33 [ init_plot_tables::$9 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:30 [ init_plot_tables::$6 ] has ALU potential.
Statement [0] *BG_COLOR = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [1] *FGCOL = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] *D011 = BMM|DEN|RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
@ -886,7 +885,7 @@ Potential registers zp[2]:20 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs
Potential registers zp[1]:17 [ plots::i#2 plots::i#1 ] : zp[1]:17 , reg byte x ,
Potential registers zp[1]:29 [ init_plot_tables::$0 ] : zp[1]:29 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:33 [ init_plot_tables::$9 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:30 [ init_plot_tables::$6 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y , reg byte alu ,
Potential registers zp[1]:30 [ init_plot_tables::$6 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:31 [ init_plot_tables::$7 ] : zp[1]:31 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:32 [ init_plot_tables::$8 ] : zp[1]:32 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:19 [ plot::x#0 ] : zp[1]:19 , reg byte x , reg byte y ,
@ -914,7 +913,7 @@ Uplifting [plot] best 10319 combination reg byte a [ plot::$6 ] reg byte a [ plo
Limited combination testing to 100 combinations of 9216 possible.
Uplifting [plots] best 8819 combination reg byte x [ plots::i#2 plots::i#1 ]
Uplifting [init_plot_tables] best 8359 combination zp[2]:20 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ] reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ] reg byte a [ init_plot_tables::$0 ] zp[1]:30 [ init_plot_tables::$6 ] zp[1]:31 [ init_plot_tables::$7 ] zp[1]:32 [ init_plot_tables::$8 ] zp[1]:33 [ init_plot_tables::$9 ]
Limited combination testing to 100 combinations of 34560 possible.
Limited combination testing to 100 combinations of 27648 possible.
Uplifting [init_screen] best 8359 combination zp[2]:22 [ init_screen::b#2 init_screen::b#1 ] zp[2]:24 [ init_screen::c#2 init_screen::c#1 ]
Uplifting [main] best 8359 combination
Uplifting [] best 8359 combination

View File

@ -2092,7 +2092,6 @@ Allocated zp[2]:66 [ memset::num#2 ]
Allocated zp[1]:68 [ bitmap_init::$7 ]
Allocated zp[2]:69 [ memset::str#3 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[1]:60 [ bitmap_init::$4 ] has ALU potential.
Statement [0] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR) = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [1] *((char *)VICII+OFFSET_STRUCT_MOS6569_VICII_BG_COLOR) = 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] *D011 = VICII_BMM|VICII_DEN|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
@ -2227,7 +2226,7 @@ Potential registers zp[2]:48 [ sgn_u16::return#4 ] : zp[2]:48 ,
Potential registers zp[1]:2 [ bitmap_plot::y#4 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 bitmap_plot::y#3 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:8 [ bitmap_plot::x#4 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 bitmap_plot::x#3 ] : zp[2]:8 ,
Potential registers zp[1]:68 [ bitmap_init::$7 ] : zp[1]:68 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:60 [ bitmap_init::$4 ] : zp[1]:60 , reg byte a , reg byte x , reg byte y , reg byte alu ,
Potential registers zp[1]:60 [ bitmap_init::$4 ] : zp[1]:60 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:61 [ bitmap_init::$5 ] : zp[1]:61 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:62 [ bitmap_init::$6 ] : zp[1]:62 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:32 [ bitmap_line::x2#0 ] : zp[2]:32 ,
@ -2273,7 +2272,7 @@ Uplifting [sgn_u16] best 297358 combination reg byte a [ sgn_u16::$0 ] reg byte
Uplifting [lines] best 297358 combination zp[1]:50 [ lines::l#2 lines::l#1 ]
Uplifting [memset] best 297342 combination zp[2]:51 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:63 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:66 [ memset::num#2 ] zp[2]:69 [ memset::str#3 ]
Uplifting [bitmap_init] best 296892 combination zp[2]:53 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:61 [ bitmap_init::$5 ] zp[1]:62 [ bitmap_init::$6 ] zp[1]:68 [ bitmap_init::$7 ]
Limited combination testing to 100 combinations of 15360 possible.
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [init_screen] best 296892 combination zp[2]:55 [ init_screen::c#2 init_screen::c#1 ]
Uplifting [MOS6526_CIA] best 296892 combination
Uplifting [MOS6569_VICII] best 296892 combination

View File

@ -1242,11 +1242,11 @@ Allocated zp[4]:28 [ main::dw#10 main::dw#1 ]
Allocated zp[4]:32 [ main::dw2#1 ]
Allocated zp[4]:36 [ main::dw2#10 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp[2]:20 [ main::$3 ] has ALU potential.
Equivalence Class zp[2]:24 [ main::$6 ] has ALU potential.
Statement [3] if(main::dw#10!=$12345690) goto main::@2 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 ] { } ) always clobbers reg byte a
Statement [5] main::$3 = word1 main::dw#10 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$3 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$3 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [6] main::$28 = main::$3 + $1111 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$28 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$28 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [7] main::dw2#1 = main::dw#10 word1= main::$28 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [8] main::$6 = word0 main::dw#10 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$6 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$6 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [9] main::$29 = main::$6 + $1111 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$29 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$29 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [10] main::dw2#10 = main::dw2#1 word0= main::$29 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [11] print_ulong::dw#0 = main::dw2#10 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 print_ulong::dw#0 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 print_ulong::dw#0 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
@ -1267,8 +1267,10 @@ Statement [73] print_line_cursor#38 = print_line_cursor#0 [ print_char_cursor#11
Statement [76] if(memset::dst#2!=memset::end#0) goto memset::@2 [ memset::dst#2 ] ( print_cls:1::memset:42 [ memset::dst#2 ] { } ) always clobbers reg byte a
Statement [78] *memset::dst#2 = memset::c#0 [ memset::dst#2 ] ( print_cls:1::memset:42 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y
Statement [3] if(main::dw#10!=$12345690) goto main::@2 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 ] { } ) always clobbers reg byte a
Statement [5] main::$3 = word1 main::dw#10 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$3 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$3 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [6] main::$28 = main::$3 + $1111 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$28 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::$28 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [7] main::dw2#1 = main::dw#10 word1= main::$28 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [8] main::$6 = word0 main::dw#10 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$6 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$6 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [9] main::$29 = main::$6 + $1111 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$29 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#1 main::$29 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [10] main::dw2#10 = main::dw2#1 word0= main::$29 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
Statement [11] print_ulong::dw#0 = main::dw2#10 [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 print_ulong::dw#0 ] ( [ main::dw#10 print_line_cursor#16 print_char_cursor#30 main::dw2#10 print_ulong::dw#0 ] { { print_ulong::dw#0 = main::dw2#10 } } ) always clobbers reg byte a
@ -1294,10 +1296,10 @@ Potential registers zp[2]:3 [ print_char_cursor#67 print_char_cursor#45 print_ch
Potential registers zp[1]:9 [ print_uchar::b#6 print_uchar::b#3 print_uchar::b#4 print_uchar::b#5 print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] : zp[1]:9 , reg byte x ,
Potential registers zp[2]:5 [ print_line_cursor#10 print_line_cursor#16 print_line_cursor#39 print_line_cursor#38 ] : zp[2]:5 ,
Potential registers zp[2]:12 [ memset::dst#2 memset::dst#1 ] : zp[2]:12 ,
Potential registers zp[2]:20 [ main::$3 ] : zp[2]:20 , reg byte alu ,
Potential registers zp[2]:20 [ main::$3 ] : zp[2]:20 ,
Potential registers zp[2]:22 [ main::$28 ] : zp[2]:22 ,
Potential registers zp[4]:32 [ main::dw2#1 ] : zp[4]:32 ,
Potential registers zp[2]:24 [ main::$6 ] : zp[2]:24 , reg byte alu ,
Potential registers zp[2]:24 [ main::$6 ] : zp[2]:24 ,
Potential registers zp[2]:26 [ main::$29 ] : zp[2]:26 ,
Potential registers zp[4]:36 [ main::dw2#10 ] : zp[4]:36 ,
Potential registers zp[4]:16 [ print_ulong::dw#0 ] : zp[4]:16 ,