mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-08 14:37:40 +00:00
Merged Travis Fishers upstream optimizations. Closes #92
This commit is contained in:
commit
23e3533064
1
.idea/encodings.xml
generated
1
.idea/encodings.xml
generated
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
2
pom.xml
2
pom.xml
@ -82,6 +82,8 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
<parallel>all</parallel>
|
||||
<threadCount>5</threadCount>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -11,9 +11,15 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
* Contains matching groups (parenthesis) that are used in sigReplace to build the signature of the sub-fragment to synthesize from. */
|
||||
final String sigMatch;
|
||||
|
||||
/** Compiled regex for sigMatch */
|
||||
Pattern sigMatchPattern = null;
|
||||
|
||||
/** Regular expression that limits which fragments the synthesize rule can handle. */
|
||||
final String sigAvoid;
|
||||
|
||||
/** Compiled regex for sigAvoid */
|
||||
Pattern sigAvoidPattern = null;
|
||||
|
||||
/** ASM code prefixed to the sub-fragment when synthesizing. */
|
||||
final private String asmPrefix;
|
||||
|
||||
@ -62,7 +68,20 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
* @return true if the rule matches the signature
|
||||
*/
|
||||
public boolean matches(String signature) {
|
||||
return signature.matches(sigMatch) && (sigAvoid == null || !signature.matches(sigAvoid));
|
||||
if (sigMatchPattern == null)
|
||||
sigMatchPattern = Pattern.compile(sigMatch);
|
||||
Matcher m = sigMatchPattern.matcher(signature);
|
||||
if (m.matches()) {
|
||||
if (sigAvoid == null)
|
||||
return true;
|
||||
else {
|
||||
if (sigAvoidPattern == null)
|
||||
sigAvoidPattern = Pattern.compile(sigAvoid);
|
||||
Matcher ma = sigAvoidPattern.matcher(signature);
|
||||
return !ma.matches();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,12 +106,12 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
}
|
||||
|
||||
public AsmFragmentTemplate synthesize(String signature, AsmFragmentTemplate subTemplate) {
|
||||
if(!matches(signature)) {
|
||||
throw new RuntimeException("Synthesis error! Attempting to synthesize on non-matching signature signature:"+signature+" match:"+sigMatch+" avoid:"+sigAvoid);
|
||||
}
|
||||
if(!subTemplate.getSignature().equals(getSubSignature(signature))) {
|
||||
throw new RuntimeException("Synthesis error! Attempting to synthesize on non-matching sub template sub-signature:"+subTemplate.getSignature()+" expecting:"+getSubSignature(signature));
|
||||
}
|
||||
// if(!matches(signature)) {
|
||||
// throw new RuntimeException("Synthesis error! Attempting to synthesize on non-matching signature signature:"+signature+" match:"+sigMatch+" avoid:"+sigAvoid);
|
||||
// }
|
||||
// if(!subTemplate.getSignature().equals(getSubSignature(signature))) {
|
||||
// throw new RuntimeException("Synthesis error! Attempting to synthesize on non-matching sub template sub-signature:"+subTemplate.getSignature()+" expecting:"+getSubSignature(signature));
|
||||
// }
|
||||
if(subDontClobber!=null) {
|
||||
if(subDontClobber.contains("aa") && subTemplate.getClobber().isClobberA()) return null;
|
||||
if(subDontClobber.contains("xx") && subTemplate.getClobber().isClobberX()) return null;
|
||||
|
@ -1,17 +1,15 @@
|
||||
package dk.camelot64.kickc.model;
|
||||
|
||||
import dk.camelot64.kickc.model.iterator.ProgramValueIterator;
|
||||
import dk.camelot64.kickc.model.statements.Statement;
|
||||
import dk.camelot64.kickc.model.statements.StatementAssignment;
|
||||
import dk.camelot64.kickc.model.statements.StatementCall;
|
||||
import dk.camelot64.kickc.model.statements.StatementPhiBlock;
|
||||
import dk.camelot64.kickc.model.symbols.Procedure;
|
||||
import dk.camelot64.kickc.model.symbols.Symbol;
|
||||
import dk.camelot64.kickc.model.values.LabelRef;
|
||||
import dk.camelot64.kickc.model.values.ScopeRef;
|
||||
import dk.camelot64.kickc.model.values.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* A named/labelled sequence of SSA statements connected to other basic blocks.
|
||||
@ -45,7 +43,6 @@ public class ControlFlowBlock {
|
||||
this.label = label;
|
||||
this.scope = scope;
|
||||
this.statements = new ArrayList<>();
|
||||
this.defaultSuccessor = null;
|
||||
this.conditionalSuccessor = null;
|
||||
this.comments = new ArrayList<>();
|
||||
}
|
||||
@ -207,7 +204,7 @@ public class ControlFlowBlock {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = label.hashCode();
|
||||
result = 31 * result + (statements != null ? statements.hashCode() : 0);
|
||||
result = 31 * result + statements.size();
|
||||
result = 31 * result + (defaultSuccessor != null ? defaultSuccessor.hashCode() : 0);
|
||||
result = 31 * result + (conditionalSuccessor != null ? conditionalSuccessor.hashCode() : 0);
|
||||
result = 31 * result + (callSuccessor != null ? callSuccessor.hashCode() : 0);
|
||||
|
@ -40,9 +40,13 @@ public class Pass5DoubleJumpElimination extends Pass5AsmOptimization {
|
||||
if(currentLabel != null) {
|
||||
AsmInstruction asmInstruction = (AsmInstruction) line;
|
||||
AsmInstructionType jmpType = AsmInstructionSet.getInstructionType("jmp", AsmAddressingMode.ABS, false);
|
||||
AsmInstructionType rtsType = AsmInstructionSet.getInstructionType("rts", AsmAddressingMode.NON, false);
|
||||
if(asmInstruction.getType().equals(jmpType)) {
|
||||
immediateJumps.put(currentScope + "::" + currentLabel, asmInstruction.getParameter());
|
||||
}
|
||||
if(asmInstruction.getType().equals(rtsType)) {
|
||||
immediateJumps.put(currentScope + "::" + currentLabel, "rts");
|
||||
}
|
||||
}
|
||||
currentLabel = null;
|
||||
} else {
|
||||
@ -62,7 +66,12 @@ public class Pass5DoubleJumpElimination extends Pass5AsmOptimization {
|
||||
AsmInstruction asmInstruction = (AsmInstruction) line;
|
||||
if(asmInstruction.getType().isJump()) {
|
||||
String immediateJmpTarget = immediateJumps.get(currentScope + "::" + asmInstruction.getParameter());
|
||||
if(immediateJmpTarget != null && !immediateJmpTarget.equals(asmInstruction.getParameter())) {
|
||||
if(immediateJmpTarget == "rts" && asmInstruction.getType().getMnemnonic() == "jmp") {
|
||||
getLog().append("Replacing jump to rts with rts in " + asmInstruction.toString());
|
||||
AsmInstructionType rtsType = AsmInstructionSet.getInstructionType("rts", AsmAddressingMode.NON, false);
|
||||
asmInstruction.setType(rtsType);
|
||||
optimized = true;
|
||||
} else if(immediateJmpTarget != null && immediateJmpTarget != "rts" && !immediateJmpTarget.equals(asmInstruction.getParameter())) {
|
||||
getLog().append("Skipping double jump to " + immediateJmpTarget + " in " + asmInstruction.toString());
|
||||
asmInstruction.setParameter(immediateJmpTarget);
|
||||
optimized = true;
|
||||
|
@ -20,6 +20,9 @@ public class PassNVariableReferenceInfos extends Pass2SsaOptimization {
|
||||
super(program);
|
||||
}
|
||||
|
||||
private LinkedHashMap<LabelRef, Collection<VariableRef>> blockDirectVarRefsMap = null;
|
||||
private LinkedHashMap<LabelRef, Collection<VariableRef>> blockDirectUsedVarsMap = null;
|
||||
|
||||
/** Create defined/referenced maps */
|
||||
@Override
|
||||
public boolean step() {
|
||||
@ -28,28 +31,40 @@ public class PassNVariableReferenceInfos extends Pass2SsaOptimization {
|
||||
LinkedHashMap<Integer, Collection<VariableRef>> stmtReferenced = new LinkedHashMap<>();
|
||||
LinkedHashMap<Integer, Collection<VariableRef>> stmtDefined = new LinkedHashMap<>();
|
||||
Map<SymbolVariableRef, Collection<VariableReferenceInfos.ReferenceToSymbolVar>> symbolVarReferences = new LinkedHashMap<>();
|
||||
blockDirectVarRefsMap = new LinkedHashMap<>();
|
||||
blockDirectUsedVarsMap = new LinkedHashMap<>();
|
||||
for(ControlFlowBlock block : getProgram().getGraph().getAllBlocks()) {
|
||||
LabelRef blockLabel = block.getLabel();
|
||||
blockReferencedVars.put(blockLabel, getReferencedVars(blockLabel, new ArrayList<>()));
|
||||
blockUsedVars.put(blockLabel, getUsedVars(blockLabel, new ArrayList<>()));
|
||||
LinkedHashSet<VariableRef> blockDirectVarRefs = new LinkedHashSet<>();;
|
||||
LinkedHashSet<VariableRef> blockDirectUsedVars = new LinkedHashSet<>();;
|
||||
for(Statement statement : block.getStatements()) {
|
||||
Collection<SymbolVariableRef> referenced = getReferenced(statement);
|
||||
Collection<VariableRef> defined = getDefinedVars(statement);
|
||||
LinkedHashSet<SymbolVariableRef> stmtSymbolVarRefs = new LinkedHashSet<>();
|
||||
LinkedHashSet<VariableRef> stmtVarRefs = new LinkedHashSet<>();
|
||||
LinkedHashSet<VariableRef> stmtUsedVars = new LinkedHashSet<>();
|
||||
ProgramValueIterator.execute(statement,
|
||||
(programValue, currentStmt, stmtIt, currentBlock) -> {
|
||||
if(programValue.get() instanceof SymbolVariableRef)
|
||||
stmtSymbolVarRefs.add((SymbolVariableRef) programValue.get());
|
||||
if(programValue.get() instanceof VariableRef)
|
||||
stmtVarRefs.add((VariableRef) programValue.get());
|
||||
}
|
||||
, null, null);
|
||||
Collection<VariableRef> stmtDefinedVars = getDefinedVars(statement);
|
||||
stmtUsedVars.addAll(stmtVarRefs);
|
||||
stmtUsedVars.removeAll(stmtDefinedVars);
|
||||
blockDirectVarRefs.addAll(stmtVarRefs);
|
||||
blockDirectUsedVars.addAll(stmtUsedVars);
|
||||
|
||||
// Add variable definitions to the statement
|
||||
stmtDefined.put(statement.getIndex(), defined);
|
||||
stmtDefined.put(statement.getIndex(), stmtDefinedVars);
|
||||
// Identify statement defining variables
|
||||
for(VariableRef variableRef : defined) {
|
||||
for(VariableRef variableRef : stmtDefinedVars) {
|
||||
symbolVarReferences.putIfAbsent(variableRef, new ArrayList<>());
|
||||
Collection<VariableReferenceInfos.ReferenceToSymbolVar> references = symbolVarReferences.get(variableRef);
|
||||
references.add(new VariableReferenceInfos.ReferenceInStatement(statement.getIndex(), VariableReferenceInfos.ReferenceToSymbolVar.ReferenceType.DEFINE, variableRef));
|
||||
}
|
||||
// Gather statements referencing variables/constants
|
||||
Collection<VariableRef> varRefs = new ArrayList<>();
|
||||
for(SymbolVariableRef referencedVarRef : referenced) {
|
||||
if(referencedVarRef instanceof VariableRef) {
|
||||
varRefs.add((VariableRef) referencedVarRef);
|
||||
}
|
||||
if(!defined.contains(referencedVarRef)) {
|
||||
for(SymbolVariableRef referencedVarRef : stmtSymbolVarRefs) {
|
||||
if(!stmtDefinedVars.contains(referencedVarRef)) {
|
||||
symbolVarReferences.putIfAbsent(referencedVarRef, new ArrayList<>());
|
||||
Collection<VariableReferenceInfos.ReferenceToSymbolVar> references = symbolVarReferences.get(referencedVarRef);
|
||||
references.add(
|
||||
@ -60,8 +75,19 @@ public class PassNVariableReferenceInfos extends Pass2SsaOptimization {
|
||||
}
|
||||
}
|
||||
// Add variable reference to the statement
|
||||
stmtReferenced.put(statement.getIndex(), varRefs);
|
||||
stmtReferenced.put(statement.getIndex(), stmtVarRefs);
|
||||
}
|
||||
LabelRef blockLabel = block.getLabel();
|
||||
blockDirectVarRefsMap.put(blockLabel, blockDirectVarRefs);
|
||||
blockDirectUsedVarsMap.put(blockLabel, blockDirectUsedVars);
|
||||
}
|
||||
for(ControlFlowBlock block : getProgram().getGraph().getAllBlocks()) {
|
||||
LabelRef blockLabel = block.getLabel();
|
||||
LinkedHashSet<VariableRef> blockRecursiveVarRefs = new LinkedHashSet<>();
|
||||
LinkedHashSet<VariableRef> blockRecursiveUsedVars = new LinkedHashSet<>();
|
||||
addReferencedVars(block.getLabel(), block, blockRecursiveVarRefs, blockRecursiveUsedVars, new ArrayList<>());
|
||||
blockReferencedVars.put(blockLabel, blockRecursiveVarRefs);
|
||||
blockUsedVars.put(blockLabel, blockRecursiveUsedVars);
|
||||
}
|
||||
// Gather symbols in the symbol table referencing other variables/constants
|
||||
Collection<SymbolVariable> allSymbolVariables = getProgram().getScope().getAllSymbolVariables(true);
|
||||
@ -81,7 +107,6 @@ public class PassNVariableReferenceInfos extends Pass2SsaOptimization {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all variables referenced in an rValue
|
||||
*
|
||||
@ -131,67 +156,29 @@ public class PassNVariableReferenceInfos extends Pass2SsaOptimization {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all variables used inside a block and its successors (including any called method)
|
||||
* Recursively get all variables used or defined inside a block and its successors (including any called method)
|
||||
*
|
||||
* @param labelRef The block to examine
|
||||
* @param block The block to examine (optional, saves lookup)
|
||||
* @param referencedVars the set of referenced variables
|
||||
* @param usedVars the set of referenced variables
|
||||
* @param visited The blocks already visited during the search. Used to stop infinite recursion
|
||||
* @return All used variables
|
||||
*/
|
||||
private Collection<VariableRef> getUsedVars(LabelRef labelRef, Collection<LabelRef> visited) {
|
||||
if(labelRef == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if(visited.contains(labelRef)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
private void addReferencedVars(LabelRef labelRef, ControlFlowBlock block, LinkedHashSet<VariableRef> referencedVars, LinkedHashSet<VariableRef> usedVars, Collection<LabelRef> visited) {
|
||||
if(labelRef == null || visited.contains(labelRef))
|
||||
return;
|
||||
visited.add(labelRef);
|
||||
ControlFlowBlock block = getProgram().getGraph().getBlock(labelRef);
|
||||
if(block == null) {
|
||||
return new ArrayList<>();
|
||||
block = getProgram().getGraph().getBlock(labelRef);
|
||||
if(block == null)
|
||||
return;
|
||||
}
|
||||
LinkedHashSet<VariableRef> used = new LinkedHashSet<>();
|
||||
for(Statement statement : block.getStatements()) {
|
||||
used.addAll(getUsedVars(statement));
|
||||
if(statement instanceof StatementCall) {
|
||||
ProcedureRef procedure = ((StatementCall) statement).getProcedure();
|
||||
used.addAll(getUsedVars(procedure.getLabelRef(), visited));
|
||||
}
|
||||
}
|
||||
used.addAll(getUsedVars(block.getDefaultSuccessor(), visited));
|
||||
used.addAll(getUsedVars(block.getConditionalSuccessor(), visited));
|
||||
return used;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all variables used or defined inside a block and its successors (including any called method)
|
||||
*
|
||||
* @param labelRef The block to examine
|
||||
* @param visited The blocks already visited during the search. Used to stop infinite recursion
|
||||
* @return All used variables
|
||||
*/
|
||||
private Collection<VariableRef> getReferencedVars(LabelRef labelRef, Collection<LabelRef> visited) {
|
||||
if(labelRef == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if(visited.contains(labelRef)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
visited.add(labelRef);
|
||||
ControlFlowBlock block = getProgram().getGraph().getBlock(labelRef);
|
||||
if(block == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
LinkedHashSet<VariableRef> referenced = new LinkedHashSet<>();
|
||||
for(Statement statement : block.getStatements()) {
|
||||
referenced.addAll(getReferencedVars(statement));
|
||||
if(statement instanceof StatementCall) {
|
||||
ProcedureRef procedure = ((StatementCall) statement).getProcedure();
|
||||
referenced.addAll(getReferencedVars(procedure.getLabelRef(), visited));
|
||||
}
|
||||
}
|
||||
referenced.addAll(getReferencedVars(block.getDefaultSuccessor(), visited));
|
||||
referenced.addAll(getReferencedVars(block.getConditionalSuccessor(), visited));
|
||||
return referenced;
|
||||
referencedVars.addAll(blockDirectVarRefsMap.get(labelRef));
|
||||
usedVars.addAll(blockDirectUsedVarsMap.get(labelRef));
|
||||
addReferencedVars(block.getDefaultSuccessor(), null, referencedVars, usedVars, visited);
|
||||
addReferencedVars(block.getConditionalSuccessor(), null, referencedVars, usedVars, visited);
|
||||
addReferencedVars(block.getCallSuccessor(), null, referencedVars, usedVars, visited);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -230,50 +217,4 @@ public class PassNVariableReferenceInfos extends Pass2SsaOptimization {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the variables used, but not defined, in a statement
|
||||
*
|
||||
* @param statement The statement to examine
|
||||
* @return The used variables (not including defined variables)
|
||||
*/
|
||||
private Collection<VariableRef> getUsedVars(Statement statement) {
|
||||
LinkedHashSet<VariableRef> used = new LinkedHashSet<>();
|
||||
used.addAll(getReferencedVars(statement));
|
||||
used.removeAll(getDefinedVars(statement));
|
||||
return used;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the variables referenced (used or defined) in a statement
|
||||
*
|
||||
* @param statement The statement to examine
|
||||
* @return The referenced variables
|
||||
*/
|
||||
private Collection<VariableRef> getReferencedVars(Statement statement) {
|
||||
LinkedHashSet<VariableRef> referencedVars = new LinkedHashSet<>();
|
||||
getReferenced(statement)
|
||||
.stream()
|
||||
.filter(symbolVariableRef -> symbolVariableRef instanceof VariableRef)
|
||||
.forEach(symbolVariableRef -> referencedVars.add((VariableRef) symbolVariableRef));
|
||||
return referencedVars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the variables / constants referenced (used or defined) in a statement
|
||||
*
|
||||
* @param statement The statement to examine
|
||||
* @return The referenced variables / constants (VariableRef / ConstantRef)
|
||||
*/
|
||||
private Collection<SymbolVariableRef> getReferenced(Statement statement) {
|
||||
LinkedHashSet<SymbolVariableRef> referenced = new LinkedHashSet<>();
|
||||
ProgramValueIterator.execute(statement,
|
||||
(programValue, currentStmt, stmtIt, currentBlock) -> {
|
||||
if(programValue.get() instanceof SymbolVariableRef)
|
||||
referenced.add((SymbolVariableRef) programValue.get());
|
||||
}
|
||||
, null, null);
|
||||
return referenced;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -793,6 +793,11 @@ public class TestPrograms {
|
||||
compileAndCompare("const-param");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeepNesting() throws IOException, URISyntaxException {
|
||||
compileAndCompare("deep-nesting");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHelloWorld() throws IOException, URISyntaxException {
|
||||
compileAndCompare("examples/helloworld/helloworld");
|
||||
|
108
src/test/kc/deep-nesting.kc
Normal file
108
src/test/kc/deep-nesting.kc
Normal file
@ -0,0 +1,108 @@
|
||||
// Test that the compiler handles deep nesting well -- mainly a performance issue.
|
||||
|
||||
void main() {
|
||||
byte* screen = $400;
|
||||
const byte reverse = $80;
|
||||
screen[0] = f1(0);
|
||||
}
|
||||
|
||||
byte f1(byte x) { return f2(x) + 1; }
|
||||
byte f2(byte x) { return f3(x) + 1; }
|
||||
byte f3(byte x) { return f4(x) + 1; }
|
||||
byte f4(byte x) { return f5(x) + 1; }
|
||||
byte f5(byte x) { return f6(x) + 1; }
|
||||
byte f6(byte x) { return f7(x) + 1; }
|
||||
byte f7(byte x) { return f8(x) + 1; }
|
||||
byte f8(byte x) { return f9(x) + 1; }
|
||||
byte f9(byte x) { return f10(x) + 1; }
|
||||
byte f10(byte x) { return f11(x) + 1; }
|
||||
byte f11(byte x) { return f12(x) + 1; }
|
||||
byte f12(byte x) { return f13(x) + 1; }
|
||||
byte f13(byte x) { return f14(x) + 1; }
|
||||
byte f14(byte x) { return f15(x) + 1; }
|
||||
byte f15(byte x) { return f16(x) + 1; }
|
||||
byte f16(byte x) { return f17(x) + 1; }
|
||||
byte f17(byte x) { return f18(x) + 1; }
|
||||
byte f18(byte x) { return f19(x) + 1; }
|
||||
byte f19(byte x) { return f20(x) + 1; }
|
||||
byte f20(byte x) { return f21(x) + 1; }
|
||||
byte f21(byte x) { return f22(x) + 1; }
|
||||
byte f22(byte x) { return f23(x) + 1; }
|
||||
byte f23(byte x) { return f24(x) + 1; }
|
||||
byte f24(byte x) { return f25(x) + 1; }
|
||||
byte f25(byte x) { return f26(x) + 1; }
|
||||
byte f26(byte x) { return f27(x) + 1; }
|
||||
byte f27(byte x) { return f28(x) + 1; }
|
||||
byte f28(byte x) { return f29(x) + 1; }
|
||||
byte f29(byte x) { return f30(x) + 1; }
|
||||
byte f30(byte x) { return f31(x) + 1; }
|
||||
byte f31(byte x) { return f32(x) + 1; }
|
||||
byte f32(byte x) { return f33(x) + 1; }
|
||||
byte f33(byte x) { return f34(x) + 1; }
|
||||
byte f34(byte x) { return f35(x) + 1; }
|
||||
byte f35(byte x) { return f36(x) + 1; }
|
||||
byte f36(byte x) { return f37(x) + 1; }
|
||||
byte f37(byte x) { return f38(x) + 1; }
|
||||
byte f38(byte x) { return f39(x) + 1; }
|
||||
byte f39(byte x) { return f40(x) + 1; }
|
||||
byte f40(byte x) { return f41(x) + 1; }
|
||||
byte f41(byte x) { return f42(x) + 1; }
|
||||
byte f42(byte x) { return f43(x) + 1; }
|
||||
byte f43(byte x) { return f44(x) + 1; }
|
||||
byte f44(byte x) { return f45(x) + 1; }
|
||||
byte f45(byte x) { return f46(x) + 1; }
|
||||
byte f46(byte x) { return f47(x) + 1; }
|
||||
byte f47(byte x) { return f48(x) + 1; }
|
||||
byte f48(byte x) { return f49(x) + 1; }
|
||||
byte f49(byte x) { return f50(x) + 1; }
|
||||
byte f50(byte x) { return f51(x) + 1; }
|
||||
byte f51(byte x) { return f52(x) + 1; }
|
||||
byte f52(byte x) { return f53(x) + 1; }
|
||||
byte f53(byte x) { return f54(x) + 1; }
|
||||
byte f54(byte x) { return f55(x) + 1; }
|
||||
byte f55(byte x) { return f56(x) + 1; }
|
||||
byte f56(byte x) { return f57(x) + 1; }
|
||||
byte f57(byte x) { return f58(x) + 1; }
|
||||
byte f58(byte x) { return f59(x) + 1; }
|
||||
byte f59(byte x) { return f60(x) + 1; }
|
||||
byte f60(byte x) { return f61(x) + 1; }
|
||||
byte f61(byte x) { return f62(x) + 1; }
|
||||
byte f62(byte x) { return f63(x) + 1; }
|
||||
byte f63(byte x) { return f64(x) + 1; }
|
||||
byte f64(byte x) { return f65(x) + 1; }
|
||||
byte f65(byte x) { return f66(x) + 1; }
|
||||
byte f66(byte x) { return f67(x) + 1; }
|
||||
byte f67(byte x) { return f68(x) + 1; }
|
||||
byte f68(byte x) { return f69(x) + 1; }
|
||||
byte f69(byte x) { return f70(x) + 1; }
|
||||
byte f70(byte x) { return f71(x) + 1; }
|
||||
byte f71(byte x) { return f72(x) + 1; }
|
||||
byte f72(byte x) { return f73(x) + 1; }
|
||||
byte f73(byte x) { return f74(x) + 1; }
|
||||
byte f74(byte x) { return f75(x) + 1; }
|
||||
byte f75(byte x) { return f76(x) + 1; }
|
||||
byte f76(byte x) { return f77(x) + 1; }
|
||||
byte f77(byte x) { return f78(x) + 1; }
|
||||
byte f78(byte x) { return f79(x) + 1; }
|
||||
byte f79(byte x) { return f80(x) + 1; }
|
||||
byte f80(byte x) { return f81(x) + 1; }
|
||||
byte f81(byte x) { return f82(x) + 1; }
|
||||
byte f82(byte x) { return f83(x) + 1; }
|
||||
byte f83(byte x) { return f84(x) + 1; }
|
||||
byte f84(byte x) { return f85(x) + 1; }
|
||||
byte f85(byte x) { return f86(x) + 1; }
|
||||
byte f86(byte x) { return f87(x) + 1; }
|
||||
byte f87(byte x) { return f88(x) + 1; }
|
||||
byte f88(byte x) { return f89(x) + 1; }
|
||||
byte f89(byte x) { return f90(x) + 1; }
|
||||
byte f90(byte x) { return f91(x) + 1; }
|
||||
byte f91(byte x) { return f92(x) + 1; }
|
||||
byte f92(byte x) { return f93(x) + 1; }
|
||||
byte f93(byte x) { return f94(x) + 1; }
|
||||
byte f94(byte x) { return f95(x) + 1; }
|
||||
byte f95(byte x) { return f96(x) + 1; }
|
||||
byte f96(byte x) { return f97(x) + 1; }
|
||||
byte f97(byte x) { return f98(x) + 1; }
|
||||
byte f98(byte x) { return f99(x) + 1; }
|
||||
byte f99(byte x) { return f100(x) + 1; }
|
||||
byte f100(byte x) { return x;}
|
@ -66,11 +66,10 @@ test: {
|
||||
beq b1
|
||||
lda #RED
|
||||
sta cols,x
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
lda #GREEN
|
||||
sta cols,x
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
ref: .byte 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0
|
||||
|
@ -1169,7 +1169,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -1216,7 +1219,7 @@ reg byte x [ test::i#11 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 199
|
||||
Score: 202
|
||||
|
||||
//SEG0 File Comments
|
||||
// Test compound assignment operators
|
||||
@ -1370,7 +1373,6 @@ test: {
|
||||
lda #RED
|
||||
sta cols,x
|
||||
//SEG83 test::@return
|
||||
breturn:
|
||||
//SEG84 [32] return
|
||||
rts
|
||||
//SEG85 test::@1
|
||||
@ -1378,7 +1380,7 @@ test: {
|
||||
//SEG86 [33] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) GREEN#0 -- pbuc1_derefidx_vbuxx=vbuc2
|
||||
lda #GREEN
|
||||
sta cols,x
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
ref: .byte 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0
|
||||
|
||||
|
@ -11,10 +11,9 @@ main: {
|
||||
sta $400+2
|
||||
cmp #0
|
||||
bne b1
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
lda #1
|
||||
sta $400+2+1
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
@ -244,7 +244,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -259,7 +262,7 @@ FINAL SYMBOL TABLE
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 37
|
||||
Score: 40
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests a pointer to a boolean
|
||||
@ -289,7 +292,6 @@ main: {
|
||||
cmp #0
|
||||
bne b1
|
||||
//SEG14 main::@return
|
||||
breturn:
|
||||
//SEG15 [8] return
|
||||
rts
|
||||
//SEG16 main::@1
|
||||
@ -297,6 +299,6 @@ main: {
|
||||
//SEG17 [9] *(++((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true -- _deref_pboc1=vboc2
|
||||
lda #1
|
||||
sta $400+2+1
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
||||
|
@ -531,10 +531,9 @@ keyboard_event_get: {
|
||||
dec keyboard_events_size
|
||||
ldy keyboard_events_size
|
||||
lda keyboard_events,y
|
||||
jmp breturn
|
||||
rts
|
||||
b1:
|
||||
lda #$ff
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
// Scans the entire matrix to determine which keys have been pressed/depressed.
|
||||
@ -693,31 +692,30 @@ get_vic_screen: {
|
||||
sta return
|
||||
lda #>VIC_SCREEN4
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
b2:
|
||||
lda #<VIC_SCREEN0
|
||||
sta return
|
||||
lda #>VIC_SCREEN0
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
lda #<VIC_SCREEN1
|
||||
sta return
|
||||
lda #>VIC_SCREEN1
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
b4:
|
||||
lda #<VIC_SCREEN2
|
||||
sta return
|
||||
lda #>VIC_SCREEN2
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
b5:
|
||||
lda #<VIC_SCREEN3
|
||||
sta return
|
||||
lda #>VIC_SCREEN3
|
||||
sta return+1
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
// Get the VIC charset/bitmap address from the index
|
||||
@ -732,13 +730,12 @@ get_vic_charset: {
|
||||
sta return
|
||||
lda #>VIC_BITMAP
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
b2:
|
||||
lda #<VIC_CHARSET_ROM
|
||||
sta return
|
||||
lda #>VIC_CHARSET_ROM
|
||||
sta return+1
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
// Get plane address from a plane index (from the form)
|
||||
@ -797,7 +794,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_FULL>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b2:
|
||||
lda #<$ffffffff&VIC_SCREEN0
|
||||
sta return
|
||||
@ -807,7 +804,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN0>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
lda #<PLANE_HORISONTAL2
|
||||
sta return
|
||||
@ -817,7 +814,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_HORISONTAL2>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b4:
|
||||
lda #<PLANE_VERTICAL2
|
||||
sta return
|
||||
@ -827,7 +824,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_VERTICAL2>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b5:
|
||||
lda #<PLANE_CHARSET8
|
||||
sta return
|
||||
@ -837,7 +834,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_CHARSET8>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b6:
|
||||
lda #<PLANE_BLANK
|
||||
sta return
|
||||
@ -847,7 +844,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_BLANK>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b7:
|
||||
lda #<$ffffffff&VIC_SCREEN1
|
||||
sta return
|
||||
@ -857,7 +854,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN1>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b8:
|
||||
lda #<$ffffffff&VIC_SCREEN2
|
||||
sta return
|
||||
@ -867,7 +864,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN2>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b9:
|
||||
lda #<$ffffffff&VIC_SCREEN3
|
||||
sta return
|
||||
@ -877,7 +874,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN3>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b10:
|
||||
lda #<$ffffffff&VIC_BITMAP
|
||||
sta return
|
||||
@ -887,7 +884,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_BITMAP>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b11:
|
||||
lda #<$ffffffff&VIC_CHARSET_ROM
|
||||
sta return
|
||||
@ -897,7 +894,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_CHARSET_ROM>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b12:
|
||||
lda #<PLANE_8BPP_CHUNKY
|
||||
sta return
|
||||
@ -907,7 +904,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_8BPP_CHUNKY>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b13:
|
||||
lda #<PLANE_HORISONTAL
|
||||
sta return
|
||||
@ -917,7 +914,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_HORISONTAL>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
b14:
|
||||
lda #<PLANE_VERTICAL
|
||||
sta return
|
||||
@ -927,7 +924,6 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_VERTICAL>>$10
|
||||
sta return+3
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
// Show the form - and let the user change values
|
||||
@ -1357,7 +1353,6 @@ form_control: {
|
||||
lda #FORM_CURSOR_BLINK/2
|
||||
sta form_cursor_count
|
||||
ldx #0
|
||||
breturn:
|
||||
rts
|
||||
b12:
|
||||
inc form_field_idx
|
||||
@ -1391,7 +1386,7 @@ form_control: {
|
||||
sta (field),y
|
||||
b6:
|
||||
ldx #0
|
||||
jmp breturn
|
||||
rts
|
||||
b14:
|
||||
ldx form_field_idx
|
||||
inc form_fields_val,x
|
||||
@ -1407,7 +1402,7 @@ form_control: {
|
||||
cmp #KEY_SPACE
|
||||
bne b6
|
||||
ldx #$ff
|
||||
jmp breturn
|
||||
rts
|
||||
b2:
|
||||
lda #$80
|
||||
ldy #0
|
||||
@ -2007,7 +2002,6 @@ bitmap_line: {
|
||||
sta bitmap_line_ydxi.y1
|
||||
sty bitmap_line_ydxi.yd
|
||||
jsr bitmap_line_ydxi
|
||||
breturn:
|
||||
rts
|
||||
b8:
|
||||
stx bitmap_line_xdyi.x
|
||||
@ -2015,7 +2009,7 @@ bitmap_line: {
|
||||
sta bitmap_line_xdyi.y
|
||||
sty bitmap_line_xdyi.yd
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
b7:
|
||||
lda y1
|
||||
sec
|
||||
@ -2030,14 +2024,14 @@ bitmap_line: {
|
||||
sta bitmap_line_ydxd.y1
|
||||
sty bitmap_line_ydxd.yd
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
b9:
|
||||
stx bitmap_line_xdyd.x
|
||||
lda y1
|
||||
sta bitmap_line_xdyd.y
|
||||
sty bitmap_line_xdyd.yd
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
b1:
|
||||
txa
|
||||
sec
|
||||
@ -2055,14 +2049,14 @@ bitmap_line: {
|
||||
sta bitmap_line_ydxd.y
|
||||
sty bitmap_line_ydxd.yd
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
b12:
|
||||
lda x0
|
||||
sta bitmap_line_xdyd.x
|
||||
stx bitmap_line_xdyd.x1
|
||||
sty bitmap_line_xdyd.yd
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
b11:
|
||||
lda y1
|
||||
sec
|
||||
@ -2075,14 +2069,14 @@ bitmap_line: {
|
||||
ldx x0
|
||||
sty bitmap_line_ydxi.yd
|
||||
jsr bitmap_line_ydxi
|
||||
jmp breturn
|
||||
rts
|
||||
b13:
|
||||
lda x0
|
||||
sta bitmap_line_xdyi.x
|
||||
stx bitmap_line_xdyi.x1
|
||||
sty bitmap_line_xdyi.yd
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
// bitmap_line_xdyi(byte zeropage($e) x, byte zeropage($f) y, byte zeropage($d) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
bitmap_line_xdyi: {
|
||||
|
@ -27164,16 +27164,44 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b9 in bne b9_from_b10
|
||||
Skipping double jump to breturn_from_b1 in bne b1
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to breturn_from_b1 in bne b1
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to breturn_from_b1 in bne b1
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b4 in jmp b3_from_b2
|
||||
Skipping double jump to b1 in bpl b20
|
||||
Skipping double jump to b13 in bne b21
|
||||
Skipping double jump to b21 in bne b22
|
||||
Skipping double jump to b13 in jmp b21
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to breturn_from_b23 in bne b23
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b2 in bne b6
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_gfx_mode to b10
|
||||
@ -27276,14 +27304,20 @@ Removing instruction lda y0
|
||||
Removing instruction lda y0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b5:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b22:
|
||||
Removing instruction b23:
|
||||
Removing instruction b20:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b6:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Skipping double jump to b13 in bne b21
|
||||
@ -27301,15 +27335,15 @@ Removing instruction b21:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b13
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
Fixing long branch [750] beq b7 to bne
|
||||
Fixing long branch [754] beq b8 to bne
|
||||
Fixing long branch [758] beq b9 to bne
|
||||
Fixing long branch [762] beq b10 to bne
|
||||
Fixing long branch [766] beq b11 to bne
|
||||
Fixing long branch [770] beq b12 to bne
|
||||
Fixing long branch [774] beq b13 to bne
|
||||
Fixing long branch [778] beq b14 to bne
|
||||
Fixing long branch [1328] bmi b2 to bpl
|
||||
Fixing long branch [747] beq b7 to bne
|
||||
Fixing long branch [751] beq b8 to bne
|
||||
Fixing long branch [755] beq b9 to bne
|
||||
Fixing long branch [759] beq b10 to bne
|
||||
Fixing long branch [763] beq b11 to bne
|
||||
Fixing long branch [767] beq b12 to bne
|
||||
Fixing long branch [771] beq b13 to bne
|
||||
Fixing long branch [775] beq b14 to bne
|
||||
Fixing long branch [1324] bmi b2 to bpl
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
@ -29022,7 +29056,7 @@ reg byte a [ gfx_init_screen0::$3 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 10142472
|
||||
Score: 10142556
|
||||
|
||||
//SEG0 File Comments
|
||||
// Interactive Explorer for C64DTV Screen Modes
|
||||
@ -29818,14 +29852,13 @@ keyboard_event_get: {
|
||||
//SEG258 [157] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return]
|
||||
//SEG259 [157] phi (byte) keyboard_events_size#24 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy
|
||||
//SEG260 [157] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG261 [157] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return]
|
||||
b1:
|
||||
//SEG262 [157] phi (byte) keyboard_events_size#24 = (byte) keyboard_events_size#100 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy
|
||||
//SEG263 [157] phi (byte) keyboard_event_get::return#2 = (byte/word/signed word/dword/signed dword) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuaa=vbuc1
|
||||
lda #$ff
|
||||
//SEG264 keyboard_event_get::@return
|
||||
breturn:
|
||||
//SEG265 [158] return
|
||||
rts
|
||||
}
|
||||
@ -30118,7 +30151,7 @@ get_vic_screen: {
|
||||
sta return
|
||||
lda #>VIC_SCREEN4
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG399 [228] phi from get_vic_screen get_vic_screen::@1 to get_vic_screen::@return [phi:get_vic_screen/get_vic_screen::@1->get_vic_screen::@return]
|
||||
b2:
|
||||
//SEG400 [228] phi (byte*) get_vic_screen::return#5 = (const byte*) VIC_SCREEN0#0 [phi:get_vic_screen/get_vic_screen::@1->get_vic_screen::@return#0] -- pbuz1=pbuc1
|
||||
@ -30126,7 +30159,7 @@ get_vic_screen: {
|
||||
sta return
|
||||
lda #>VIC_SCREEN0
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG401 [228] phi from get_vic_screen::@2 to get_vic_screen::@return [phi:get_vic_screen::@2->get_vic_screen::@return]
|
||||
b3:
|
||||
//SEG402 [228] phi (byte*) get_vic_screen::return#5 = (const byte*) VIC_SCREEN1#0 [phi:get_vic_screen::@2->get_vic_screen::@return#0] -- pbuz1=pbuc1
|
||||
@ -30134,7 +30167,7 @@ get_vic_screen: {
|
||||
sta return
|
||||
lda #>VIC_SCREEN1
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG403 [228] phi from get_vic_screen::@3 to get_vic_screen::@return [phi:get_vic_screen::@3->get_vic_screen::@return]
|
||||
b4:
|
||||
//SEG404 [228] phi (byte*) get_vic_screen::return#5 = (const byte*) VIC_SCREEN2#0 [phi:get_vic_screen::@3->get_vic_screen::@return#0] -- pbuz1=pbuc1
|
||||
@ -30142,7 +30175,7 @@ get_vic_screen: {
|
||||
sta return
|
||||
lda #>VIC_SCREEN2
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG405 [228] phi from get_vic_screen::@4 to get_vic_screen::@return [phi:get_vic_screen::@4->get_vic_screen::@return]
|
||||
b5:
|
||||
//SEG406 [228] phi (byte*) get_vic_screen::return#5 = (const byte*) VIC_SCREEN3#0 [phi:get_vic_screen::@4->get_vic_screen::@return#0] -- pbuz1=pbuc1
|
||||
@ -30151,7 +30184,6 @@ get_vic_screen: {
|
||||
lda #>VIC_SCREEN3
|
||||
sta return+1
|
||||
//SEG407 get_vic_screen::@return
|
||||
breturn:
|
||||
//SEG408 [229] return
|
||||
rts
|
||||
//SEG409 [230] phi from get_vic_screen::@5 to get_vic_screen::@1 [phi:get_vic_screen::@5->get_vic_screen::@1]
|
||||
@ -30175,7 +30207,7 @@ get_vic_charset: {
|
||||
sta return
|
||||
lda #>VIC_BITMAP
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG417 [233] phi from get_vic_charset get_vic_charset::@1 to get_vic_charset::@return [phi:get_vic_charset/get_vic_charset::@1->get_vic_charset::@return]
|
||||
b2:
|
||||
//SEG418 [233] phi (byte*) get_vic_charset::return#2 = (const byte*) VIC_CHARSET_ROM#0 [phi:get_vic_charset/get_vic_charset::@1->get_vic_charset::@return#0] -- pbuz1=pbuc1
|
||||
@ -30184,7 +30216,6 @@ get_vic_charset: {
|
||||
lda #>VIC_CHARSET_ROM
|
||||
sta return+1
|
||||
//SEG419 get_vic_charset::@return
|
||||
breturn:
|
||||
//SEG420 [234] return
|
||||
rts
|
||||
//SEG421 [235] phi from get_vic_charset::@2 to get_vic_charset::@1 [phi:get_vic_charset::@2->get_vic_charset::@1]
|
||||
@ -30276,7 +30307,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_FULL>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG453 [251] phi from get_plane get_plane::@1 to get_plane::@return [phi:get_plane/get_plane::@1->get_plane::@return]
|
||||
b2:
|
||||
//SEG454 [251] phi (dword) get_plane::return#14 = ((dword))(const byte*) VIC_SCREEN0#0 [phi:get_plane/get_plane::@1->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30288,7 +30319,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN0>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG455 [251] phi from get_plane::@10 to get_plane::@return [phi:get_plane::@10->get_plane::@return]
|
||||
b3:
|
||||
//SEG456 [251] phi (dword) get_plane::return#14 = ((dword))(const dword) PLANE_HORISONTAL2#0 [phi:get_plane::@10->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30300,7 +30331,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_HORISONTAL2>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG457 [251] phi from get_plane::@11 to get_plane::@return [phi:get_plane::@11->get_plane::@return]
|
||||
b4:
|
||||
//SEG458 [251] phi (dword) get_plane::return#14 = ((dword))(const dword) PLANE_VERTICAL2#0 [phi:get_plane::@11->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30312,7 +30343,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_VERTICAL2>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG459 [251] phi from get_plane::@12 to get_plane::@return [phi:get_plane::@12->get_plane::@return]
|
||||
b5:
|
||||
//SEG460 [251] phi (dword) get_plane::return#14 = ((dword))(const dword) PLANE_CHARSET8#0 [phi:get_plane::@12->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30324,7 +30355,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_CHARSET8>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG461 [251] phi from get_plane::@13 to get_plane::@return [phi:get_plane::@13->get_plane::@return]
|
||||
b6:
|
||||
//SEG462 [251] phi (dword) get_plane::return#14 = ((dword))(const dword) PLANE_BLANK#0 [phi:get_plane::@13->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30336,7 +30367,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_BLANK>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG463 [251] phi from get_plane::@2 to get_plane::@return [phi:get_plane::@2->get_plane::@return]
|
||||
b7:
|
||||
//SEG464 [251] phi (dword) get_plane::return#14 = ((dword))(const byte*) VIC_SCREEN1#0 [phi:get_plane::@2->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30348,7 +30379,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN1>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG465 [251] phi from get_plane::@3 to get_plane::@return [phi:get_plane::@3->get_plane::@return]
|
||||
b8:
|
||||
//SEG466 [251] phi (dword) get_plane::return#14 = ((dword))(const byte*) VIC_SCREEN2#0 [phi:get_plane::@3->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30360,7 +30391,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN2>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG467 [251] phi from get_plane::@4 to get_plane::@return [phi:get_plane::@4->get_plane::@return]
|
||||
b9:
|
||||
//SEG468 [251] phi (dword) get_plane::return#14 = ((dword))(const byte*) VIC_SCREEN3#0 [phi:get_plane::@4->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30372,7 +30403,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_SCREEN3>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG469 [251] phi from get_plane::@5 to get_plane::@return [phi:get_plane::@5->get_plane::@return]
|
||||
b10:
|
||||
//SEG470 [251] phi (dword) get_plane::return#14 = ((dword))(const byte*) VIC_BITMAP#0 [phi:get_plane::@5->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30384,7 +30415,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_BITMAP>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG471 [251] phi from get_plane::@6 to get_plane::@return [phi:get_plane::@6->get_plane::@return]
|
||||
b11:
|
||||
//SEG472 [251] phi (dword) get_plane::return#14 = ((dword))(const byte*) VIC_CHARSET_ROM#0 [phi:get_plane::@6->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30396,7 +30427,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>$ffffffff&VIC_CHARSET_ROM>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG473 [251] phi from get_plane::@7 to get_plane::@return [phi:get_plane::@7->get_plane::@return]
|
||||
b12:
|
||||
//SEG474 [251] phi (dword) get_plane::return#14 = ((dword))(const dword) PLANE_8BPP_CHUNKY#0 [phi:get_plane::@7->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30408,7 +30439,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_8BPP_CHUNKY>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG475 [251] phi from get_plane::@8 to get_plane::@return [phi:get_plane::@8->get_plane::@return]
|
||||
b13:
|
||||
//SEG476 [251] phi (dword) get_plane::return#14 = ((dword))(const dword) PLANE_HORISONTAL#0 [phi:get_plane::@8->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30420,7 +30451,7 @@ get_plane: {
|
||||
sta return+2
|
||||
lda #>PLANE_HORISONTAL>>$10
|
||||
sta return+3
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG477 [251] phi from get_plane::@9 to get_plane::@return [phi:get_plane::@9->get_plane::@return]
|
||||
b14:
|
||||
//SEG478 [251] phi (dword) get_plane::return#14 = ((dword))(const dword) PLANE_VERTICAL#0 [phi:get_plane::@9->get_plane::@return#0] -- vduz1=vduc1
|
||||
@ -30433,7 +30464,6 @@ get_plane: {
|
||||
lda #>PLANE_VERTICAL>>$10
|
||||
sta return+3
|
||||
//SEG479 get_plane::@return
|
||||
breturn:
|
||||
//SEG480 [252] return
|
||||
rts
|
||||
//SEG481 [253] phi from get_plane::@14 to get_plane::@1 [phi:get_plane::@14->get_plane::@1]
|
||||
@ -31158,7 +31188,6 @@ form_control: {
|
||||
//SEG773 [388] phi (byte) form_control::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:form_control::@13->form_control::@return#2] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG774 form_control::@return
|
||||
breturn:
|
||||
//SEG775 [389] return
|
||||
rts
|
||||
//SEG776 [390] phi from form_control::@8 to form_control::@21 [phi:form_control::@8->form_control::@21]
|
||||
@ -31220,7 +31249,7 @@ form_control: {
|
||||
//SEG801 [388] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@15/form_control::@23->form_control::@return#1] -- register_copy
|
||||
//SEG802 [388] phi (byte) form_control::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:form_control::@15/form_control::@23->form_control::@return#2] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG803 form_control::@14
|
||||
b14:
|
||||
//SEG804 [401] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#28) ← ++ *((const byte[]) form_fields_val#0 + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1
|
||||
@ -31247,7 +31276,7 @@ form_control: {
|
||||
//SEG812 [388] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@5->form_control::@return#1] -- register_copy
|
||||
//SEG813 [388] phi (byte) form_control::return#2 = (byte/word/signed word/dword/signed dword) $ff [phi:form_control::@5->form_control::@return#2] -- vbuxx=vbuc1
|
||||
ldx #$ff
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG814 [405] phi from form_control::@5 to form_control::@23 [phi:form_control::@5->form_control::@23]
|
||||
//SEG815 form_control::@23
|
||||
//SEG816 form_control::@2
|
||||
@ -32324,7 +32353,6 @@ bitmap_line: {
|
||||
//SEG1289 [703] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy
|
||||
jsr bitmap_line_ydxi
|
||||
//SEG1290 bitmap_line::@return
|
||||
breturn:
|
||||
//SEG1291 [630] return
|
||||
rts
|
||||
//SEG1292 bitmap_line::@8
|
||||
@ -32346,7 +32374,7 @@ bitmap_line: {
|
||||
//SEG1303 [681] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy
|
||||
//SEG1304 [681] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1305 bitmap_line::@7
|
||||
b7:
|
||||
//SEG1306 [637] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2
|
||||
@ -32377,7 +32405,7 @@ bitmap_line: {
|
||||
//SEG1319 [733] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy
|
||||
//SEG1320 [733] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1321 bitmap_line::@9
|
||||
b9:
|
||||
//SEG1322 [645] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx
|
||||
@ -32397,7 +32425,7 @@ bitmap_line: {
|
||||
//SEG1332 [718] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy
|
||||
//SEG1333 [718] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1334 bitmap_line::@1
|
||||
b1:
|
||||
//SEG1335 [651] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuxx_minus_vbuz2
|
||||
@ -32434,7 +32462,7 @@ bitmap_line: {
|
||||
//SEG1351 [733] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy
|
||||
//SEG1352 [733] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1353 bitmap_line::@12
|
||||
b12:
|
||||
//SEG1354 [661] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2
|
||||
@ -32454,7 +32482,7 @@ bitmap_line: {
|
||||
//SEG1364 [718] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy
|
||||
//SEG1365 [718] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1366 bitmap_line::@11
|
||||
b11:
|
||||
//SEG1367 [667] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2
|
||||
@ -32483,7 +32511,7 @@ bitmap_line: {
|
||||
//SEG1380 [703] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy
|
||||
//SEG1381 [703] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy
|
||||
jsr bitmap_line_ydxi
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1382 bitmap_line::@13
|
||||
b13:
|
||||
//SEG1383 [675] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2
|
||||
@ -32503,7 +32531,7 @@ bitmap_line: {
|
||||
//SEG1393 [681] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy
|
||||
//SEG1394 [681] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
//SEG1395 bitmap_line_xdyi
|
||||
// bitmap_line_xdyi(byte zeropage($e) x, byte zeropage($f) y, byte zeropage($d) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
|
@ -184,7 +184,6 @@ menu: {
|
||||
cmp #0
|
||||
beq b5
|
||||
jsr mode_stdchar
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
ldy #KEY_2
|
||||
@ -192,70 +191,70 @@ menu: {
|
||||
cmp #0
|
||||
beq b6
|
||||
jsr mode_ecmchar
|
||||
jmp breturn
|
||||
rts
|
||||
b6:
|
||||
ldy #KEY_3
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b7
|
||||
jsr mode_mcchar
|
||||
jmp breturn
|
||||
rts
|
||||
b7:
|
||||
ldy #KEY_4
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b8
|
||||
jsr mode_stdbitmap
|
||||
jmp breturn
|
||||
rts
|
||||
b8:
|
||||
ldy #KEY_6
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b9
|
||||
jsr mode_hicolstdchar
|
||||
jmp breturn
|
||||
rts
|
||||
b9:
|
||||
ldy #KEY_7
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b10
|
||||
jsr mode_hicolecmchar
|
||||
jmp breturn
|
||||
rts
|
||||
b10:
|
||||
ldy #KEY_8
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b11
|
||||
jsr mode_hicolmcchar
|
||||
jmp breturn
|
||||
rts
|
||||
b11:
|
||||
ldy #KEY_A
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b12
|
||||
jsr mode_sixsfred2
|
||||
jmp breturn
|
||||
rts
|
||||
b12:
|
||||
ldy #KEY_B
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b13
|
||||
jsr mode_twoplanebitmap
|
||||
jmp breturn
|
||||
rts
|
||||
b13:
|
||||
ldy #KEY_C
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b14
|
||||
jsr mode_sixsfred
|
||||
jmp breturn
|
||||
rts
|
||||
b14:
|
||||
ldy #KEY_D
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b15
|
||||
jsr mode_8bpppixelcell
|
||||
jmp breturn
|
||||
rts
|
||||
b15:
|
||||
ldy #KEY_E
|
||||
jsr keyboard_key_pressed
|
||||
@ -264,7 +263,7 @@ menu: {
|
||||
jmp b4
|
||||
!b4:
|
||||
jsr mode_8bppchunkybmm
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
//Chunky 8bpp Bitmap Mode (BMM = 0, ECM/MCM/HICOL/LINEAR/CHUNK/COLDIS = 1)
|
||||
// Resolution: 320x200
|
||||
@ -1579,7 +1578,6 @@ bitmap_line: {
|
||||
sta bitmap_line_ydxi.y1
|
||||
sty bitmap_line_ydxi.yd
|
||||
jsr bitmap_line_ydxi
|
||||
breturn:
|
||||
rts
|
||||
b8:
|
||||
stx bitmap_line_xdyi.x
|
||||
@ -1587,7 +1585,7 @@ bitmap_line: {
|
||||
sta bitmap_line_xdyi.y
|
||||
sty bitmap_line_xdyi.yd
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
b7:
|
||||
lda y1
|
||||
sec
|
||||
@ -1602,14 +1600,14 @@ bitmap_line: {
|
||||
sta bitmap_line_ydxd.y1
|
||||
sty bitmap_line_ydxd.yd
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
b9:
|
||||
stx bitmap_line_xdyd.x
|
||||
lda y1
|
||||
sta bitmap_line_xdyd.y
|
||||
sty bitmap_line_xdyd.yd
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
b1:
|
||||
txa
|
||||
sec
|
||||
@ -1627,14 +1625,14 @@ bitmap_line: {
|
||||
sta bitmap_line_ydxd.y
|
||||
sty bitmap_line_ydxd.yd
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
b12:
|
||||
lda x0
|
||||
sta bitmap_line_xdyd.x
|
||||
stx bitmap_line_xdyd.x1
|
||||
sty bitmap_line_xdyd.yd
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
b11:
|
||||
lda y1
|
||||
sec
|
||||
@ -1647,14 +1645,14 @@ bitmap_line: {
|
||||
ldx x0
|
||||
sty bitmap_line_ydxi.yd
|
||||
jsr bitmap_line_ydxi
|
||||
jmp breturn
|
||||
rts
|
||||
b13:
|
||||
lda x0
|
||||
sta bitmap_line_xdyi.x
|
||||
stx bitmap_line_xdyi.x1
|
||||
sty bitmap_line_xdyi.yd
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
// bitmap_line_xdyi(byte zeropage($a) x, byte zeropage($b) y, byte zeropage(9) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
bitmap_line_xdyi: {
|
||||
|
@ -25160,8 +25160,26 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b11 in beq b27
|
||||
Skipping double jump to b1 in jmp b1_from_b18
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b2 in bne b6
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_b18 to b3
|
||||
@ -25237,13 +25255,15 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction b3:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b27:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b6:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b11
|
||||
Removing unreachable instruction jmp b2
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
Fixing long branch [262] beq b4 to bne
|
||||
Fixing long branch [261] beq b4 to bne
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
@ -26766,7 +26786,7 @@ reg byte a [ print_str_lines::ch#0 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 2305587
|
||||
Score: 2305641
|
||||
|
||||
//SEG0 File Comments
|
||||
// Exploring C64DTV Screen Modes
|
||||
@ -27023,7 +27043,6 @@ menu: {
|
||||
//SEG67 [40] call mode_stdchar
|
||||
jsr mode_stdchar
|
||||
//SEG68 menu::@return
|
||||
breturn:
|
||||
//SEG69 [41] return
|
||||
rts
|
||||
//SEG70 [42] phi from menu::@30 to menu::@5 [phi:menu::@30->menu::@5]
|
||||
@ -27044,7 +27063,7 @@ menu: {
|
||||
//SEG80 menu::@17
|
||||
//SEG81 [48] call mode_ecmchar
|
||||
jsr mode_ecmchar
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG82 [49] phi from menu::@31 to menu::@6 [phi:menu::@31->menu::@6]
|
||||
//SEG83 menu::@6
|
||||
b6:
|
||||
@ -27063,7 +27082,7 @@ menu: {
|
||||
//SEG92 menu::@18
|
||||
//SEG93 [55] call mode_mcchar
|
||||
jsr mode_mcchar
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG94 [56] phi from menu::@32 to menu::@7 [phi:menu::@32->menu::@7]
|
||||
//SEG95 menu::@7
|
||||
b7:
|
||||
@ -27082,7 +27101,7 @@ menu: {
|
||||
//SEG104 menu::@19
|
||||
//SEG105 [62] call mode_stdbitmap
|
||||
jsr mode_stdbitmap
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG106 [63] phi from menu::@33 to menu::@8 [phi:menu::@33->menu::@8]
|
||||
//SEG107 menu::@8
|
||||
b8:
|
||||
@ -27101,7 +27120,7 @@ menu: {
|
||||
//SEG116 menu::@20
|
||||
//SEG117 [69] call mode_hicolstdchar
|
||||
jsr mode_hicolstdchar
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG118 [70] phi from menu::@34 to menu::@9 [phi:menu::@34->menu::@9]
|
||||
//SEG119 menu::@9
|
||||
b9:
|
||||
@ -27120,7 +27139,7 @@ menu: {
|
||||
//SEG128 menu::@21
|
||||
//SEG129 [76] call mode_hicolecmchar
|
||||
jsr mode_hicolecmchar
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG130 [77] phi from menu::@35 to menu::@10 [phi:menu::@35->menu::@10]
|
||||
//SEG131 menu::@10
|
||||
b10:
|
||||
@ -27139,7 +27158,7 @@ menu: {
|
||||
//SEG140 menu::@22
|
||||
//SEG141 [83] call mode_hicolmcchar
|
||||
jsr mode_hicolmcchar
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG142 [84] phi from menu::@36 to menu::@11 [phi:menu::@36->menu::@11]
|
||||
//SEG143 menu::@11
|
||||
b11:
|
||||
@ -27158,7 +27177,7 @@ menu: {
|
||||
//SEG152 menu::@23
|
||||
//SEG153 [90] call mode_sixsfred2
|
||||
jsr mode_sixsfred2
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG154 [91] phi from menu::@37 to menu::@12 [phi:menu::@37->menu::@12]
|
||||
//SEG155 menu::@12
|
||||
b12:
|
||||
@ -27177,7 +27196,7 @@ menu: {
|
||||
//SEG164 menu::@24
|
||||
//SEG165 [97] call mode_twoplanebitmap
|
||||
jsr mode_twoplanebitmap
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG166 [98] phi from menu::@38 to menu::@13 [phi:menu::@38->menu::@13]
|
||||
//SEG167 menu::@13
|
||||
b13:
|
||||
@ -27196,7 +27215,7 @@ menu: {
|
||||
//SEG176 menu::@25
|
||||
//SEG177 [104] call mode_sixsfred
|
||||
jsr mode_sixsfred
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG178 [105] phi from menu::@39 to menu::@14 [phi:menu::@39->menu::@14]
|
||||
//SEG179 menu::@14
|
||||
b14:
|
||||
@ -27215,7 +27234,7 @@ menu: {
|
||||
//SEG188 menu::@26
|
||||
//SEG189 [111] call mode_8bpppixelcell
|
||||
jsr mode_8bpppixelcell
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG190 [112] phi from menu::@40 to menu::@15 [phi:menu::@40->menu::@15]
|
||||
//SEG191 menu::@15
|
||||
b15:
|
||||
@ -27236,7 +27255,7 @@ menu: {
|
||||
//SEG200 menu::@27
|
||||
//SEG201 [118] call mode_8bppchunkybmm
|
||||
jsr mode_8bppchunkybmm
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
//SEG202 mode_8bppchunkybmm
|
||||
//Chunky 8bpp Bitmap Mode (BMM = 0, ECM/MCM/HICOL/LINEAR/CHUNK/COLDIS = 1)
|
||||
@ -29471,7 +29490,6 @@ bitmap_line: {
|
||||
//SEG1120 [676] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy
|
||||
jsr bitmap_line_ydxi
|
||||
//SEG1121 bitmap_line::@return
|
||||
breturn:
|
||||
//SEG1122 [603] return
|
||||
rts
|
||||
//SEG1123 bitmap_line::@8
|
||||
@ -29493,7 +29511,7 @@ bitmap_line: {
|
||||
//SEG1134 [654] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy
|
||||
//SEG1135 [654] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1136 bitmap_line::@7
|
||||
b7:
|
||||
//SEG1137 [610] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2
|
||||
@ -29524,7 +29542,7 @@ bitmap_line: {
|
||||
//SEG1150 [706] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy
|
||||
//SEG1151 [706] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1152 bitmap_line::@9
|
||||
b9:
|
||||
//SEG1153 [618] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx
|
||||
@ -29544,7 +29562,7 @@ bitmap_line: {
|
||||
//SEG1163 [691] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy
|
||||
//SEG1164 [691] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1165 bitmap_line::@1
|
||||
b1:
|
||||
//SEG1166 [624] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuxx_minus_vbuz2
|
||||
@ -29581,7 +29599,7 @@ bitmap_line: {
|
||||
//SEG1182 [706] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy
|
||||
//SEG1183 [706] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1184 bitmap_line::@12
|
||||
b12:
|
||||
//SEG1185 [634] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2
|
||||
@ -29601,7 +29619,7 @@ bitmap_line: {
|
||||
//SEG1195 [691] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy
|
||||
//SEG1196 [691] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1197 bitmap_line::@11
|
||||
b11:
|
||||
//SEG1198 [640] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2
|
||||
@ -29630,7 +29648,7 @@ bitmap_line: {
|
||||
//SEG1211 [676] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy
|
||||
//SEG1212 [676] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy
|
||||
jsr bitmap_line_ydxi
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG1213 bitmap_line::@13
|
||||
b13:
|
||||
//SEG1214 [648] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2
|
||||
@ -29650,7 +29668,7 @@ bitmap_line: {
|
||||
//SEG1224 [654] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy
|
||||
//SEG1225 [654] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
//SEG1226 bitmap_line_xdyi
|
||||
// bitmap_line_xdyi(byte zeropage($a) x, byte zeropage($b) y, byte zeropage(9) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
|
@ -20,10 +20,9 @@ main: {
|
||||
beq b1
|
||||
lda #2
|
||||
sta BGCOL
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
lda #5
|
||||
sta BGCOL
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
@ -320,7 +320,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -351,7 +354,7 @@ FINAL SYMBOL TABLE
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 43
|
||||
Score: 46
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests that casting inside constants in the output handles precedence between cast and + correctly - should generate the following KA-expression ($ff & sumw>>1)+1
|
||||
@ -391,7 +394,6 @@ main: {
|
||||
lda #2
|
||||
sta BGCOL
|
||||
//SEG15 main::@return
|
||||
breturn:
|
||||
//SEG16 [8] return
|
||||
rts
|
||||
//SEG17 main::@1
|
||||
@ -399,6 +401,6 @@ main: {
|
||||
//SEG18 [9] *((const byte*) main::BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 5 -- _deref_pbuc1=vbuc2
|
||||
lda #5
|
||||
sta BGCOL
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
||||
|
@ -587,7 +587,6 @@ play_movement: {
|
||||
lda game_over
|
||||
cmp #0
|
||||
beq b1
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
lda key_event
|
||||
@ -600,7 +599,7 @@ play_movement: {
|
||||
clc
|
||||
adc return
|
||||
sta return
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
// Rotate the current piece based on key-presses
|
||||
// Return non-zero if a render is needed
|
||||
@ -613,7 +612,6 @@ play_move_rotate: {
|
||||
beq b2
|
||||
b4:
|
||||
lda #0
|
||||
breturn:
|
||||
rts
|
||||
b2:
|
||||
lax current_orientation
|
||||
@ -642,7 +640,7 @@ play_move_rotate: {
|
||||
adc current_piece+1
|
||||
sta current_piece_gfx+1
|
||||
lda #1
|
||||
jmp breturn
|
||||
rts
|
||||
b1:
|
||||
lax current_orientation
|
||||
axs #$10
|
||||
@ -698,7 +696,6 @@ play_collision: {
|
||||
cmp #2*PLAYFIELD_LINES
|
||||
bcc b4
|
||||
lda #COLLISION_BOTTOM
|
||||
breturn:
|
||||
rts
|
||||
b4:
|
||||
lda #$80
|
||||
@ -706,20 +703,20 @@ play_collision: {
|
||||
cmp #0
|
||||
beq b5
|
||||
lda #COLLISION_LEFT
|
||||
jmp breturn
|
||||
rts
|
||||
b5:
|
||||
lda col
|
||||
cmp #PLAYFIELD_COLS
|
||||
bcc b6
|
||||
lda #COLLISION_RIGHT
|
||||
jmp breturn
|
||||
rts
|
||||
b6:
|
||||
ldy col
|
||||
lda (playfield_line),y
|
||||
cmp #0
|
||||
beq b3
|
||||
lda #COLLISION_PLAYFIELD
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
inc col
|
||||
inx
|
||||
@ -734,7 +731,7 @@ play_collision: {
|
||||
cmp l
|
||||
bne b9
|
||||
lda #COLLISION_NONE
|
||||
jmp breturn
|
||||
rts
|
||||
b9:
|
||||
lda i
|
||||
sta i_11
|
||||
@ -769,10 +766,9 @@ play_move_leftright: {
|
||||
inc current_xpos
|
||||
b2:
|
||||
lda #1
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
lda #0
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
ldx current_xpos
|
||||
@ -850,10 +846,9 @@ play_move_down: {
|
||||
lda #0
|
||||
sta current_movedown_counter
|
||||
ldx #1
|
||||
jmp breturn
|
||||
rts
|
||||
b5:
|
||||
ldx #0
|
||||
breturn:
|
||||
rts
|
||||
b10:
|
||||
inc current_ypos
|
||||
@ -1159,10 +1154,9 @@ keyboard_event_get: {
|
||||
dec keyboard_events_size
|
||||
ldy keyboard_events_size
|
||||
ldx keyboard_events,y
|
||||
jmp breturn
|
||||
rts
|
||||
b1:
|
||||
ldx #$ff
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
// Scans the entire matrix to determine which keys have been pressed/depressed.
|
||||
|
@ -22216,8 +22216,17 @@ Removing instruction b6:
|
||||
Removing instruction b7:
|
||||
Removing instruction b11:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b1 in bne b5
|
||||
Skipping double jump to b3 in bne b9
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b9 in bne b9_from_b10
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_render_score to b2
|
||||
@ -22254,8 +22263,14 @@ Removing instruction jmp b1
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b5:
|
||||
Removing instruction b9:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b5:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b1
|
||||
@ -23592,7 +23607,7 @@ reg byte a [ sprites_irq::ptr#2 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 3348864
|
||||
Score: 3348891
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tetris Game for the Commodore 64
|
||||
@ -24590,7 +24605,6 @@ play_movement: {
|
||||
//SEG404 [169] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy
|
||||
//SEG405 [169] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy
|
||||
//SEG406 play_movement::@return
|
||||
breturn:
|
||||
//SEG407 [170] return
|
||||
rts
|
||||
//SEG408 play_movement::@1
|
||||
@ -24617,7 +24631,7 @@ play_movement: {
|
||||
clc
|
||||
adc return
|
||||
sta return
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
//SEG421 play_move_rotate
|
||||
// Rotate the current piece based on key-presses
|
||||
@ -24639,7 +24653,6 @@ play_move_rotate: {
|
||||
//SEG428 [183] phi (byte) play_move_rotate::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuaa=vbuc1
|
||||
lda #0
|
||||
//SEG429 play_move_rotate::@return
|
||||
breturn:
|
||||
//SEG430 [184] return
|
||||
rts
|
||||
//SEG431 play_move_rotate::@2
|
||||
@ -24696,7 +24709,7 @@ play_move_rotate: {
|
||||
//SEG456 [183] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy
|
||||
//SEG457 [183] phi (byte) play_move_rotate::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuaa=vbuc1
|
||||
lda #1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG458 play_move_rotate::@1
|
||||
b1:
|
||||
//SEG459 [198] (byte/signed word/word/dword/signed dword~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte/signed byte/word/signed word/dword/signed dword) $10 -- vbuxx=vbuz1_minus_vbuc1
|
||||
@ -24777,7 +24790,6 @@ play_collision: {
|
||||
//SEG481 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM#0 [phi:play_collision::@7->play_collision::@return#0] -- vbuaa=vbuc1
|
||||
lda #COLLISION_BOTTOM
|
||||
//SEG482 play_collision::@return
|
||||
breturn:
|
||||
//SEG483 [211] return
|
||||
rts
|
||||
//SEG484 play_collision::@4
|
||||
@ -24791,7 +24803,7 @@ play_collision: {
|
||||
//SEG487 [210] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return]
|
||||
//SEG488 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT#0 [phi:play_collision::@4->play_collision::@return#0] -- vbuaa=vbuc1
|
||||
lda #COLLISION_LEFT
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG489 play_collision::@5
|
||||
b5:
|
||||
//SEG490 [214] if((byte) play_collision::col#2<(const byte) PLAYFIELD_COLS#0) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1
|
||||
@ -24801,7 +24813,7 @@ play_collision: {
|
||||
//SEG491 [210] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return]
|
||||
//SEG492 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT#0 [phi:play_collision::@5->play_collision::@return#0] -- vbuaa=vbuc1
|
||||
lda #COLLISION_RIGHT
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG493 play_collision::@6
|
||||
b6:
|
||||
//SEG494 [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::col#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1
|
||||
@ -24812,7 +24824,7 @@ play_collision: {
|
||||
//SEG495 [210] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return]
|
||||
//SEG496 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD#0 [phi:play_collision::@6->play_collision::@return#0] -- vbuaa=vbuc1
|
||||
lda #COLLISION_PLAYFIELD
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG497 play_collision::@3
|
||||
b3:
|
||||
//SEG498 [216] (byte) play_collision::col#1 ← ++ (byte) play_collision::col#2 -- vbuz1=_inc_vbuz1
|
||||
@ -24837,7 +24849,7 @@ play_collision: {
|
||||
//SEG505 [210] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return]
|
||||
//SEG506 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE#0 [phi:play_collision::@8->play_collision::@return#0] -- vbuaa=vbuc1
|
||||
lda #COLLISION_NONE
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG507 play_collision::@9
|
||||
b9:
|
||||
//SEG508 [222] (byte~) play_collision::i#11 ← (byte) play_collision::i#1 -- vbuz1=vbuz2
|
||||
@ -24908,14 +24920,13 @@ play_move_leftright: {
|
||||
//SEG541 [235] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy
|
||||
//SEG542 [235] phi (byte) play_move_leftright::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuaa=vbuc1
|
||||
lda #1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG543 [235] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return]
|
||||
b3:
|
||||
//SEG544 [235] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy
|
||||
//SEG545 [235] phi (byte) play_move_leftright::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuaa=vbuc1
|
||||
lda #0
|
||||
//SEG546 play_move_leftright::@return
|
||||
breturn:
|
||||
//SEG547 [236] return
|
||||
rts
|
||||
//SEG548 play_move_leftright::@1
|
||||
@ -25107,7 +25118,7 @@ play_move_down: {
|
||||
sta current_movedown_counter
|
||||
//SEG660 [281] phi (byte) play_move_down::return#3 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:play_move_down::@11->play_move_down::@return#14] -- vbuxx=vbuc1
|
||||
ldx #1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG661 [281] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return]
|
||||
b5:
|
||||
//SEG662 [281] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy
|
||||
@ -25127,7 +25138,6 @@ play_move_down: {
|
||||
//SEG676 [281] phi (byte) play_move_down::return#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:play_move_down::@3->play_move_down::@return#14] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG677 play_move_down::@return
|
||||
breturn:
|
||||
//SEG678 [282] return
|
||||
rts
|
||||
//SEG679 play_move_down::@10
|
||||
@ -25658,14 +25668,13 @@ keyboard_event_get: {
|
||||
//SEG900 [387] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return]
|
||||
//SEG901 [387] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy
|
||||
//SEG902 [387] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG903 [387] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return]
|
||||
b1:
|
||||
//SEG904 [387] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy
|
||||
//SEG905 [387] phi (byte) keyboard_event_get::return#2 = (byte/word/signed word/dword/signed dword) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1
|
||||
ldx #$ff
|
||||
//SEG906 keyboard_event_get::@return
|
||||
breturn:
|
||||
//SEG907 [388] return
|
||||
rts
|
||||
}
|
||||
|
510
src/test/ref/deep-nesting.asm
Normal file
510
src/test/ref/deep-nesting.asm
Normal file
@ -0,0 +1,510 @@
|
||||
// Test that the compiler handles deep nesting well -- mainly a performance issue.
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
main: {
|
||||
.label screen = $400
|
||||
jsr f1
|
||||
lda #f1.return
|
||||
sta screen
|
||||
rts
|
||||
}
|
||||
f1: {
|
||||
.label x = 0
|
||||
.label return = f2.return+1
|
||||
jsr f2
|
||||
rts
|
||||
}
|
||||
f2: {
|
||||
.label return = f3.return+1
|
||||
jsr f3
|
||||
rts
|
||||
}
|
||||
f3: {
|
||||
.label return = f4.return+1
|
||||
jsr f4
|
||||
rts
|
||||
}
|
||||
f4: {
|
||||
.label return = f5.return+1
|
||||
jsr f5
|
||||
rts
|
||||
}
|
||||
f5: {
|
||||
.label return = f6.return+1
|
||||
jsr f6
|
||||
rts
|
||||
}
|
||||
f6: {
|
||||
.label return = f7.return+1
|
||||
jsr f7
|
||||
rts
|
||||
}
|
||||
f7: {
|
||||
.label return = f8.return+1
|
||||
jsr f8
|
||||
rts
|
||||
}
|
||||
f8: {
|
||||
.label return = f9.return+1
|
||||
jsr f9
|
||||
rts
|
||||
}
|
||||
f9: {
|
||||
.label return = f10.return+1
|
||||
jsr f10
|
||||
rts
|
||||
}
|
||||
f10: {
|
||||
.label return = f11.return+1
|
||||
jsr f11
|
||||
rts
|
||||
}
|
||||
f11: {
|
||||
.label return = f12.return+1
|
||||
jsr f12
|
||||
rts
|
||||
}
|
||||
f12: {
|
||||
.label return = f13.return+1
|
||||
jsr f13
|
||||
rts
|
||||
}
|
||||
f13: {
|
||||
.label return = f14.return+1
|
||||
jsr f14
|
||||
rts
|
||||
}
|
||||
f14: {
|
||||
.label return = f15.return+1
|
||||
jsr f15
|
||||
rts
|
||||
}
|
||||
f15: {
|
||||
.label return = f16.return+1
|
||||
jsr f16
|
||||
rts
|
||||
}
|
||||
f16: {
|
||||
.label return = f17.return+1
|
||||
jsr f17
|
||||
rts
|
||||
}
|
||||
f17: {
|
||||
.label return = f18.return+1
|
||||
jsr f18
|
||||
rts
|
||||
}
|
||||
f18: {
|
||||
.label return = f19.return+1
|
||||
jsr f19
|
||||
rts
|
||||
}
|
||||
f19: {
|
||||
.label return = f20.return+1
|
||||
jsr f20
|
||||
rts
|
||||
}
|
||||
f20: {
|
||||
.label return = f21.return+1
|
||||
jsr f21
|
||||
rts
|
||||
}
|
||||
f21: {
|
||||
.label return = f22.return+1
|
||||
jsr f22
|
||||
rts
|
||||
}
|
||||
f22: {
|
||||
.label return = f23.return+1
|
||||
jsr f23
|
||||
rts
|
||||
}
|
||||
f23: {
|
||||
.label return = f24.return+1
|
||||
jsr f24
|
||||
rts
|
||||
}
|
||||
f24: {
|
||||
.label return = f25.return+1
|
||||
jsr f25
|
||||
rts
|
||||
}
|
||||
f25: {
|
||||
.label return = f26.return+1
|
||||
jsr f26
|
||||
rts
|
||||
}
|
||||
f26: {
|
||||
.label return = f27.return+1
|
||||
jsr f27
|
||||
rts
|
||||
}
|
||||
f27: {
|
||||
.label return = f28.return+1
|
||||
jsr f28
|
||||
rts
|
||||
}
|
||||
f28: {
|
||||
.label return = f29.return+1
|
||||
jsr f29
|
||||
rts
|
||||
}
|
||||
f29: {
|
||||
.label return = f30.return+1
|
||||
jsr f30
|
||||
rts
|
||||
}
|
||||
f30: {
|
||||
.label return = f31.return+1
|
||||
jsr f31
|
||||
rts
|
||||
}
|
||||
f31: {
|
||||
.label return = f32.return+1
|
||||
jsr f32
|
||||
rts
|
||||
}
|
||||
f32: {
|
||||
.label return = f33.return+1
|
||||
jsr f33
|
||||
rts
|
||||
}
|
||||
f33: {
|
||||
.label return = f34.return+1
|
||||
jsr f34
|
||||
rts
|
||||
}
|
||||
f34: {
|
||||
.label return = f35.return+1
|
||||
jsr f35
|
||||
rts
|
||||
}
|
||||
f35: {
|
||||
.label return = f36.return+1
|
||||
jsr f36
|
||||
rts
|
||||
}
|
||||
f36: {
|
||||
.label return = f37.return+1
|
||||
jsr f37
|
||||
rts
|
||||
}
|
||||
f37: {
|
||||
.label return = f38.return+1
|
||||
jsr f38
|
||||
rts
|
||||
}
|
||||
f38: {
|
||||
.label return = f39.return+1
|
||||
jsr f39
|
||||
rts
|
||||
}
|
||||
f39: {
|
||||
.label return = f40.return+1
|
||||
jsr f40
|
||||
rts
|
||||
}
|
||||
f40: {
|
||||
.label return = f41.return+1
|
||||
jsr f41
|
||||
rts
|
||||
}
|
||||
f41: {
|
||||
.label return = f42.return+1
|
||||
jsr f42
|
||||
rts
|
||||
}
|
||||
f42: {
|
||||
.label return = f43.return+1
|
||||
jsr f43
|
||||
rts
|
||||
}
|
||||
f43: {
|
||||
.label return = f44.return+1
|
||||
jsr f44
|
||||
rts
|
||||
}
|
||||
f44: {
|
||||
.label return = f45.return+1
|
||||
jsr f45
|
||||
rts
|
||||
}
|
||||
f45: {
|
||||
.label return = f46.return+1
|
||||
jsr f46
|
||||
rts
|
||||
}
|
||||
f46: {
|
||||
.label return = f47.return+1
|
||||
jsr f47
|
||||
rts
|
||||
}
|
||||
f47: {
|
||||
.label return = f48.return+1
|
||||
jsr f48
|
||||
rts
|
||||
}
|
||||
f48: {
|
||||
.label return = f49.return+1
|
||||
jsr f49
|
||||
rts
|
||||
}
|
||||
f49: {
|
||||
.label return = f50.return+1
|
||||
jsr f50
|
||||
rts
|
||||
}
|
||||
f50: {
|
||||
.label return = f51.return+1
|
||||
jsr f51
|
||||
rts
|
||||
}
|
||||
f51: {
|
||||
.label return = f52.return+1
|
||||
jsr f52
|
||||
rts
|
||||
}
|
||||
f52: {
|
||||
.label return = f53.return+1
|
||||
jsr f53
|
||||
rts
|
||||
}
|
||||
f53: {
|
||||
.label return = f54.return+1
|
||||
jsr f54
|
||||
rts
|
||||
}
|
||||
f54: {
|
||||
.label return = f55.return+1
|
||||
jsr f55
|
||||
rts
|
||||
}
|
||||
f55: {
|
||||
.label return = f56.return+1
|
||||
jsr f56
|
||||
rts
|
||||
}
|
||||
f56: {
|
||||
.label return = f57.return+1
|
||||
jsr f57
|
||||
rts
|
||||
}
|
||||
f57: {
|
||||
.label return = f58.return+1
|
||||
jsr f58
|
||||
rts
|
||||
}
|
||||
f58: {
|
||||
.label return = f59.return+1
|
||||
jsr f59
|
||||
rts
|
||||
}
|
||||
f59: {
|
||||
.label return = f60.return+1
|
||||
jsr f60
|
||||
rts
|
||||
}
|
||||
f60: {
|
||||
.label return = f61.return+1
|
||||
jsr f61
|
||||
rts
|
||||
}
|
||||
f61: {
|
||||
.label return = f62.return+1
|
||||
jsr f62
|
||||
rts
|
||||
}
|
||||
f62: {
|
||||
.label return = f63.return+1
|
||||
jsr f63
|
||||
rts
|
||||
}
|
||||
f63: {
|
||||
.label return = f64.return+1
|
||||
jsr f64
|
||||
rts
|
||||
}
|
||||
f64: {
|
||||
.label return = f65.return+1
|
||||
jsr f65
|
||||
rts
|
||||
}
|
||||
f65: {
|
||||
.label return = f66.return+1
|
||||
jsr f66
|
||||
rts
|
||||
}
|
||||
f66: {
|
||||
.label return = f67.return+1
|
||||
jsr f67
|
||||
rts
|
||||
}
|
||||
f67: {
|
||||
.label return = f68.return+1
|
||||
jsr f68
|
||||
rts
|
||||
}
|
||||
f68: {
|
||||
.label return = f69.return+1
|
||||
jsr f69
|
||||
rts
|
||||
}
|
||||
f69: {
|
||||
.label return = f70.return+1
|
||||
jsr f70
|
||||
rts
|
||||
}
|
||||
f70: {
|
||||
.label return = f71.return+1
|
||||
jsr f71
|
||||
rts
|
||||
}
|
||||
f71: {
|
||||
.label return = f72.return+1
|
||||
jsr f72
|
||||
rts
|
||||
}
|
||||
f72: {
|
||||
.label return = f73.return+1
|
||||
jsr f73
|
||||
rts
|
||||
}
|
||||
f73: {
|
||||
.label return = f74.return+1
|
||||
jsr f74
|
||||
rts
|
||||
}
|
||||
f74: {
|
||||
.label return = f75.return+1
|
||||
jsr f75
|
||||
rts
|
||||
}
|
||||
f75: {
|
||||
.label return = f76.return+1
|
||||
jsr f76
|
||||
rts
|
||||
}
|
||||
f76: {
|
||||
.label return = f77.return+1
|
||||
jsr f77
|
||||
rts
|
||||
}
|
||||
f77: {
|
||||
.label return = f78.return+1
|
||||
jsr f78
|
||||
rts
|
||||
}
|
||||
f78: {
|
||||
.label return = f79.return+1
|
||||
jsr f79
|
||||
rts
|
||||
}
|
||||
f79: {
|
||||
.label return = f80.return+1
|
||||
jsr f80
|
||||
rts
|
||||
}
|
||||
f80: {
|
||||
.label return = f81.return+1
|
||||
jsr f81
|
||||
rts
|
||||
}
|
||||
f81: {
|
||||
.label return = f82.return+1
|
||||
jsr f82
|
||||
rts
|
||||
}
|
||||
f82: {
|
||||
.label return = f83.return+1
|
||||
jsr f83
|
||||
rts
|
||||
}
|
||||
f83: {
|
||||
.label return = f84.return+1
|
||||
jsr f84
|
||||
rts
|
||||
}
|
||||
f84: {
|
||||
.label return = f85.return+1
|
||||
jsr f85
|
||||
rts
|
||||
}
|
||||
f85: {
|
||||
.label return = f86.return+1
|
||||
jsr f86
|
||||
rts
|
||||
}
|
||||
f86: {
|
||||
.label return = f87.return+1
|
||||
jsr f87
|
||||
rts
|
||||
}
|
||||
f87: {
|
||||
.label return = f88.return+1
|
||||
jsr f88
|
||||
rts
|
||||
}
|
||||
f88: {
|
||||
.label return = f89.return+1
|
||||
jsr f89
|
||||
rts
|
||||
}
|
||||
f89: {
|
||||
.label return = f90.return+1
|
||||
jsr f90
|
||||
rts
|
||||
}
|
||||
f90: {
|
||||
.label return = f91.return+1
|
||||
jsr f91
|
||||
rts
|
||||
}
|
||||
f91: {
|
||||
.label return = f92.return+1
|
||||
jsr f92
|
||||
rts
|
||||
}
|
||||
f92: {
|
||||
.label return = f93.return+1
|
||||
jsr f93
|
||||
rts
|
||||
}
|
||||
f93: {
|
||||
.label return = f94.return+1
|
||||
jsr f94
|
||||
rts
|
||||
}
|
||||
f94: {
|
||||
.label return = f95.return+1
|
||||
jsr f95
|
||||
rts
|
||||
}
|
||||
f95: {
|
||||
.label return = f96.return+1
|
||||
jsr f96
|
||||
rts
|
||||
}
|
||||
f96: {
|
||||
.label return = f97.return+1
|
||||
jsr f97
|
||||
rts
|
||||
}
|
||||
f97: {
|
||||
.label return = f98.return+1
|
||||
jsr f98
|
||||
rts
|
||||
}
|
||||
f98: {
|
||||
.label return = f99.return+1
|
||||
jsr f99
|
||||
rts
|
||||
}
|
||||
f99: {
|
||||
.label return = f1.x+1
|
||||
jsr f100
|
||||
rts
|
||||
}
|
||||
f100: {
|
||||
rts
|
||||
}
|
718
src/test/ref/deep-nesting.cfg
Normal file
718
src/test/ref/deep-nesting.cfg
Normal file
@ -0,0 +1,718 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call f1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[6] *((const byte*) main::screen#0) ← (const byte) f1::return#1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
[7] return
|
||||
to:@return
|
||||
f1: scope:[f1] from main
|
||||
[8] phi()
|
||||
[9] call f2
|
||||
to:f1::@return
|
||||
f1::@return: scope:[f1] from f1
|
||||
[10] return
|
||||
to:@return
|
||||
f2: scope:[f2] from f1
|
||||
[11] phi()
|
||||
[12] call f3
|
||||
to:f2::@return
|
||||
f2::@return: scope:[f2] from f2
|
||||
[13] return
|
||||
to:@return
|
||||
f3: scope:[f3] from f2
|
||||
[14] phi()
|
||||
[15] call f4
|
||||
to:f3::@return
|
||||
f3::@return: scope:[f3] from f3
|
||||
[16] return
|
||||
to:@return
|
||||
f4: scope:[f4] from f3
|
||||
[17] phi()
|
||||
[18] call f5
|
||||
to:f4::@return
|
||||
f4::@return: scope:[f4] from f4
|
||||
[19] return
|
||||
to:@return
|
||||
f5: scope:[f5] from f4
|
||||
[20] phi()
|
||||
[21] call f6
|
||||
to:f5::@return
|
||||
f5::@return: scope:[f5] from f5
|
||||
[22] return
|
||||
to:@return
|
||||
f6: scope:[f6] from f5
|
||||
[23] phi()
|
||||
[24] call f7
|
||||
to:f6::@return
|
||||
f6::@return: scope:[f6] from f6
|
||||
[25] return
|
||||
to:@return
|
||||
f7: scope:[f7] from f6
|
||||
[26] phi()
|
||||
[27] call f8
|
||||
to:f7::@return
|
||||
f7::@return: scope:[f7] from f7
|
||||
[28] return
|
||||
to:@return
|
||||
f8: scope:[f8] from f7
|
||||
[29] phi()
|
||||
[30] call f9
|
||||
to:f8::@return
|
||||
f8::@return: scope:[f8] from f8
|
||||
[31] return
|
||||
to:@return
|
||||
f9: scope:[f9] from f8
|
||||
[32] phi()
|
||||
[33] call f10
|
||||
to:f9::@return
|
||||
f9::@return: scope:[f9] from f9
|
||||
[34] return
|
||||
to:@return
|
||||
f10: scope:[f10] from f9
|
||||
[35] phi()
|
||||
[36] call f11
|
||||
to:f10::@return
|
||||
f10::@return: scope:[f10] from f10
|
||||
[37] return
|
||||
to:@return
|
||||
f11: scope:[f11] from f10
|
||||
[38] phi()
|
||||
[39] call f12
|
||||
to:f11::@return
|
||||
f11::@return: scope:[f11] from f11
|
||||
[40] return
|
||||
to:@return
|
||||
f12: scope:[f12] from f11
|
||||
[41] phi()
|
||||
[42] call f13
|
||||
to:f12::@return
|
||||
f12::@return: scope:[f12] from f12
|
||||
[43] return
|
||||
to:@return
|
||||
f13: scope:[f13] from f12
|
||||
[44] phi()
|
||||
[45] call f14
|
||||
to:f13::@return
|
||||
f13::@return: scope:[f13] from f13
|
||||
[46] return
|
||||
to:@return
|
||||
f14: scope:[f14] from f13
|
||||
[47] phi()
|
||||
[48] call f15
|
||||
to:f14::@return
|
||||
f14::@return: scope:[f14] from f14
|
||||
[49] return
|
||||
to:@return
|
||||
f15: scope:[f15] from f14
|
||||
[50] phi()
|
||||
[51] call f16
|
||||
to:f15::@return
|
||||
f15::@return: scope:[f15] from f15
|
||||
[52] return
|
||||
to:@return
|
||||
f16: scope:[f16] from f15
|
||||
[53] phi()
|
||||
[54] call f17
|
||||
to:f16::@return
|
||||
f16::@return: scope:[f16] from f16
|
||||
[55] return
|
||||
to:@return
|
||||
f17: scope:[f17] from f16
|
||||
[56] phi()
|
||||
[57] call f18
|
||||
to:f17::@return
|
||||
f17::@return: scope:[f17] from f17
|
||||
[58] return
|
||||
to:@return
|
||||
f18: scope:[f18] from f17
|
||||
[59] phi()
|
||||
[60] call f19
|
||||
to:f18::@return
|
||||
f18::@return: scope:[f18] from f18
|
||||
[61] return
|
||||
to:@return
|
||||
f19: scope:[f19] from f18
|
||||
[62] phi()
|
||||
[63] call f20
|
||||
to:f19::@return
|
||||
f19::@return: scope:[f19] from f19
|
||||
[64] return
|
||||
to:@return
|
||||
f20: scope:[f20] from f19
|
||||
[65] phi()
|
||||
[66] call f21
|
||||
to:f20::@return
|
||||
f20::@return: scope:[f20] from f20
|
||||
[67] return
|
||||
to:@return
|
||||
f21: scope:[f21] from f20
|
||||
[68] phi()
|
||||
[69] call f22
|
||||
to:f21::@return
|
||||
f21::@return: scope:[f21] from f21
|
||||
[70] return
|
||||
to:@return
|
||||
f22: scope:[f22] from f21
|
||||
[71] phi()
|
||||
[72] call f23
|
||||
to:f22::@return
|
||||
f22::@return: scope:[f22] from f22
|
||||
[73] return
|
||||
to:@return
|
||||
f23: scope:[f23] from f22
|
||||
[74] phi()
|
||||
[75] call f24
|
||||
to:f23::@return
|
||||
f23::@return: scope:[f23] from f23
|
||||
[76] return
|
||||
to:@return
|
||||
f24: scope:[f24] from f23
|
||||
[77] phi()
|
||||
[78] call f25
|
||||
to:f24::@return
|
||||
f24::@return: scope:[f24] from f24
|
||||
[79] return
|
||||
to:@return
|
||||
f25: scope:[f25] from f24
|
||||
[80] phi()
|
||||
[81] call f26
|
||||
to:f25::@return
|
||||
f25::@return: scope:[f25] from f25
|
||||
[82] return
|
||||
to:@return
|
||||
f26: scope:[f26] from f25
|
||||
[83] phi()
|
||||
[84] call f27
|
||||
to:f26::@return
|
||||
f26::@return: scope:[f26] from f26
|
||||
[85] return
|
||||
to:@return
|
||||
f27: scope:[f27] from f26
|
||||
[86] phi()
|
||||
[87] call f28
|
||||
to:f27::@return
|
||||
f27::@return: scope:[f27] from f27
|
||||
[88] return
|
||||
to:@return
|
||||
f28: scope:[f28] from f27
|
||||
[89] phi()
|
||||
[90] call f29
|
||||
to:f28::@return
|
||||
f28::@return: scope:[f28] from f28
|
||||
[91] return
|
||||
to:@return
|
||||
f29: scope:[f29] from f28
|
||||
[92] phi()
|
||||
[93] call f30
|
||||
to:f29::@return
|
||||
f29::@return: scope:[f29] from f29
|
||||
[94] return
|
||||
to:@return
|
||||
f30: scope:[f30] from f29
|
||||
[95] phi()
|
||||
[96] call f31
|
||||
to:f30::@return
|
||||
f30::@return: scope:[f30] from f30
|
||||
[97] return
|
||||
to:@return
|
||||
f31: scope:[f31] from f30
|
||||
[98] phi()
|
||||
[99] call f32
|
||||
to:f31::@return
|
||||
f31::@return: scope:[f31] from f31
|
||||
[100] return
|
||||
to:@return
|
||||
f32: scope:[f32] from f31
|
||||
[101] phi()
|
||||
[102] call f33
|
||||
to:f32::@return
|
||||
f32::@return: scope:[f32] from f32
|
||||
[103] return
|
||||
to:@return
|
||||
f33: scope:[f33] from f32
|
||||
[104] phi()
|
||||
[105] call f34
|
||||
to:f33::@return
|
||||
f33::@return: scope:[f33] from f33
|
||||
[106] return
|
||||
to:@return
|
||||
f34: scope:[f34] from f33
|
||||
[107] phi()
|
||||
[108] call f35
|
||||
to:f34::@return
|
||||
f34::@return: scope:[f34] from f34
|
||||
[109] return
|
||||
to:@return
|
||||
f35: scope:[f35] from f34
|
||||
[110] phi()
|
||||
[111] call f36
|
||||
to:f35::@return
|
||||
f35::@return: scope:[f35] from f35
|
||||
[112] return
|
||||
to:@return
|
||||
f36: scope:[f36] from f35
|
||||
[113] phi()
|
||||
[114] call f37
|
||||
to:f36::@return
|
||||
f36::@return: scope:[f36] from f36
|
||||
[115] return
|
||||
to:@return
|
||||
f37: scope:[f37] from f36
|
||||
[116] phi()
|
||||
[117] call f38
|
||||
to:f37::@return
|
||||
f37::@return: scope:[f37] from f37
|
||||
[118] return
|
||||
to:@return
|
||||
f38: scope:[f38] from f37
|
||||
[119] phi()
|
||||
[120] call f39
|
||||
to:f38::@return
|
||||
f38::@return: scope:[f38] from f38
|
||||
[121] return
|
||||
to:@return
|
||||
f39: scope:[f39] from f38
|
||||
[122] phi()
|
||||
[123] call f40
|
||||
to:f39::@return
|
||||
f39::@return: scope:[f39] from f39
|
||||
[124] return
|
||||
to:@return
|
||||
f40: scope:[f40] from f39
|
||||
[125] phi()
|
||||
[126] call f41
|
||||
to:f40::@return
|
||||
f40::@return: scope:[f40] from f40
|
||||
[127] return
|
||||
to:@return
|
||||
f41: scope:[f41] from f40
|
||||
[128] phi()
|
||||
[129] call f42
|
||||
to:f41::@return
|
||||
f41::@return: scope:[f41] from f41
|
||||
[130] return
|
||||
to:@return
|
||||
f42: scope:[f42] from f41
|
||||
[131] phi()
|
||||
[132] call f43
|
||||
to:f42::@return
|
||||
f42::@return: scope:[f42] from f42
|
||||
[133] return
|
||||
to:@return
|
||||
f43: scope:[f43] from f42
|
||||
[134] phi()
|
||||
[135] call f44
|
||||
to:f43::@return
|
||||
f43::@return: scope:[f43] from f43
|
||||
[136] return
|
||||
to:@return
|
||||
f44: scope:[f44] from f43
|
||||
[137] phi()
|
||||
[138] call f45
|
||||
to:f44::@return
|
||||
f44::@return: scope:[f44] from f44
|
||||
[139] return
|
||||
to:@return
|
||||
f45: scope:[f45] from f44
|
||||
[140] phi()
|
||||
[141] call f46
|
||||
to:f45::@return
|
||||
f45::@return: scope:[f45] from f45
|
||||
[142] return
|
||||
to:@return
|
||||
f46: scope:[f46] from f45
|
||||
[143] phi()
|
||||
[144] call f47
|
||||
to:f46::@return
|
||||
f46::@return: scope:[f46] from f46
|
||||
[145] return
|
||||
to:@return
|
||||
f47: scope:[f47] from f46
|
||||
[146] phi()
|
||||
[147] call f48
|
||||
to:f47::@return
|
||||
f47::@return: scope:[f47] from f47
|
||||
[148] return
|
||||
to:@return
|
||||
f48: scope:[f48] from f47
|
||||
[149] phi()
|
||||
[150] call f49
|
||||
to:f48::@return
|
||||
f48::@return: scope:[f48] from f48
|
||||
[151] return
|
||||
to:@return
|
||||
f49: scope:[f49] from f48
|
||||
[152] phi()
|
||||
[153] call f50
|
||||
to:f49::@return
|
||||
f49::@return: scope:[f49] from f49
|
||||
[154] return
|
||||
to:@return
|
||||
f50: scope:[f50] from f49
|
||||
[155] phi()
|
||||
[156] call f51
|
||||
to:f50::@return
|
||||
f50::@return: scope:[f50] from f50
|
||||
[157] return
|
||||
to:@return
|
||||
f51: scope:[f51] from f50
|
||||
[158] phi()
|
||||
[159] call f52
|
||||
to:f51::@return
|
||||
f51::@return: scope:[f51] from f51
|
||||
[160] return
|
||||
to:@return
|
||||
f52: scope:[f52] from f51
|
||||
[161] phi()
|
||||
[162] call f53
|
||||
to:f52::@return
|
||||
f52::@return: scope:[f52] from f52
|
||||
[163] return
|
||||
to:@return
|
||||
f53: scope:[f53] from f52
|
||||
[164] phi()
|
||||
[165] call f54
|
||||
to:f53::@return
|
||||
f53::@return: scope:[f53] from f53
|
||||
[166] return
|
||||
to:@return
|
||||
f54: scope:[f54] from f53
|
||||
[167] phi()
|
||||
[168] call f55
|
||||
to:f54::@return
|
||||
f54::@return: scope:[f54] from f54
|
||||
[169] return
|
||||
to:@return
|
||||
f55: scope:[f55] from f54
|
||||
[170] phi()
|
||||
[171] call f56
|
||||
to:f55::@return
|
||||
f55::@return: scope:[f55] from f55
|
||||
[172] return
|
||||
to:@return
|
||||
f56: scope:[f56] from f55
|
||||
[173] phi()
|
||||
[174] call f57
|
||||
to:f56::@return
|
||||
f56::@return: scope:[f56] from f56
|
||||
[175] return
|
||||
to:@return
|
||||
f57: scope:[f57] from f56
|
||||
[176] phi()
|
||||
[177] call f58
|
||||
to:f57::@return
|
||||
f57::@return: scope:[f57] from f57
|
||||
[178] return
|
||||
to:@return
|
||||
f58: scope:[f58] from f57
|
||||
[179] phi()
|
||||
[180] call f59
|
||||
to:f58::@return
|
||||
f58::@return: scope:[f58] from f58
|
||||
[181] return
|
||||
to:@return
|
||||
f59: scope:[f59] from f58
|
||||
[182] phi()
|
||||
[183] call f60
|
||||
to:f59::@return
|
||||
f59::@return: scope:[f59] from f59
|
||||
[184] return
|
||||
to:@return
|
||||
f60: scope:[f60] from f59
|
||||
[185] phi()
|
||||
[186] call f61
|
||||
to:f60::@return
|
||||
f60::@return: scope:[f60] from f60
|
||||
[187] return
|
||||
to:@return
|
||||
f61: scope:[f61] from f60
|
||||
[188] phi()
|
||||
[189] call f62
|
||||
to:f61::@return
|
||||
f61::@return: scope:[f61] from f61
|
||||
[190] return
|
||||
to:@return
|
||||
f62: scope:[f62] from f61
|
||||
[191] phi()
|
||||
[192] call f63
|
||||
to:f62::@return
|
||||
f62::@return: scope:[f62] from f62
|
||||
[193] return
|
||||
to:@return
|
||||
f63: scope:[f63] from f62
|
||||
[194] phi()
|
||||
[195] call f64
|
||||
to:f63::@return
|
||||
f63::@return: scope:[f63] from f63
|
||||
[196] return
|
||||
to:@return
|
||||
f64: scope:[f64] from f63
|
||||
[197] phi()
|
||||
[198] call f65
|
||||
to:f64::@return
|
||||
f64::@return: scope:[f64] from f64
|
||||
[199] return
|
||||
to:@return
|
||||
f65: scope:[f65] from f64
|
||||
[200] phi()
|
||||
[201] call f66
|
||||
to:f65::@return
|
||||
f65::@return: scope:[f65] from f65
|
||||
[202] return
|
||||
to:@return
|
||||
f66: scope:[f66] from f65
|
||||
[203] phi()
|
||||
[204] call f67
|
||||
to:f66::@return
|
||||
f66::@return: scope:[f66] from f66
|
||||
[205] return
|
||||
to:@return
|
||||
f67: scope:[f67] from f66
|
||||
[206] phi()
|
||||
[207] call f68
|
||||
to:f67::@return
|
||||
f67::@return: scope:[f67] from f67
|
||||
[208] return
|
||||
to:@return
|
||||
f68: scope:[f68] from f67
|
||||
[209] phi()
|
||||
[210] call f69
|
||||
to:f68::@return
|
||||
f68::@return: scope:[f68] from f68
|
||||
[211] return
|
||||
to:@return
|
||||
f69: scope:[f69] from f68
|
||||
[212] phi()
|
||||
[213] call f70
|
||||
to:f69::@return
|
||||
f69::@return: scope:[f69] from f69
|
||||
[214] return
|
||||
to:@return
|
||||
f70: scope:[f70] from f69
|
||||
[215] phi()
|
||||
[216] call f71
|
||||
to:f70::@return
|
||||
f70::@return: scope:[f70] from f70
|
||||
[217] return
|
||||
to:@return
|
||||
f71: scope:[f71] from f70
|
||||
[218] phi()
|
||||
[219] call f72
|
||||
to:f71::@return
|
||||
f71::@return: scope:[f71] from f71
|
||||
[220] return
|
||||
to:@return
|
||||
f72: scope:[f72] from f71
|
||||
[221] phi()
|
||||
[222] call f73
|
||||
to:f72::@return
|
||||
f72::@return: scope:[f72] from f72
|
||||
[223] return
|
||||
to:@return
|
||||
f73: scope:[f73] from f72
|
||||
[224] phi()
|
||||
[225] call f74
|
||||
to:f73::@return
|
||||
f73::@return: scope:[f73] from f73
|
||||
[226] return
|
||||
to:@return
|
||||
f74: scope:[f74] from f73
|
||||
[227] phi()
|
||||
[228] call f75
|
||||
to:f74::@return
|
||||
f74::@return: scope:[f74] from f74
|
||||
[229] return
|
||||
to:@return
|
||||
f75: scope:[f75] from f74
|
||||
[230] phi()
|
||||
[231] call f76
|
||||
to:f75::@return
|
||||
f75::@return: scope:[f75] from f75
|
||||
[232] return
|
||||
to:@return
|
||||
f76: scope:[f76] from f75
|
||||
[233] phi()
|
||||
[234] call f77
|
||||
to:f76::@return
|
||||
f76::@return: scope:[f76] from f76
|
||||
[235] return
|
||||
to:@return
|
||||
f77: scope:[f77] from f76
|
||||
[236] phi()
|
||||
[237] call f78
|
||||
to:f77::@return
|
||||
f77::@return: scope:[f77] from f77
|
||||
[238] return
|
||||
to:@return
|
||||
f78: scope:[f78] from f77
|
||||
[239] phi()
|
||||
[240] call f79
|
||||
to:f78::@return
|
||||
f78::@return: scope:[f78] from f78
|
||||
[241] return
|
||||
to:@return
|
||||
f79: scope:[f79] from f78
|
||||
[242] phi()
|
||||
[243] call f80
|
||||
to:f79::@return
|
||||
f79::@return: scope:[f79] from f79
|
||||
[244] return
|
||||
to:@return
|
||||
f80: scope:[f80] from f79
|
||||
[245] phi()
|
||||
[246] call f81
|
||||
to:f80::@return
|
||||
f80::@return: scope:[f80] from f80
|
||||
[247] return
|
||||
to:@return
|
||||
f81: scope:[f81] from f80
|
||||
[248] phi()
|
||||
[249] call f82
|
||||
to:f81::@return
|
||||
f81::@return: scope:[f81] from f81
|
||||
[250] return
|
||||
to:@return
|
||||
f82: scope:[f82] from f81
|
||||
[251] phi()
|
||||
[252] call f83
|
||||
to:f82::@return
|
||||
f82::@return: scope:[f82] from f82
|
||||
[253] return
|
||||
to:@return
|
||||
f83: scope:[f83] from f82
|
||||
[254] phi()
|
||||
[255] call f84
|
||||
to:f83::@return
|
||||
f83::@return: scope:[f83] from f83
|
||||
[256] return
|
||||
to:@return
|
||||
f84: scope:[f84] from f83
|
||||
[257] phi()
|
||||
[258] call f85
|
||||
to:f84::@return
|
||||
f84::@return: scope:[f84] from f84
|
||||
[259] return
|
||||
to:@return
|
||||
f85: scope:[f85] from f84
|
||||
[260] phi()
|
||||
[261] call f86
|
||||
to:f85::@return
|
||||
f85::@return: scope:[f85] from f85
|
||||
[262] return
|
||||
to:@return
|
||||
f86: scope:[f86] from f85
|
||||
[263] phi()
|
||||
[264] call f87
|
||||
to:f86::@return
|
||||
f86::@return: scope:[f86] from f86
|
||||
[265] return
|
||||
to:@return
|
||||
f87: scope:[f87] from f86
|
||||
[266] phi()
|
||||
[267] call f88
|
||||
to:f87::@return
|
||||
f87::@return: scope:[f87] from f87
|
||||
[268] return
|
||||
to:@return
|
||||
f88: scope:[f88] from f87
|
||||
[269] phi()
|
||||
[270] call f89
|
||||
to:f88::@return
|
||||
f88::@return: scope:[f88] from f88
|
||||
[271] return
|
||||
to:@return
|
||||
f89: scope:[f89] from f88
|
||||
[272] phi()
|
||||
[273] call f90
|
||||
to:f89::@return
|
||||
f89::@return: scope:[f89] from f89
|
||||
[274] return
|
||||
to:@return
|
||||
f90: scope:[f90] from f89
|
||||
[275] phi()
|
||||
[276] call f91
|
||||
to:f90::@return
|
||||
f90::@return: scope:[f90] from f90
|
||||
[277] return
|
||||
to:@return
|
||||
f91: scope:[f91] from f90
|
||||
[278] phi()
|
||||
[279] call f92
|
||||
to:f91::@return
|
||||
f91::@return: scope:[f91] from f91
|
||||
[280] return
|
||||
to:@return
|
||||
f92: scope:[f92] from f91
|
||||
[281] phi()
|
||||
[282] call f93
|
||||
to:f92::@return
|
||||
f92::@return: scope:[f92] from f92
|
||||
[283] return
|
||||
to:@return
|
||||
f93: scope:[f93] from f92
|
||||
[284] phi()
|
||||
[285] call f94
|
||||
to:f93::@return
|
||||
f93::@return: scope:[f93] from f93
|
||||
[286] return
|
||||
to:@return
|
||||
f94: scope:[f94] from f93
|
||||
[287] phi()
|
||||
[288] call f95
|
||||
to:f94::@return
|
||||
f94::@return: scope:[f94] from f94
|
||||
[289] return
|
||||
to:@return
|
||||
f95: scope:[f95] from f94
|
||||
[290] phi()
|
||||
[291] call f96
|
||||
to:f95::@return
|
||||
f95::@return: scope:[f95] from f95
|
||||
[292] return
|
||||
to:@return
|
||||
f96: scope:[f96] from f95
|
||||
[293] phi()
|
||||
[294] call f97
|
||||
to:f96::@return
|
||||
f96::@return: scope:[f96] from f96
|
||||
[295] return
|
||||
to:@return
|
||||
f97: scope:[f97] from f96
|
||||
[296] phi()
|
||||
[297] call f98
|
||||
to:f97::@return
|
||||
f97::@return: scope:[f97] from f97
|
||||
[298] return
|
||||
to:@return
|
||||
f98: scope:[f98] from f97
|
||||
[299] phi()
|
||||
[300] call f99
|
||||
to:f98::@return
|
||||
f98::@return: scope:[f98] from f98
|
||||
[301] return
|
||||
to:@return
|
||||
f99: scope:[f99] from f98
|
||||
[302] phi()
|
||||
[303] call f100
|
||||
to:f99::@return
|
||||
f99::@return: scope:[f99] from f99
|
||||
[304] return
|
||||
to:@return
|
||||
f100: scope:[f100] from f99
|
||||
[305] phi()
|
||||
to:f100::@return
|
||||
f100::@return: scope:[f100] from f100
|
||||
[306] return
|
||||
to:@return
|
10834
src/test/ref/deep-nesting.log
Normal file
10834
src/test/ref/deep-nesting.log
Normal file
File diff suppressed because it is too large
Load Diff
510
src/test/ref/deep-nesting.sym
Normal file
510
src/test/ref/deep-nesting.sym
Normal file
@ -0,0 +1,510 @@
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte()) f1((byte) f1::x)
|
||||
(label) f1::@return
|
||||
(byte) f1::return
|
||||
(const byte) f1::return#1 return = (const byte) f2::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f1::x
|
||||
(const byte) f1::x#0 x = (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte()) f10((byte) f10::x)
|
||||
(label) f10::@return
|
||||
(byte) f10::return
|
||||
(const byte) f10::return#1 return = (const byte) f11::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f10::x
|
||||
(byte()) f100((byte) f100::x)
|
||||
(label) f100::@return
|
||||
(byte) f100::return
|
||||
(byte) f100::x
|
||||
(byte()) f11((byte) f11::x)
|
||||
(label) f11::@return
|
||||
(byte) f11::return
|
||||
(const byte) f11::return#1 return = (const byte) f12::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f11::x
|
||||
(byte()) f12((byte) f12::x)
|
||||
(label) f12::@return
|
||||
(byte) f12::return
|
||||
(const byte) f12::return#1 return = (const byte) f13::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f12::x
|
||||
(byte()) f13((byte) f13::x)
|
||||
(label) f13::@return
|
||||
(byte) f13::return
|
||||
(const byte) f13::return#1 return = (const byte) f14::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f13::x
|
||||
(byte()) f14((byte) f14::x)
|
||||
(label) f14::@return
|
||||
(byte) f14::return
|
||||
(const byte) f14::return#1 return = (const byte) f15::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f14::x
|
||||
(byte()) f15((byte) f15::x)
|
||||
(label) f15::@return
|
||||
(byte) f15::return
|
||||
(const byte) f15::return#1 return = (const byte) f16::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f15::x
|
||||
(byte()) f16((byte) f16::x)
|
||||
(label) f16::@return
|
||||
(byte) f16::return
|
||||
(const byte) f16::return#1 return = (const byte) f17::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f16::x
|
||||
(byte()) f17((byte) f17::x)
|
||||
(label) f17::@return
|
||||
(byte) f17::return
|
||||
(const byte) f17::return#1 return = (const byte) f18::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f17::x
|
||||
(byte()) f18((byte) f18::x)
|
||||
(label) f18::@return
|
||||
(byte) f18::return
|
||||
(const byte) f18::return#1 return = (const byte) f19::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f18::x
|
||||
(byte()) f19((byte) f19::x)
|
||||
(label) f19::@return
|
||||
(byte) f19::return
|
||||
(const byte) f19::return#1 return = (const byte) f20::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f19::x
|
||||
(byte()) f2((byte) f2::x)
|
||||
(label) f2::@return
|
||||
(byte) f2::return
|
||||
(const byte) f2::return#1 return = (const byte) f3::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f2::x
|
||||
(byte()) f20((byte) f20::x)
|
||||
(label) f20::@return
|
||||
(byte) f20::return
|
||||
(const byte) f20::return#1 return = (const byte) f21::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f20::x
|
||||
(byte()) f21((byte) f21::x)
|
||||
(label) f21::@return
|
||||
(byte) f21::return
|
||||
(const byte) f21::return#1 return = (const byte) f22::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f21::x
|
||||
(byte()) f22((byte) f22::x)
|
||||
(label) f22::@return
|
||||
(byte) f22::return
|
||||
(const byte) f22::return#1 return = (const byte) f23::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f22::x
|
||||
(byte()) f23((byte) f23::x)
|
||||
(label) f23::@return
|
||||
(byte) f23::return
|
||||
(const byte) f23::return#1 return = (const byte) f24::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f23::x
|
||||
(byte()) f24((byte) f24::x)
|
||||
(label) f24::@return
|
||||
(byte) f24::return
|
||||
(const byte) f24::return#1 return = (const byte) f25::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f24::x
|
||||
(byte()) f25((byte) f25::x)
|
||||
(label) f25::@return
|
||||
(byte) f25::return
|
||||
(const byte) f25::return#1 return = (const byte) f26::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f25::x
|
||||
(byte()) f26((byte) f26::x)
|
||||
(label) f26::@return
|
||||
(byte) f26::return
|
||||
(const byte) f26::return#1 return = (const byte) f27::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f26::x
|
||||
(byte()) f27((byte) f27::x)
|
||||
(label) f27::@return
|
||||
(byte) f27::return
|
||||
(const byte) f27::return#1 return = (const byte) f28::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f27::x
|
||||
(byte()) f28((byte) f28::x)
|
||||
(label) f28::@return
|
||||
(byte) f28::return
|
||||
(const byte) f28::return#1 return = (const byte) f29::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f28::x
|
||||
(byte()) f29((byte) f29::x)
|
||||
(label) f29::@return
|
||||
(byte) f29::return
|
||||
(const byte) f29::return#1 return = (const byte) f30::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f29::x
|
||||
(byte()) f3((byte) f3::x)
|
||||
(label) f3::@return
|
||||
(byte) f3::return
|
||||
(const byte) f3::return#1 return = (const byte) f4::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f3::x
|
||||
(byte()) f30((byte) f30::x)
|
||||
(label) f30::@return
|
||||
(byte) f30::return
|
||||
(const byte) f30::return#1 return = (const byte) f31::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f30::x
|
||||
(byte()) f31((byte) f31::x)
|
||||
(label) f31::@return
|
||||
(byte) f31::return
|
||||
(const byte) f31::return#1 return = (const byte) f32::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f31::x
|
||||
(byte()) f32((byte) f32::x)
|
||||
(label) f32::@return
|
||||
(byte) f32::return
|
||||
(const byte) f32::return#1 return = (const byte) f33::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f32::x
|
||||
(byte()) f33((byte) f33::x)
|
||||
(label) f33::@return
|
||||
(byte) f33::return
|
||||
(const byte) f33::return#1 return = (const byte) f34::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f33::x
|
||||
(byte()) f34((byte) f34::x)
|
||||
(label) f34::@return
|
||||
(byte) f34::return
|
||||
(const byte) f34::return#1 return = (const byte) f35::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f34::x
|
||||
(byte()) f35((byte) f35::x)
|
||||
(label) f35::@return
|
||||
(byte) f35::return
|
||||
(const byte) f35::return#1 return = (const byte) f36::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f35::x
|
||||
(byte()) f36((byte) f36::x)
|
||||
(label) f36::@return
|
||||
(byte) f36::return
|
||||
(const byte) f36::return#1 return = (const byte) f37::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f36::x
|
||||
(byte()) f37((byte) f37::x)
|
||||
(label) f37::@return
|
||||
(byte) f37::return
|
||||
(const byte) f37::return#1 return = (const byte) f38::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f37::x
|
||||
(byte()) f38((byte) f38::x)
|
||||
(label) f38::@return
|
||||
(byte) f38::return
|
||||
(const byte) f38::return#1 return = (const byte) f39::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f38::x
|
||||
(byte()) f39((byte) f39::x)
|
||||
(label) f39::@return
|
||||
(byte) f39::return
|
||||
(const byte) f39::return#1 return = (const byte) f40::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f39::x
|
||||
(byte()) f4((byte) f4::x)
|
||||
(label) f4::@return
|
||||
(byte) f4::return
|
||||
(const byte) f4::return#1 return = (const byte) f5::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f4::x
|
||||
(byte()) f40((byte) f40::x)
|
||||
(label) f40::@return
|
||||
(byte) f40::return
|
||||
(const byte) f40::return#1 return = (const byte) f41::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f40::x
|
||||
(byte()) f41((byte) f41::x)
|
||||
(label) f41::@return
|
||||
(byte) f41::return
|
||||
(const byte) f41::return#1 return = (const byte) f42::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f41::x
|
||||
(byte()) f42((byte) f42::x)
|
||||
(label) f42::@return
|
||||
(byte) f42::return
|
||||
(const byte) f42::return#1 return = (const byte) f43::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f42::x
|
||||
(byte()) f43((byte) f43::x)
|
||||
(label) f43::@return
|
||||
(byte) f43::return
|
||||
(const byte) f43::return#1 return = (const byte) f44::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f43::x
|
||||
(byte()) f44((byte) f44::x)
|
||||
(label) f44::@return
|
||||
(byte) f44::return
|
||||
(const byte) f44::return#1 return = (const byte) f45::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f44::x
|
||||
(byte()) f45((byte) f45::x)
|
||||
(label) f45::@return
|
||||
(byte) f45::return
|
||||
(const byte) f45::return#1 return = (const byte) f46::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f45::x
|
||||
(byte()) f46((byte) f46::x)
|
||||
(label) f46::@return
|
||||
(byte) f46::return
|
||||
(const byte) f46::return#1 return = (const byte) f47::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f46::x
|
||||
(byte()) f47((byte) f47::x)
|
||||
(label) f47::@return
|
||||
(byte) f47::return
|
||||
(const byte) f47::return#1 return = (const byte) f48::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f47::x
|
||||
(byte()) f48((byte) f48::x)
|
||||
(label) f48::@return
|
||||
(byte) f48::return
|
||||
(const byte) f48::return#1 return = (const byte) f49::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f48::x
|
||||
(byte()) f49((byte) f49::x)
|
||||
(label) f49::@return
|
||||
(byte) f49::return
|
||||
(const byte) f49::return#1 return = (const byte) f50::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f49::x
|
||||
(byte()) f5((byte) f5::x)
|
||||
(label) f5::@return
|
||||
(byte) f5::return
|
||||
(const byte) f5::return#1 return = (const byte) f6::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f5::x
|
||||
(byte()) f50((byte) f50::x)
|
||||
(label) f50::@return
|
||||
(byte) f50::return
|
||||
(const byte) f50::return#1 return = (const byte) f51::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f50::x
|
||||
(byte()) f51((byte) f51::x)
|
||||
(label) f51::@return
|
||||
(byte) f51::return
|
||||
(const byte) f51::return#1 return = (const byte) f52::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f51::x
|
||||
(byte()) f52((byte) f52::x)
|
||||
(label) f52::@return
|
||||
(byte) f52::return
|
||||
(const byte) f52::return#1 return = (const byte) f53::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f52::x
|
||||
(byte()) f53((byte) f53::x)
|
||||
(label) f53::@return
|
||||
(byte) f53::return
|
||||
(const byte) f53::return#1 return = (const byte) f54::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f53::x
|
||||
(byte()) f54((byte) f54::x)
|
||||
(label) f54::@return
|
||||
(byte) f54::return
|
||||
(const byte) f54::return#1 return = (const byte) f55::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f54::x
|
||||
(byte()) f55((byte) f55::x)
|
||||
(label) f55::@return
|
||||
(byte) f55::return
|
||||
(const byte) f55::return#1 return = (const byte) f56::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f55::x
|
||||
(byte()) f56((byte) f56::x)
|
||||
(label) f56::@return
|
||||
(byte) f56::return
|
||||
(const byte) f56::return#1 return = (const byte) f57::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f56::x
|
||||
(byte()) f57((byte) f57::x)
|
||||
(label) f57::@return
|
||||
(byte) f57::return
|
||||
(const byte) f57::return#1 return = (const byte) f58::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f57::x
|
||||
(byte()) f58((byte) f58::x)
|
||||
(label) f58::@return
|
||||
(byte) f58::return
|
||||
(const byte) f58::return#1 return = (const byte) f59::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f58::x
|
||||
(byte()) f59((byte) f59::x)
|
||||
(label) f59::@return
|
||||
(byte) f59::return
|
||||
(const byte) f59::return#1 return = (const byte) f60::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f59::x
|
||||
(byte()) f6((byte) f6::x)
|
||||
(label) f6::@return
|
||||
(byte) f6::return
|
||||
(const byte) f6::return#1 return = (const byte) f7::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f6::x
|
||||
(byte()) f60((byte) f60::x)
|
||||
(label) f60::@return
|
||||
(byte) f60::return
|
||||
(const byte) f60::return#1 return = (const byte) f61::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f60::x
|
||||
(byte()) f61((byte) f61::x)
|
||||
(label) f61::@return
|
||||
(byte) f61::return
|
||||
(const byte) f61::return#1 return = (const byte) f62::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f61::x
|
||||
(byte()) f62((byte) f62::x)
|
||||
(label) f62::@return
|
||||
(byte) f62::return
|
||||
(const byte) f62::return#1 return = (const byte) f63::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f62::x
|
||||
(byte()) f63((byte) f63::x)
|
||||
(label) f63::@return
|
||||
(byte) f63::return
|
||||
(const byte) f63::return#1 return = (const byte) f64::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f63::x
|
||||
(byte()) f64((byte) f64::x)
|
||||
(label) f64::@return
|
||||
(byte) f64::return
|
||||
(const byte) f64::return#1 return = (const byte) f65::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f64::x
|
||||
(byte()) f65((byte) f65::x)
|
||||
(label) f65::@return
|
||||
(byte) f65::return
|
||||
(const byte) f65::return#1 return = (const byte) f66::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f65::x
|
||||
(byte()) f66((byte) f66::x)
|
||||
(label) f66::@return
|
||||
(byte) f66::return
|
||||
(const byte) f66::return#1 return = (const byte) f67::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f66::x
|
||||
(byte()) f67((byte) f67::x)
|
||||
(label) f67::@return
|
||||
(byte) f67::return
|
||||
(const byte) f67::return#1 return = (const byte) f68::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f67::x
|
||||
(byte()) f68((byte) f68::x)
|
||||
(label) f68::@return
|
||||
(byte) f68::return
|
||||
(const byte) f68::return#1 return = (const byte) f69::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f68::x
|
||||
(byte()) f69((byte) f69::x)
|
||||
(label) f69::@return
|
||||
(byte) f69::return
|
||||
(const byte) f69::return#1 return = (const byte) f70::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f69::x
|
||||
(byte()) f7((byte) f7::x)
|
||||
(label) f7::@return
|
||||
(byte) f7::return
|
||||
(const byte) f7::return#1 return = (const byte) f8::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f7::x
|
||||
(byte()) f70((byte) f70::x)
|
||||
(label) f70::@return
|
||||
(byte) f70::return
|
||||
(const byte) f70::return#1 return = (const byte) f71::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f70::x
|
||||
(byte()) f71((byte) f71::x)
|
||||
(label) f71::@return
|
||||
(byte) f71::return
|
||||
(const byte) f71::return#1 return = (const byte) f72::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f71::x
|
||||
(byte()) f72((byte) f72::x)
|
||||
(label) f72::@return
|
||||
(byte) f72::return
|
||||
(const byte) f72::return#1 return = (const byte) f73::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f72::x
|
||||
(byte()) f73((byte) f73::x)
|
||||
(label) f73::@return
|
||||
(byte) f73::return
|
||||
(const byte) f73::return#1 return = (const byte) f74::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f73::x
|
||||
(byte()) f74((byte) f74::x)
|
||||
(label) f74::@return
|
||||
(byte) f74::return
|
||||
(const byte) f74::return#1 return = (const byte) f75::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f74::x
|
||||
(byte()) f75((byte) f75::x)
|
||||
(label) f75::@return
|
||||
(byte) f75::return
|
||||
(const byte) f75::return#1 return = (const byte) f76::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f75::x
|
||||
(byte()) f76((byte) f76::x)
|
||||
(label) f76::@return
|
||||
(byte) f76::return
|
||||
(const byte) f76::return#1 return = (const byte) f77::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f76::x
|
||||
(byte()) f77((byte) f77::x)
|
||||
(label) f77::@return
|
||||
(byte) f77::return
|
||||
(const byte) f77::return#1 return = (const byte) f78::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f77::x
|
||||
(byte()) f78((byte) f78::x)
|
||||
(label) f78::@return
|
||||
(byte) f78::return
|
||||
(const byte) f78::return#1 return = (const byte) f79::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f78::x
|
||||
(byte()) f79((byte) f79::x)
|
||||
(label) f79::@return
|
||||
(byte) f79::return
|
||||
(const byte) f79::return#1 return = (const byte) f80::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f79::x
|
||||
(byte()) f8((byte) f8::x)
|
||||
(label) f8::@return
|
||||
(byte) f8::return
|
||||
(const byte) f8::return#1 return = (const byte) f9::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f8::x
|
||||
(byte()) f80((byte) f80::x)
|
||||
(label) f80::@return
|
||||
(byte) f80::return
|
||||
(const byte) f80::return#1 return = (const byte) f81::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f80::x
|
||||
(byte()) f81((byte) f81::x)
|
||||
(label) f81::@return
|
||||
(byte) f81::return
|
||||
(const byte) f81::return#1 return = (const byte) f82::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f81::x
|
||||
(byte()) f82((byte) f82::x)
|
||||
(label) f82::@return
|
||||
(byte) f82::return
|
||||
(const byte) f82::return#1 return = (const byte) f83::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f82::x
|
||||
(byte()) f83((byte) f83::x)
|
||||
(label) f83::@return
|
||||
(byte) f83::return
|
||||
(const byte) f83::return#1 return = (const byte) f84::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f83::x
|
||||
(byte()) f84((byte) f84::x)
|
||||
(label) f84::@return
|
||||
(byte) f84::return
|
||||
(const byte) f84::return#1 return = (const byte) f85::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f84::x
|
||||
(byte()) f85((byte) f85::x)
|
||||
(label) f85::@return
|
||||
(byte) f85::return
|
||||
(const byte) f85::return#1 return = (const byte) f86::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f85::x
|
||||
(byte()) f86((byte) f86::x)
|
||||
(label) f86::@return
|
||||
(byte) f86::return
|
||||
(const byte) f86::return#1 return = (const byte) f87::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f86::x
|
||||
(byte()) f87((byte) f87::x)
|
||||
(label) f87::@return
|
||||
(byte) f87::return
|
||||
(const byte) f87::return#1 return = (const byte) f88::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f87::x
|
||||
(byte()) f88((byte) f88::x)
|
||||
(label) f88::@return
|
||||
(byte) f88::return
|
||||
(const byte) f88::return#1 return = (const byte) f89::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f88::x
|
||||
(byte()) f89((byte) f89::x)
|
||||
(label) f89::@return
|
||||
(byte) f89::return
|
||||
(const byte) f89::return#1 return = (const byte) f90::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f89::x
|
||||
(byte()) f9((byte) f9::x)
|
||||
(label) f9::@return
|
||||
(byte) f9::return
|
||||
(const byte) f9::return#1 return = (const byte) f10::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f9::x
|
||||
(byte()) f90((byte) f90::x)
|
||||
(label) f90::@return
|
||||
(byte) f90::return
|
||||
(const byte) f90::return#1 return = (const byte) f91::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f90::x
|
||||
(byte()) f91((byte) f91::x)
|
||||
(label) f91::@return
|
||||
(byte) f91::return
|
||||
(const byte) f91::return#1 return = (const byte) f92::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f91::x
|
||||
(byte()) f92((byte) f92::x)
|
||||
(label) f92::@return
|
||||
(byte) f92::return
|
||||
(const byte) f92::return#1 return = (const byte) f93::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f92::x
|
||||
(byte()) f93((byte) f93::x)
|
||||
(label) f93::@return
|
||||
(byte) f93::return
|
||||
(const byte) f93::return#1 return = (const byte) f94::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f93::x
|
||||
(byte()) f94((byte) f94::x)
|
||||
(label) f94::@return
|
||||
(byte) f94::return
|
||||
(const byte) f94::return#1 return = (const byte) f95::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f94::x
|
||||
(byte()) f95((byte) f95::x)
|
||||
(label) f95::@return
|
||||
(byte) f95::return
|
||||
(const byte) f95::return#1 return = (const byte) f96::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f95::x
|
||||
(byte()) f96((byte) f96::x)
|
||||
(label) f96::@return
|
||||
(byte) f96::return
|
||||
(const byte) f96::return#1 return = (const byte) f97::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f96::x
|
||||
(byte()) f97((byte) f97::x)
|
||||
(label) f97::@return
|
||||
(byte) f97::return
|
||||
(const byte) f97::return#1 return = (const byte) f98::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f97::x
|
||||
(byte()) f98((byte) f98::x)
|
||||
(label) f98::@return
|
||||
(byte) f98::return
|
||||
(const byte) f98::return#1 return = (const byte) f99::return#1+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f98::x
|
||||
(byte()) f99((byte) f99::x)
|
||||
(label) f99::@return
|
||||
(byte) f99::return
|
||||
(const byte) f99::return#1 return = (const byte) f1::x#0+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) f99::x
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte) main::reverse
|
||||
(byte*) main::screen
|
||||
(const byte*) main::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) $400
|
||||
|
@ -76,13 +76,12 @@ bitmap_line: {
|
||||
sty bitmap_line_ydxi.y
|
||||
ldx x1
|
||||
jsr bitmap_line_ydxi
|
||||
breturn:
|
||||
rts
|
||||
b8:
|
||||
ldx x1
|
||||
sty bitmap_line_xdyi.y
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
b7:
|
||||
tya
|
||||
sec
|
||||
@ -95,14 +94,14 @@ bitmap_line: {
|
||||
ldx x0
|
||||
sty bitmap_line_ydxd.y1
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
b9:
|
||||
ldx x1
|
||||
sty bitmap_line_xdyd.y
|
||||
lda x0
|
||||
sta bitmap_line_xdyd.x1
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
b1:
|
||||
lda x1
|
||||
sec
|
||||
@ -123,11 +122,11 @@ bitmap_line: {
|
||||
sty bitmap_line_ydxd.y
|
||||
ldx x1
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
b12:
|
||||
ldx x0
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
b11:
|
||||
tya
|
||||
sec
|
||||
@ -140,13 +139,13 @@ bitmap_line: {
|
||||
ldx x0
|
||||
sty bitmap_line_ydxi.y1
|
||||
jsr bitmap_line_ydxi
|
||||
jmp breturn
|
||||
rts
|
||||
b13:
|
||||
ldx x0
|
||||
lda x1
|
||||
sta bitmap_line_xdyi.x1
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
// bitmap_line_xdyi(byte register(X) x, byte zeropage(6) y, byte zeropage(5) x1, byte zeropage(4) xd, byte zeropage(3) yd)
|
||||
bitmap_line_xdyi: {
|
||||
|
@ -5382,6 +5382,13 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b2 in bne b6
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
@ -5394,6 +5401,7 @@ Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction lda x0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b6:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b2
|
||||
@ -5809,7 +5817,7 @@ reg byte a [ bitmap_init::$10 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 221023
|
||||
Score: 221044
|
||||
|
||||
//SEG0 File Comments
|
||||
//SEG1 Basic Upstart
|
||||
@ -5954,7 +5962,6 @@ bitmap_line: {
|
||||
//SEG63 [109] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy
|
||||
jsr bitmap_line_ydxi
|
||||
//SEG64 bitmap_line::@return
|
||||
breturn:
|
||||
//SEG65 [36] return
|
||||
rts
|
||||
//SEG66 bitmap_line::@8
|
||||
@ -5974,7 +5981,7 @@ bitmap_line: {
|
||||
//SEG77 [87] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy
|
||||
//SEG78 [87] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG79 bitmap_line::@7
|
||||
b7:
|
||||
//SEG80 [43] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuz1=vbuyy_minus_vbuz2
|
||||
@ -6003,7 +6010,7 @@ bitmap_line: {
|
||||
//SEG93 [139] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy
|
||||
//SEG94 [139] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG95 bitmap_line::@9
|
||||
b9:
|
||||
//SEG96 [51] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuxx=vbuz1
|
||||
@ -6023,7 +6030,7 @@ bitmap_line: {
|
||||
//SEG106 [124] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy
|
||||
//SEG107 [124] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG108 bitmap_line::@1
|
||||
b1:
|
||||
//SEG109 [57] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuz2_minus_vbuz3
|
||||
@ -6063,7 +6070,7 @@ bitmap_line: {
|
||||
//SEG125 [139] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy
|
||||
//SEG126 [139] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG127 bitmap_line::@12
|
||||
b12:
|
||||
//SEG128 [67] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuxx=vbuz1
|
||||
@ -6080,7 +6087,7 @@ bitmap_line: {
|
||||
//SEG138 [124] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy
|
||||
//SEG139 [124] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG140 bitmap_line::@11
|
||||
b11:
|
||||
//SEG141 [73] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuz1=vbuyy_minus_vbuz2
|
||||
@ -6109,7 +6116,7 @@ bitmap_line: {
|
||||
//SEG154 [109] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy
|
||||
//SEG155 [109] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy
|
||||
jsr bitmap_line_ydxi
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG156 bitmap_line::@13
|
||||
b13:
|
||||
//SEG157 [81] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuxx=vbuz1
|
||||
@ -6128,7 +6135,7 @@ bitmap_line: {
|
||||
//SEG167 [87] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy
|
||||
//SEG168 [87] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
//SEG169 bitmap_line_xdyi
|
||||
// bitmap_line_xdyi(byte register(X) x, byte zeropage(6) y, byte zeropage(5) x1, byte zeropage(4) xd, byte zeropage(3) yd)
|
||||
|
@ -3909,6 +3909,7 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to breturn in bne b5
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b7
|
||||
@ -3923,7 +3924,7 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b5:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp breturn
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
|
@ -149,7 +149,6 @@ render_logo: {
|
||||
b5:
|
||||
cpy #$28
|
||||
bne b6
|
||||
breturn:
|
||||
rts
|
||||
b6:
|
||||
lda logo_idx
|
||||
@ -201,7 +200,7 @@ render_logo: {
|
||||
b11:
|
||||
cpy #$28
|
||||
bne b12
|
||||
jmp breturn
|
||||
rts
|
||||
b12:
|
||||
lda #0
|
||||
sta SCREEN,y
|
||||
|
@ -7770,7 +7770,9 @@ Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b4 in bne b6
|
||||
Skipping double jump to b4 in bne b6
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b3 in beq b12
|
||||
Replacing jump to rts with rts in jmp b3
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_sin16s to b4
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
@ -7792,10 +7794,11 @@ Removing instruction lda #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b6:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b12:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b4
|
||||
Removing unreachable instruction jmp b3
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -8272,7 +8275,7 @@ reg byte a [ divr16u::$2 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 43610
|
||||
Score: 43910
|
||||
|
||||
//SEG0 File Comments
|
||||
//SEG1 Basic Upstart
|
||||
@ -8518,7 +8521,6 @@ render_logo: {
|
||||
cpy #$28
|
||||
bne b6
|
||||
//SEG92 render_logo::@return
|
||||
breturn:
|
||||
//SEG93 [49] return
|
||||
rts
|
||||
//SEG94 render_logo::@6
|
||||
@ -8622,7 +8624,7 @@ render_logo: {
|
||||
//SEG144 [75] if((byte) render_logo::screen_idx#15!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto render_logo::@12 -- vbuyy_neq_vbuc1_then_la1
|
||||
cpy #$28
|
||||
bne b12
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG145 render_logo::@12
|
||||
b12:
|
||||
//SEG146 [76] *((const byte*) SCREEN#0 + (byte) render_logo::screen_idx#15) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- pbuc1_derefidx_vbuyy=vbuc2
|
||||
|
@ -7586,6 +7586,7 @@ Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b2 in bne b7
|
||||
Skipping double jump to b2 in bne b7
|
||||
Skipping double jump to b3 in beq b12
|
||||
Replacing jump to rts with rts in jmp b3
|
||||
Skipping double jump to b2 in bne b6
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_sin16s to b4
|
||||
@ -7607,7 +7608,7 @@ Removing instruction b12:
|
||||
Removing instruction b6:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b2
|
||||
Removing unreachable instruction jmp b3
|
||||
Removing unreachable instruction rts
|
||||
Removing unreachable instruction jmp b2
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
Fixing long branch [160] bcc b1 to bcs
|
||||
|
@ -26,13 +26,12 @@ getfn: {
|
||||
sta return
|
||||
lda #>fn2
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
b1:
|
||||
lda #<fn1
|
||||
sta return
|
||||
lda #>fn1
|
||||
sta return+1
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
fn2: {
|
||||
|
@ -568,9 +568,12 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label breturn_from_getfn to b1
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -610,7 +613,7 @@ reg byte a [ getfn::$0 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 389
|
||||
Score: 392
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests creating, assigning returning and calling pointers to non-args no-return functions
|
||||
@ -671,7 +674,7 @@ getfn: {
|
||||
sta return
|
||||
lda #>fn2
|
||||
sta return+1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG31 [15] phi from getfn to getfn::@return [phi:getfn->getfn::@return]
|
||||
b1:
|
||||
//SEG32 [15] phi (void()*) getfn::return#3 = &(void()) fn1() [phi:getfn->getfn::@return#0] -- pprz1=pprc1
|
||||
@ -680,7 +683,6 @@ getfn: {
|
||||
lda #>fn1
|
||||
sta return+1
|
||||
//SEG33 getfn::@return
|
||||
breturn:
|
||||
//SEG34 [16] return
|
||||
rts
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ menu: {
|
||||
cmp #0
|
||||
beq b2
|
||||
jsr pressed
|
||||
breturn:
|
||||
rts
|
||||
b2:
|
||||
ldx #KEY_I
|
||||
@ -45,7 +44,7 @@ menu: {
|
||||
lda #RED
|
||||
sta BORDERCOL
|
||||
sei
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
ldx #KEY_E
|
||||
jsr keyboard_key_pressed
|
||||
@ -54,7 +53,7 @@ menu: {
|
||||
lda #GREEN
|
||||
sta BORDERCOL
|
||||
cli
|
||||
jmp breturn
|
||||
rts
|
||||
b4:
|
||||
inc SCREEN
|
||||
jmp b1
|
||||
|
@ -1961,7 +1961,11 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -2203,7 +2207,7 @@ reg byte a [ pressed::$0 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 2845
|
||||
Score: 2851
|
||||
|
||||
//SEG0 File Comments
|
||||
// Exploring keyboard glitch that finds "C" press when pressing space
|
||||
@ -2271,7 +2275,6 @@ menu: {
|
||||
//SEG27 [14] call pressed
|
||||
jsr pressed
|
||||
//SEG28 menu::@return
|
||||
breturn:
|
||||
//SEG29 [15] return
|
||||
rts
|
||||
//SEG30 [16] phi from menu::@8 to menu::@2 [phi:menu::@8->menu::@2]
|
||||
@ -2294,7 +2297,7 @@ menu: {
|
||||
sta BORDERCOL
|
||||
//SEG41 asm { sei }
|
||||
sei
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG42 [23] phi from menu::@9 to menu::@3 [phi:menu::@9->menu::@3]
|
||||
//SEG43 menu::@3
|
||||
b3:
|
||||
@ -2315,7 +2318,7 @@ menu: {
|
||||
sta BORDERCOL
|
||||
//SEG53 asm { cli }
|
||||
cli
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG54 menu::@4
|
||||
b4:
|
||||
//SEG55 [30] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) -- _deref_pbuc1=_inc__deref_pbuc1
|
||||
|
@ -323,14 +323,13 @@ divr16s: {
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta return+1
|
||||
breturn:
|
||||
rts
|
||||
b10:
|
||||
lda divr16u.rem
|
||||
sta rem16s
|
||||
lda divr16u.rem+1
|
||||
sta rem16s+1
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
sec
|
||||
lda _13
|
||||
|
@ -5679,6 +5679,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b2 in bne b6
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
@ -5691,6 +5692,7 @@ Removing instruction jmp b1
|
||||
Removing instruction jmp b3
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b6:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b2
|
||||
@ -6107,7 +6109,7 @@ reg byte a [ bitmap_init::$7 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 21644
|
||||
Score: 21647
|
||||
|
||||
//SEG0 File Comments
|
||||
// Animated lines drawn on a single color bitmap
|
||||
@ -6588,7 +6590,6 @@ divr16s: {
|
||||
//SEG151 [86] phi (signed word) rem16s#3 = (signed word~) rem16s#57 [phi:divr16s::@10/divr16s::@5->divr16s::@return#0] -- register_copy
|
||||
//SEG152 [86] phi (signed word) divr16s::return#2 = (signed word~) divr16s::return#7 [phi:divr16s::@10/divr16s::@5->divr16s::@return#1] -- register_copy
|
||||
//SEG153 divr16s::@return
|
||||
breturn:
|
||||
//SEG154 [87] return
|
||||
rts
|
||||
//SEG155 divr16s::@10
|
||||
@ -6599,7 +6600,7 @@ divr16s: {
|
||||
sta rem16s
|
||||
lda divr16u.rem+1
|
||||
sta rem16s+1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG158 divr16s::@3
|
||||
b3:
|
||||
//SEG159 [90] (signed word~) divr16s::$13 ← - (signed word) divr16s::divisor#0 -- vwsz1=_neg_vwsz1
|
||||
|
@ -14,7 +14,6 @@ main: {
|
||||
lda str,x
|
||||
cmp #'@'
|
||||
bne b2
|
||||
breturn:
|
||||
rts
|
||||
b2:
|
||||
lda str,x
|
||||
@ -24,7 +23,7 @@ main: {
|
||||
inx
|
||||
cpx #0
|
||||
bne b1
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
lda str,x
|
||||
ldy #0
|
||||
|
@ -408,9 +408,12 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -438,7 +441,7 @@ zp ZP_WORD:2 [ main::screen#2 main::screen#5 main::screen#1 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 681
|
||||
Score: 711
|
||||
|
||||
//SEG0 File Comments
|
||||
// Illustrates both break & continue statements in a loop
|
||||
@ -476,7 +479,6 @@ main: {
|
||||
cmp #'@'
|
||||
bne b2
|
||||
//SEG19 main::@return
|
||||
breturn:
|
||||
//SEG20 [7] return
|
||||
rts
|
||||
//SEG21 main::@2
|
||||
@ -494,7 +496,7 @@ main: {
|
||||
//SEG27 [11] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -- vbuxx_neq_0_then_la1
|
||||
cpx #0
|
||||
bne b1
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG28 main::@3
|
||||
b3:
|
||||
//SEG29 [12] *((byte*) main::screen#2) ← *((const byte[]) main::str#0 + (byte) main::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx
|
||||
|
@ -13,7 +13,6 @@ main: {
|
||||
lda (line),y
|
||||
cmp #'a'
|
||||
bne b5
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
ldy #0
|
||||
@ -37,7 +36,7 @@ main: {
|
||||
cmp #<$400+$28*$19
|
||||
bcc b1
|
||||
!:
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
lda #'a'
|
||||
sta (line),y
|
||||
|
@ -452,12 +452,15 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b2_from_b1 to b5
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -483,7 +486,7 @@ reg byte y [ main::i#2 main::i#1 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 3556
|
||||
Score: 3586
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests break statement in a simple loop
|
||||
@ -518,7 +521,6 @@ main: {
|
||||
cmp #'a'
|
||||
bne b5
|
||||
//SEG17 main::@return
|
||||
breturn:
|
||||
//SEG18 [7] return
|
||||
rts
|
||||
//SEG19 [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
|
||||
@ -552,7 +554,7 @@ main: {
|
||||
cmp #<$400+$28*$19
|
||||
bcc b1
|
||||
!:
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG28 main::@3
|
||||
b3:
|
||||
//SEG29 [12] *((byte*) main::line#2 + (byte) main::i#2) ← (byte) 'a' -- pbuz1_derefidx_vbuyy=vbuc1
|
||||
|
@ -9,7 +9,6 @@ main: {
|
||||
lda SCREEN,x
|
||||
cmp #'a'
|
||||
bne b2
|
||||
breturn:
|
||||
rts
|
||||
b2:
|
||||
lda #'a'
|
||||
@ -17,5 +16,5 @@ main: {
|
||||
inx
|
||||
cpx #$28*6+1
|
||||
bne b1
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
@ -286,9 +286,12 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -309,7 +312,7 @@ reg byte x [ main::i#2 main::i#1 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 281
|
||||
Score: 311
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests break statement in a simple loop
|
||||
@ -340,7 +343,6 @@ main: {
|
||||
cmp #'a'
|
||||
bne b2
|
||||
//SEG17 main::@return
|
||||
breturn:
|
||||
//SEG18 [7] return
|
||||
rts
|
||||
//SEG19 main::@2
|
||||
@ -353,6 +355,6 @@ main: {
|
||||
//SEG22 [10] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28*(byte/signed byte/word/signed word/dword/signed dword) 6+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$28*6+1
|
||||
bne b1
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
||||
|
@ -108,6 +108,7 @@ f0: {
|
||||
jsr fa
|
||||
lda #0
|
||||
sta bb
|
||||
rts
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
@ -182,6 +183,7 @@ fa: {
|
||||
sta bc
|
||||
jsr fb
|
||||
ldx #0
|
||||
rts
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
@ -255,6 +257,7 @@ fb: {
|
||||
lda #0
|
||||
jsr fc
|
||||
ldy #0
|
||||
rts
|
||||
breturn:
|
||||
rts
|
||||
}
|
||||
|
@ -5942,16 +5942,16 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to breturn in bne b19
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b19:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp breturn
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -6241,7 +6241,7 @@ zp ZP_BYTE:6 [ be#138 be#44 be#137 be#43 be#136 be#42 be#135 be#41 be#134 be#40
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 995
|
||||
Score: 1013
|
||||
|
||||
//SEG0 File Comments
|
||||
//SEG1 Basic Upstart
|
||||
@ -6541,6 +6541,7 @@ f0: {
|
||||
//SEG187 [57] phi (byte) bb#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:f0::@19->f0::@return#3] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta bb
|
||||
rts
|
||||
//SEG188 [57] phi from f0::@9 to f0::@return [phi:f0::@9->f0::@return]
|
||||
//SEG189 [57] phi (byte) be#13 = (byte) be#105 [phi:f0::@9->f0::@return#0] -- register_copy
|
||||
//SEG190 [57] phi (byte) bd#13 = (byte) bd#137 [phi:f0::@9->f0::@return#1] -- register_copy
|
||||
@ -6761,6 +6762,7 @@ fa: {
|
||||
//SEG332 [108] phi (byte) bd#24 = (byte) bd#35 [phi:fa::@19->fa::@return#1] -- register_copy
|
||||
//SEG333 [108] phi (byte) bc#24 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fa::@19->fa::@return#2] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
rts
|
||||
//SEG334 [108] phi from fa::@9 to fa::@return [phi:fa::@9->fa::@return]
|
||||
//SEG335 [108] phi (byte) be#24 = (byte) be#116 [phi:fa::@9->fa::@return#0] -- register_copy
|
||||
//SEG336 [108] phi (byte) bd#24 = (byte) bd#104 [phi:fa::@9->fa::@return#1] -- register_copy
|
||||
@ -6959,6 +6961,7 @@ fb: {
|
||||
//SEG457 [159] phi (byte) be#35 = (byte) be#46 [phi:fb::@19->fb::@return#0] -- register_copy
|
||||
//SEG458 [159] phi (byte) bd#35 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fb::@19->fb::@return#1] -- vbuyy=vbuc1
|
||||
ldy #0
|
||||
rts
|
||||
//SEG459 [159] phi from fb::@9 to fb::@return [phi:fb::@9->fb::@return]
|
||||
//SEG460 [159] phi (byte) be#35 = (byte) be#127 [phi:fb::@9->fb::@return#0] -- register_copy
|
||||
//SEG461 [159] phi (byte) bd#35 = (byte) bd#115 [phi:fb::@9->fb::@return#1] -- register_copy
|
||||
|
@ -52,14 +52,13 @@ nexttext: {
|
||||
sta textp
|
||||
lda #>text2
|
||||
sta textp+1
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
lda #<text1
|
||||
sta textp
|
||||
lda #>text1
|
||||
sta textp+1
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
text1: .text "camelot @"
|
||||
text2: .text "rex @"
|
||||
|
@ -700,9 +700,12 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -749,7 +752,7 @@ reg byte a [ nexttext::$0 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 5758
|
||||
Score: 5761
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests pointer to pointer in a more complex setup
|
||||
@ -849,7 +852,6 @@ nexttext: {
|
||||
lda #>text2
|
||||
sta textp+1
|
||||
//SEG43 nexttext::@return
|
||||
breturn:
|
||||
//SEG44 [19] return
|
||||
rts
|
||||
//SEG45 nexttext::@1
|
||||
@ -859,7 +861,7 @@ nexttext: {
|
||||
sta textp
|
||||
lda #>text1
|
||||
sta textp+1
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
text1: .text "camelot @"
|
||||
text2: .text "rex @"
|
||||
|
@ -61,7 +61,6 @@ position_sprite: {
|
||||
eor #$ff
|
||||
and SPRITES_XMSB
|
||||
sta SPRITES_XMSB
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
lda #1
|
||||
@ -75,5 +74,5 @@ position_sprite: {
|
||||
!e:
|
||||
ora SPRITES_XMSB
|
||||
sta SPRITES_XMSB
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
@ -1044,9 +1044,12 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -1174,7 +1177,7 @@ reg byte a [ position_sprite::$6 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 559
|
||||
Score: 562
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests rolling sprite MSB by variable amount
|
||||
@ -1278,7 +1281,6 @@ position_sprite: {
|
||||
and SPRITES_XMSB
|
||||
sta SPRITES_XMSB
|
||||
//SEG38 position_sprite::@return
|
||||
breturn:
|
||||
//SEG39 [22] return
|
||||
rts
|
||||
//SEG40 position_sprite::@1
|
||||
@ -1296,6 +1298,6 @@ position_sprite: {
|
||||
//SEG42 [24] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte/signed byte/word/signed word/dword/signed dword~) position_sprite::$6 -- _deref_pbuc1=_deref_pbuc1_bor_vbuaa
|
||||
ora SPRITES_XMSB
|
||||
sta SPRITES_XMSB
|
||||
jmp breturn
|
||||
rts
|
||||
}
|
||||
|
||||
|
@ -5220,6 +5220,7 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b3 in beq b12
|
||||
Replacing jump to rts with rts in jmp b3
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_sin16s to b4
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
@ -5233,7 +5234,7 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b12:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b3
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
|
@ -7107,7 +7107,9 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b3 in beq b12
|
||||
Replacing jump to rts with rts in jmp b3
|
||||
Skipping double jump to b3 in beq b12
|
||||
Replacing jump to rts with rts in jmp b3
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_sin16sb to b4
|
||||
Relabelling long label b1_from_sin16s to b4
|
||||
@ -7124,8 +7126,8 @@ Removing instruction bbegin:
|
||||
Removing instruction b12:
|
||||
Removing instruction b12:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b3
|
||||
Removing unreachable instruction jmp b3
|
||||
Removing unreachable instruction rts
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
|
@ -305,11 +305,10 @@ sin8s: {
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
b4:
|
||||
rts
|
||||
b14:
|
||||
txa
|
||||
jmp b4
|
||||
rts
|
||||
}
|
||||
// Calculate val*val for two unsigned byte values - the result is 8 selected bits of the 16-bit result.
|
||||
// The select parameter indicates how many of the highest bits of the 16-bit result to skip
|
||||
|
@ -4670,6 +4670,8 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp b4
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_sin8s to b5
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
Removing instruction jmp b1
|
||||
@ -4680,6 +4682,7 @@ Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction lda #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b4:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -4971,7 +4974,7 @@ reg byte a [ divr16u::$2 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 15001
|
||||
Score: 15004
|
||||
|
||||
//SEG0 File Comments
|
||||
//SEG1 Basic Upstart
|
||||
@ -5504,7 +5507,6 @@ sin8s: {
|
||||
//SEG221 [109] phi from sin8s::@14 sin8s::@8 to sin8s::@4 [phi:sin8s::@14/sin8s::@8->sin8s::@4]
|
||||
//SEG222 [109] phi (signed byte) sin8s::return#1 = (signed byte~) sin8s::return#5 [phi:sin8s::@14/sin8s::@8->sin8s::@4#0] -- register_copy
|
||||
//SEG223 sin8s::@4
|
||||
b4:
|
||||
//SEG224 sin8s::@return
|
||||
//SEG225 [110] return
|
||||
rts
|
||||
@ -5512,7 +5514,7 @@ sin8s: {
|
||||
b14:
|
||||
//SEG227 [111] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 -- vbsaa=vbsxx
|
||||
txa
|
||||
jmp b4
|
||||
rts
|
||||
}
|
||||
//SEG228 mulu8_sel
|
||||
// Calculate val*val for two unsigned byte values - the result is 8 selected bits of the 16-bit result.
|
||||
|
@ -760,11 +760,10 @@ sin8s: {
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
b4:
|
||||
rts
|
||||
b14:
|
||||
txa
|
||||
jmp b4
|
||||
rts
|
||||
}
|
||||
// Calculate val*val for two unsigned byte values - the result is 8 selected bits of the 16-bit result.
|
||||
// The select parameter indicates how many of the highest bits of the 16-bit result to skip
|
||||
|
@ -7660,6 +7660,8 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b3 in beq b12
|
||||
Replacing jump to rts with rts in jmp b3
|
||||
Replacing jump to rts with rts in jmp b4
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_sin16s to b4
|
||||
Relabelling long label b1_from_sin8s to b5
|
||||
@ -7675,8 +7677,9 @@ Removing instruction lda #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b12:
|
||||
Removing instruction b4:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp b3
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -8121,7 +8124,7 @@ reg byte a [ mul8u::$1 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 28330
|
||||
Score: 28333
|
||||
|
||||
//SEG0 File Comments
|
||||
//SEG1 Basic Upstart
|
||||
@ -9318,7 +9321,6 @@ sin8s: {
|
||||
//SEG430 [219] phi from sin8s::@14 sin8s::@8 to sin8s::@4 [phi:sin8s::@14/sin8s::@8->sin8s::@4]
|
||||
//SEG431 [219] phi (signed byte) sin8s::return#1 = (signed byte~) sin8s::return#5 [phi:sin8s::@14/sin8s::@8->sin8s::@4#0] -- register_copy
|
||||
//SEG432 sin8s::@4
|
||||
b4:
|
||||
//SEG433 sin8s::@return
|
||||
//SEG434 [220] return
|
||||
rts
|
||||
@ -9326,7 +9328,7 @@ sin8s: {
|
||||
b14:
|
||||
//SEG436 [221] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 -- vbsaa=vbsxx
|
||||
txa
|
||||
jmp b4
|
||||
rts
|
||||
}
|
||||
//SEG437 mulu8_sel
|
||||
// Calculate val*val for two unsigned byte values - the result is 8 selected bits of the 16-bit result.
|
||||
|
@ -481,11 +481,10 @@ sin8s: {
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
b4:
|
||||
rts
|
||||
b14:
|
||||
txa
|
||||
jmp b4
|
||||
rts
|
||||
}
|
||||
// Calculate val*val for two unsigned byte values - the result is 8 selected bits of the 16-bit result.
|
||||
// The select parameter indicates how many of the highest bits of the 16-bit result to skip
|
||||
|
@ -6869,6 +6869,8 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp b4
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b1_from_sin8s to b5
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
Removing instruction jmp b1
|
||||
@ -6878,6 +6880,7 @@ Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction lda #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b4:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Fixing long branch [172] bcc b1 to bcs
|
||||
Fixing long branch [178] bcc b1 to bcs
|
||||
@ -7257,7 +7260,7 @@ reg byte a [ divr16u::$2 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 19454
|
||||
Score: 19457
|
||||
|
||||
//SEG0 File Comments
|
||||
//SEG1 Basic Upstart
|
||||
@ -8133,7 +8136,6 @@ sin8s: {
|
||||
//SEG388 [178] phi from sin8s::@14 sin8s::@8 to sin8s::@4 [phi:sin8s::@14/sin8s::@8->sin8s::@4]
|
||||
//SEG389 [178] phi (signed byte) sin8s::return#0 = (signed byte~) sin8s::return#5 [phi:sin8s::@14/sin8s::@8->sin8s::@4#0] -- register_copy
|
||||
//SEG390 sin8s::@4
|
||||
b4:
|
||||
//SEG391 sin8s::@return
|
||||
//SEG392 [179] return
|
||||
rts
|
||||
@ -8141,7 +8143,7 @@ sin8s: {
|
||||
b14:
|
||||
//SEG394 [180] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 -- vbsaa=vbsxx
|
||||
txa
|
||||
jmp b4
|
||||
rts
|
||||
}
|
||||
//SEG395 mulu8_sel
|
||||
// Calculate val*val for two unsigned byte values - the result is 8 selected bits of the 16-bit result.
|
||||
|
@ -454,11 +454,10 @@ div8s: {
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
breturn:
|
||||
rts
|
||||
b9:
|
||||
tya
|
||||
jmp breturn
|
||||
rts
|
||||
b3:
|
||||
txa
|
||||
eor #$ff
|
||||
|
@ -8877,6 +8877,8 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to breturn in beq b9
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b1
|
||||
@ -8887,8 +8889,9 @@ Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b9:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction jmp breturn
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
Fixing long branch [76] bne b1 to beq
|
||||
|
||||
@ -9344,7 +9347,7 @@ reg byte a [ div8u::return#3 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 32651
|
||||
Score: 32654
|
||||
|
||||
//SEG0 File Comments
|
||||
// Test the binary division library
|
||||
@ -10189,7 +10192,6 @@ div8s: {
|
||||
//SEG384 [185] phi (signed byte) rem8s#3 = (signed byte) rem8s#2 [phi:div8s::@5/div8s::@9->div8s::@return#0] -- register_copy
|
||||
//SEG385 [185] phi (signed byte) div8s::return#2 = (signed byte) div8s::return#1 [phi:div8s::@5/div8s::@9->div8s::@return#1] -- register_copy
|
||||
//SEG386 div8s::@return
|
||||
breturn:
|
||||
//SEG387 [186] return
|
||||
rts
|
||||
//SEG388 div8s::@9
|
||||
@ -10197,7 +10199,7 @@ div8s: {
|
||||
//SEG389 [187] (signed byte~) div8s::return#7 ← (signed byte)(byte) div8s::resultu#0 -- vbsaa=vbsyy
|
||||
tya
|
||||
//SEG390 [188] (signed byte~) rem8s#33 ← (signed byte)(byte) rem8u#17
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG391 div8s::@3
|
||||
b3:
|
||||
//SEG392 [189] (signed byte~) div8s::$8 ← - (signed byte) div8s::divisor#0 -- vbsxx=_neg_vbsxx
|
||||
|
@ -99,7 +99,6 @@ mul16s_compare: {
|
||||
lda #2
|
||||
sta BGCOL
|
||||
jsr mul16s_error
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
iny
|
||||
@ -122,7 +121,7 @@ mul16s_compare: {
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
str1: .text "signed word multiply results match!@"
|
||||
}
|
||||
// Print a newline
|
||||
@ -681,14 +680,13 @@ muls16s: {
|
||||
lda j
|
||||
cmp a
|
||||
bne b3
|
||||
jmp b1
|
||||
rts
|
||||
b5:
|
||||
lda #0
|
||||
sta return
|
||||
sta return+1
|
||||
sta return+2
|
||||
sta return+3
|
||||
b1:
|
||||
rts
|
||||
b6:
|
||||
lda #0
|
||||
@ -729,7 +727,7 @@ muls16s: {
|
||||
lda i
|
||||
cmp a
|
||||
bne b4
|
||||
jmp b1
|
||||
rts
|
||||
}
|
||||
// Perform many possible word multiplications (slow and fast) and compare the results
|
||||
mul16u_compare: {
|
||||
@ -820,7 +818,6 @@ mul16u_compare: {
|
||||
lda a+1
|
||||
sta mul16u_error.a+1
|
||||
jsr mul16u_error
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
iny
|
||||
@ -847,7 +844,7 @@ mul16u_compare: {
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
str1: .text "word multiply results match!@"
|
||||
}
|
||||
// mul16u_error(word zeropage(3) a, word zeropage($17) b, dword zeropage($b) ms, dword zeropage($19) mn, dword zeropage($11) mf)
|
||||
@ -960,14 +957,13 @@ muls16u: {
|
||||
lda i
|
||||
cmp a
|
||||
bne b2
|
||||
jmp b1
|
||||
rts
|
||||
b3:
|
||||
lda #0
|
||||
sta return
|
||||
sta return+1
|
||||
sta return+2
|
||||
sta return+3
|
||||
b1:
|
||||
rts
|
||||
}
|
||||
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4)
|
||||
|
@ -10189,8 +10189,12 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b4 in beq b15
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp b1
|
||||
Skipping double jump to b1 in jmp b1_from_b4
|
||||
Skipping double jump to b4 in beq b15
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp b1
|
||||
Skipping double jump to b5 in bne b7
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b3_from_b12 to b6
|
||||
@ -10215,17 +10219,24 @@ Removing instruction lda #0
|
||||
Removing instruction lda a+1
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b15:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b15:
|
||||
Removing instruction b1:
|
||||
Removing instruction b7:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Replacing jump to rts with rts in jmp b1
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing unreachable instruction jmp b4
|
||||
Removing unreachable instruction jmp b4
|
||||
Removing unreachable instruction jmp b5
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
Fixing long branch [110] bne b1 to beq
|
||||
Fixing long branch [831] bne b1 to beq
|
||||
Removing instruction b1:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Fixing long branch [109] bne b1 to beq
|
||||
Fixing long branch [828] bne b1 to beq
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
@ -10685,7 +10696,7 @@ reg byte a [ mulf_init::$12 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 436908
|
||||
Score: 439920
|
||||
|
||||
//SEG0 File Comments
|
||||
// Test the fast multiplication library
|
||||
@ -10883,7 +10894,6 @@ mul16s_compare: {
|
||||
//SEG93 [71] phi from mul16s_compare::@7 to mul16s_error [phi:mul16s_compare::@7->mul16s_error]
|
||||
jsr mul16s_error
|
||||
//SEG94 mul16s_compare::@return
|
||||
breturn:
|
||||
//SEG95 [47] return
|
||||
rts
|
||||
//SEG96 mul16s_compare::@5
|
||||
@ -10931,7 +10941,7 @@ mul16s_compare: {
|
||||
//SEG118 [59] phi (byte*) print_char_cursor#129 = (byte*) print_char_cursor#128 [phi:mul16s_compare::@14->print_ln#0] -- register_copy
|
||||
//SEG119 [59] phi (byte*) print_line_cursor#43 = (byte*) print_line_cursor#1 [phi:mul16s_compare::@14->print_ln#1] -- register_copy
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG120 [58] phi from mul16s_compare::@3 to mul16s_compare::@15 [phi:mul16s_compare::@3->mul16s_compare::@15]
|
||||
//SEG121 mul16s_compare::@15
|
||||
//SEG122 [38] phi from mul16s_compare::@15 to mul16s_compare::@4 [phi:mul16s_compare::@15->mul16s_compare::@4]
|
||||
@ -11772,7 +11782,7 @@ muls16s: {
|
||||
bne b3
|
||||
//SEG400 [193] phi from muls16s::@3 muls16s::@4 to muls16s::@1 [phi:muls16s::@3/muls16s::@4->muls16s::@1]
|
||||
//SEG401 [193] phi (signed dword) muls16s::return#0 = (signed dword) muls16s::m#1 [phi:muls16s::@3/muls16s::@4->muls16s::@1#0] -- register_copy
|
||||
jmp b1
|
||||
rts
|
||||
//SEG402 [193] phi from muls16s::@2 to muls16s::@1 [phi:muls16s::@2->muls16s::@1]
|
||||
b5:
|
||||
//SEG403 [193] phi (signed dword) muls16s::return#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:muls16s::@2->muls16s::@1#0] -- vdsz1=vbsc1
|
||||
@ -11782,7 +11792,6 @@ muls16s: {
|
||||
sta return+2
|
||||
sta return+3
|
||||
//SEG404 muls16s::@1
|
||||
b1:
|
||||
//SEG405 muls16s::@return
|
||||
//SEG406 [194] return
|
||||
rts
|
||||
@ -11835,7 +11844,7 @@ muls16s: {
|
||||
lda i
|
||||
cmp a
|
||||
bne b4
|
||||
jmp b1
|
||||
rts
|
||||
}
|
||||
//SEG417 mul16u_compare
|
||||
// Perform many possible word multiplications (slow and fast) and compare the results
|
||||
@ -12000,7 +12009,6 @@ mul16u_compare: {
|
||||
//SEG489 [245] phi from mul16u_compare::@7 to mul16u_error [phi:mul16u_compare::@7->mul16u_error]
|
||||
jsr mul16u_error
|
||||
//SEG490 mul16u_compare::@return
|
||||
breturn:
|
||||
//SEG491 [233] return
|
||||
rts
|
||||
//SEG492 mul16u_compare::@5
|
||||
@ -12052,7 +12060,7 @@ mul16u_compare: {
|
||||
//SEG514 [59] phi (byte*) print_char_cursor#129 = (byte*) print_char_cursor#128 [phi:mul16u_compare::@14->print_ln#0] -- register_copy
|
||||
//SEG515 [59] phi (byte*) print_line_cursor#43 = (byte*) print_line_cursor#1 [phi:mul16u_compare::@14->print_ln#1] -- register_copy
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG516 [244] phi from mul16u_compare::@3 to mul16u_compare::@15 [phi:mul16u_compare::@3->mul16u_compare::@15]
|
||||
//SEG517 mul16u_compare::@15
|
||||
//SEG518 [224] phi from mul16u_compare::@15 to mul16u_compare::@4 [phi:mul16u_compare::@15->mul16u_compare::@4]
|
||||
@ -12250,7 +12258,7 @@ muls16u: {
|
||||
bne b2
|
||||
//SEG599 [273] phi from muls16u::@2 to muls16u::@1 [phi:muls16u::@2->muls16u::@1]
|
||||
//SEG600 [273] phi (dword) muls16u::return#0 = (dword) muls16u::m#1 [phi:muls16u::@2->muls16u::@1#0] -- register_copy
|
||||
jmp b1
|
||||
rts
|
||||
//SEG601 [273] phi from muls16u to muls16u::@1 [phi:muls16u->muls16u::@1]
|
||||
b3:
|
||||
//SEG602 [273] phi (dword) muls16u::return#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:muls16u->muls16u::@1#0] -- vduz1=vbuc1
|
||||
@ -12260,7 +12268,6 @@ muls16u: {
|
||||
sta return+2
|
||||
sta return+3
|
||||
//SEG603 muls16u::@1
|
||||
b1:
|
||||
//SEG604 muls16u::@return
|
||||
//SEG605 [274] return
|
||||
rts
|
||||
|
@ -63,7 +63,6 @@ mul8s_compare: {
|
||||
sta BGCOL
|
||||
ldx a
|
||||
jsr mul8s_error
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
inc b
|
||||
@ -83,7 +82,7 @@ mul8s_compare: {
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
str: .text "signed multiply results match!@"
|
||||
}
|
||||
// Print a newline
|
||||
@ -434,12 +433,11 @@ muls8s: {
|
||||
iny
|
||||
cpy a
|
||||
bne b3
|
||||
jmp b1
|
||||
rts
|
||||
b5:
|
||||
lda #0
|
||||
sta return
|
||||
sta return+1
|
||||
b1:
|
||||
rts
|
||||
b6:
|
||||
lda #0
|
||||
@ -464,7 +462,7 @@ muls8s: {
|
||||
dey
|
||||
cpy a
|
||||
bne b4
|
||||
jmp b1
|
||||
rts
|
||||
}
|
||||
// Perform all possible byte multiplications (slow and fast) and compare the results
|
||||
mul8u_compare: {
|
||||
@ -514,7 +512,6 @@ mul8u_compare: {
|
||||
sta BGCOL
|
||||
ldx a
|
||||
jsr mul8u_error
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
inc b
|
||||
@ -531,7 +528,7 @@ mul8u_compare: {
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
str: .text "multiply results match!@"
|
||||
}
|
||||
// mul8u_error(byte register(X) a, byte zeropage(3) b, word zeropage(8) ms, word zeropage($c) mn, word zeropage($e) mf)
|
||||
@ -616,12 +613,11 @@ muls8u: {
|
||||
iny
|
||||
cpy a
|
||||
bne b2
|
||||
jmp b1
|
||||
rts
|
||||
b3:
|
||||
lda #0
|
||||
sta return
|
||||
sta return+1
|
||||
b1:
|
||||
rts
|
||||
}
|
||||
// Compare the ASM-based mul tables with the KC-based mul tables
|
||||
@ -668,7 +664,6 @@ mulf_tables_cmp: {
|
||||
sta print_line_cursor
|
||||
lda #>$400
|
||||
sta print_line_cursor+1
|
||||
breturn:
|
||||
rts
|
||||
b2:
|
||||
inc asm_sqr
|
||||
@ -705,7 +700,7 @@ mulf_tables_cmp: {
|
||||
sta print_char_cursor
|
||||
lda print_line_cursor+1
|
||||
sta print_char_cursor+1
|
||||
jmp breturn
|
||||
rts
|
||||
str: .text "multiply table mismatch at @"
|
||||
str1: .text " / @"
|
||||
str2: .text "multiply tables match!@"
|
||||
|
@ -10123,8 +10123,13 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b4 in beq b14
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp b1
|
||||
Skipping double jump to b1 in jmp b1_from_b4
|
||||
Skipping double jump to b4 in beq b14
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Replacing jump to rts with rts in jmp b1
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Skipping double jump to b5 in bne b7
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b3_from_b12 to b6
|
||||
@ -10151,15 +10156,23 @@ Removing instruction lda #0
|
||||
Removing instruction lda a
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b14:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b14:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b7:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Replacing jump to rts with rts in jmp b1
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing unreachable instruction jmp b4
|
||||
Removing unreachable instruction jmp b4
|
||||
Removing unreachable instruction jmp b5
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
Removing instruction b1:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
@ -10672,7 +10685,7 @@ reg byte a [ mulf_init::$12 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 224367
|
||||
Score: 227382
|
||||
|
||||
//SEG0 File Comments
|
||||
// Test the fast multiplication library
|
||||
@ -10825,7 +10838,6 @@ mul8s_compare: {
|
||||
//SEG84 [47] call mul8s_error
|
||||
jsr mul8s_error
|
||||
//SEG85 mul8s_compare::@return
|
||||
breturn:
|
||||
//SEG86 [48] return
|
||||
rts
|
||||
//SEG87 mul8s_compare::@5
|
||||
@ -10864,7 +10876,7 @@ mul8s_compare: {
|
||||
//SEG103 [58] phi (byte*) print_char_cursor#133 = (byte*) print_char_cursor#132 [phi:mul8s_compare::@13->print_ln#0] -- register_copy
|
||||
//SEG104 [58] phi (byte*) print_line_cursor#45 = (byte*) print_line_cursor#1 [phi:mul8s_compare::@13->print_ln#1] -- register_copy
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG105 [57] phi from mul8s_compare::@3 to mul8s_compare::@14 [phi:mul8s_compare::@3->mul8s_compare::@14]
|
||||
//SEG106 mul8s_compare::@14
|
||||
//SEG107 [39] phi from mul8s_compare::@14 to mul8s_compare::@4 [phi:mul8s_compare::@14->mul8s_compare::@4]
|
||||
@ -11503,7 +11515,7 @@ muls8s: {
|
||||
bne b3
|
||||
//SEG391 [196] phi from muls8s::@3 muls8s::@4 to muls8s::@1 [phi:muls8s::@3/muls8s::@4->muls8s::@1]
|
||||
//SEG392 [196] phi (signed word) muls8s::return#0 = (signed word) muls8s::m#1 [phi:muls8s::@3/muls8s::@4->muls8s::@1#0] -- register_copy
|
||||
jmp b1
|
||||
rts
|
||||
//SEG393 [196] phi from muls8s::@2 to muls8s::@1 [phi:muls8s::@2->muls8s::@1]
|
||||
b5:
|
||||
//SEG394 [196] phi (signed word) muls8s::return#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:muls8s::@2->muls8s::@1#0] -- vwsz1=vbuc1
|
||||
@ -11511,7 +11523,6 @@ muls8s: {
|
||||
sta return
|
||||
sta return+1
|
||||
//SEG395 muls8s::@1
|
||||
b1:
|
||||
//SEG396 muls8s::@return
|
||||
//SEG397 [197] return
|
||||
rts
|
||||
@ -11548,7 +11559,7 @@ muls8s: {
|
||||
//SEG407 [201] if((signed byte) muls8s::i#1!=(signed byte) muls8s::a#0) goto muls8s::@4 -- vbsyy_neq_vbsz1_then_la1
|
||||
cpy a
|
||||
bne b4
|
||||
jmp b1
|
||||
rts
|
||||
}
|
||||
//SEG408 mul8u_compare
|
||||
// Perform all possible byte multiplications (slow and fast) and compare the results
|
||||
@ -11653,7 +11664,6 @@ mul8u_compare: {
|
||||
//SEG461 [243] phi from mul8u_compare::@7 to mul8u_error [phi:mul8u_compare::@7->mul8u_error]
|
||||
jsr mul8u_error
|
||||
//SEG462 mul8u_compare::@return
|
||||
breturn:
|
||||
//SEG463 [233] return
|
||||
rts
|
||||
//SEG464 mul8u_compare::@5
|
||||
@ -11689,7 +11699,7 @@ mul8u_compare: {
|
||||
//SEG480 [58] phi (byte*) print_char_cursor#133 = (byte*) print_char_cursor#132 [phi:mul8u_compare::@13->print_ln#0] -- register_copy
|
||||
//SEG481 [58] phi (byte*) print_line_cursor#45 = (byte*) print_line_cursor#10 [phi:mul8u_compare::@13->print_ln#1] -- register_copy
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG482 [242] phi from mul8u_compare::@3 to mul8u_compare::@14 [phi:mul8u_compare::@3->mul8u_compare::@14]
|
||||
//SEG483 mul8u_compare::@14
|
||||
//SEG484 [224] phi from mul8u_compare::@14 to mul8u_compare::@4 [phi:mul8u_compare::@14->mul8u_compare::@4]
|
||||
@ -11874,7 +11884,7 @@ muls8u: {
|
||||
bne b2
|
||||
//SEG580 [278] phi from muls8u::@2 to muls8u::@1 [phi:muls8u::@2->muls8u::@1]
|
||||
//SEG581 [278] phi (word) muls8u::return#0 = (word) muls8u::m#1 [phi:muls8u::@2->muls8u::@1#0] -- register_copy
|
||||
jmp b1
|
||||
rts
|
||||
//SEG582 [278] phi from muls8u to muls8u::@1 [phi:muls8u->muls8u::@1]
|
||||
b3:
|
||||
//SEG583 [278] phi (word) muls8u::return#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:muls8u->muls8u::@1#0] -- vwuz1=vbuc1
|
||||
@ -11882,7 +11892,6 @@ muls8u: {
|
||||
sta return
|
||||
sta return+1
|
||||
//SEG584 muls8u::@1
|
||||
b1:
|
||||
//SEG585 muls8u::@return
|
||||
//SEG586 [279] return
|
||||
rts
|
||||
@ -11968,7 +11977,6 @@ mulf_tables_cmp: {
|
||||
sta print_line_cursor+1
|
||||
//SEG622 [291] phi (byte*) print_char_cursor#31 = (byte*) print_char_cursor#18 [phi:mulf_tables_cmp::@7->mulf_tables_cmp::@return#1] -- register_copy
|
||||
//SEG623 mulf_tables_cmp::@return
|
||||
breturn:
|
||||
//SEG624 [292] return
|
||||
rts
|
||||
//SEG625 mulf_tables_cmp::@2
|
||||
@ -12026,7 +12034,7 @@ mulf_tables_cmp: {
|
||||
//SEG642 [291] phi from mulf_tables_cmp::@8 to mulf_tables_cmp::@return [phi:mulf_tables_cmp::@8->mulf_tables_cmp::@return]
|
||||
//SEG643 [291] phi (byte*) print_line_cursor#10 = (byte*) print_line_cursor#1 [phi:mulf_tables_cmp::@8->mulf_tables_cmp::@return#0] -- register_copy
|
||||
//SEG644 [291] phi (byte*) print_char_cursor#31 = (byte*~) print_char_cursor#225 [phi:mulf_tables_cmp::@8->mulf_tables_cmp::@return#1] -- register_copy
|
||||
jmp breturn
|
||||
rts
|
||||
str: .text "multiply table mismatch at @"
|
||||
str1: .text " / @"
|
||||
str2: .text "multiply tables match!@"
|
||||
|
@ -17,11 +17,10 @@ main: {
|
||||
beq b1
|
||||
lda #2
|
||||
sta bgcol
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
lda #5
|
||||
sta bgcol
|
||||
jmp breturn
|
||||
rts
|
||||
bs: .byte 'c', 'm'
|
||||
}
|
||||
|
@ -298,7 +298,10 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -326,7 +329,7 @@ FINAL SYMBOL TABLE
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 37
|
||||
Score: 40
|
||||
|
||||
//SEG0 File Comments
|
||||
//SEG1 Basic Upstart
|
||||
@ -362,7 +365,6 @@ main: {
|
||||
lda #2
|
||||
sta bgcol
|
||||
//SEG14 main::@return
|
||||
breturn:
|
||||
//SEG15 [7] return
|
||||
rts
|
||||
//SEG16 main::@1
|
||||
@ -370,7 +372,7 @@ main: {
|
||||
//SEG17 [8] *((const byte*) main::bgcol#0) ← (byte/signed byte/word/signed word/dword/signed dword) 5 -- _deref_pbuc1=vbuc2
|
||||
lda #5
|
||||
sta bgcol
|
||||
jmp breturn
|
||||
rts
|
||||
bs: .byte 'c', 'm'
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,6 @@ findcol: {
|
||||
bne b2
|
||||
lda #0
|
||||
sta return
|
||||
breturn:
|
||||
rts
|
||||
b2:
|
||||
txa
|
||||
@ -163,7 +162,7 @@ findcol: {
|
||||
iny
|
||||
cpy #numpoints
|
||||
bcc b12
|
||||
jmp breturn
|
||||
rts
|
||||
b12:
|
||||
stx mindiff
|
||||
jmp b1
|
||||
|
@ -2280,6 +2280,8 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Replacing jump to rts with rts in jmp breturn
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
@ -2289,6 +2291,7 @@ Removing instruction lda #$28
|
||||
Removing instruction lda y
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
@ -2426,7 +2429,7 @@ reg byte a [ findcol::$10 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 1504588
|
||||
Score: 1504591
|
||||
|
||||
//SEG0 File Comments
|
||||
// The screen
|
||||
@ -2662,7 +2665,6 @@ findcol: {
|
||||
lda #0
|
||||
sta return
|
||||
//SEG100 findcol::@return
|
||||
breturn:
|
||||
//SEG101 [58] return
|
||||
rts
|
||||
//SEG102 findcol::@2
|
||||
@ -2720,7 +2722,7 @@ findcol: {
|
||||
bcc b12
|
||||
//SEG125 [57] phi from findcol::@7 to findcol::@return [phi:findcol::@7->findcol::@return]
|
||||
//SEG126 [57] phi (byte) findcol::return#2 = (byte) findcol::mincol#2 [phi:findcol::@7->findcol::@return#0] -- register_copy
|
||||
jmp breturn
|
||||
rts
|
||||
//SEG127 findcol::@12
|
||||
b12:
|
||||
//SEG128 [71] (byte~) findcol::mindiff#13 ← (byte) findcol::mindiff#11 -- vbuz1=vbuxx
|
||||
|
Loading…
x
Reference in New Issue
Block a user