1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-26 18:29:54 +00:00

Moved operator type inference to Operator class. Improved type inference.

This commit is contained in:
jespergravgaard 2018-03-11 18:44:47 +01:00
parent cfa3ab9047
commit 979cb91eeb
137 changed files with 3430 additions and 2973 deletions

View File

@ -182,6 +182,7 @@ public class Compiler {
optimizations.add(new Pass2ConstantIdentification(program));
optimizations.add(new Pass2ConstantAdditionElimination(program));
optimizations.add(new Pass2FixInlineConstructors(program));
optimizations.add(new Pass2TypeInference(program));
optimizations.add(new PassNEliminateUnusedVars(program));
optimizations.add(new Pass2NopCastElimination(program));
pass2OptimizeSSA(optimizations);

View File

@ -1,6 +1,9 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.ConstantNotLiteral;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantLiteral;
/** Unary Address-of Operator (&p) */
@ -12,7 +15,11 @@ public class OperatorAddressOf extends OperatorUnary {
@Override
public ConstantLiteral calculateLiteral(ConstantLiteral operand) {
throw new CompileError("Not implemented");
throw new ConstantNotLiteral("Constant not literal");
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return new SymbolTypePointer(operandType);
}
}

View File

@ -1,5 +1,7 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantLiteral;
/** A binary expression operator */
@ -9,6 +11,20 @@ public abstract class OperatorBinary extends Operator {
super(operator, asmOperator, Type.BINARY, precedence);
}
/**
* Calculate the literal value of the operator applied to constant operands
* @param left The left constant operand
* @param right The right constant operand
* @return The literal value
*/
public abstract ConstantLiteral calculateLiteral(ConstantLiteral left, ConstantLiteral right);
/**
* Infer the type of the operator applied to operands of a specific type
* @param left The type of the left operand
* @param right The type of the right operand
* @return The type resulting from applying the operator to the operands
*/
public abstract SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right);
}

View File

@ -1,7 +1,10 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInteger;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -17,7 +20,30 @@ public class OperatorBoolAnd extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger(((ConstantInteger) left).getInteger() & ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple type1, SymbolTypeSimple type2) {
// Handle pointers as words
if(type1 instanceof SymbolTypePointer) {
type1 = SymbolType.WORD;
}
if(type2 instanceof SymbolTypePointer) {
type2 = SymbolType.WORD;
}
// Find smallest bitwise type
if(type1 instanceof SymbolTypeInteger && type2 instanceof SymbolTypeInteger) {
for(SymbolTypeInteger candidate : SymbolType.getIntegerTypes()) {
boolean match1 = ((SymbolTypeInteger) type1).getBits() <= candidate.getBits();
boolean match2 = ((SymbolTypeInteger) type2).getBits() <= candidate.getBits();
if(!candidate.isSigned() && (match1 || match2)) {
return candidate;
}
}
}
throw new CompileError("Type inference case not handled " + type1 + " " + getOperator() + " " + type2);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,6 +18,12 @@ public class OperatorBoolNot extends OperatorUnary {
if(left instanceof ConstantInteger) {
return new ConstantInteger(~((ConstantInteger) left).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + left );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return operandType;
}
}

View File

@ -1,6 +1,10 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInteger;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,6 +20,23 @@ public class OperatorBoolOr extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger(((ConstantInteger) left).getInteger() | ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple type1, SymbolTypeSimple type2) {
// Handle pointers as words
if(type1 instanceof SymbolTypePointer) {
type1 = SymbolType.WORD;
}
if(type2 instanceof SymbolTypePointer) {
type2 = SymbolType.WORD;
}
// Handle numeric types through proper promotion
if(SymbolType.isInteger(type1) && SymbolType.isInteger(type2)) {
return SymbolType.promotedBitwiseType((SymbolTypeInteger) type1, (SymbolTypeInteger) type2);
}
throw new CompileError("Type inference case not handled " + type1 + " " + getOperator() + " " + type2);
}
}

View File

@ -1,6 +1,10 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInteger;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +20,24 @@ public class OperatorBoolXor extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger(((ConstantInteger) left).getInteger() ^ ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple type1, SymbolTypeSimple type2) {
// Handle pointers as words
if(type1 instanceof SymbolTypePointer) {
type1 = SymbolType.WORD;
}
if(type2 instanceof SymbolTypePointer) {
type2 = SymbolType.WORD;
}
// Handle numeric types through proper promotion
if(SymbolType.isInteger(type1) && SymbolType.isInteger(type2)) {
return SymbolType.promotedBitwiseType((SymbolTypeInteger) type1, (SymbolTypeInteger) type2);
}
throw new CompileError("Type inference case not handled " + type1 + " " + getOperator() + " " + type2);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
import dk.camelot64.kickc.model.values.ConstantPointer;
@ -17,9 +19,13 @@ public class OperatorCastByte extends OperatorUnary {
if(value instanceof ConstantInteger) {
return new ConstantInteger(0xff & ((ConstantInteger) value).getValue());
} else if(value instanceof ConstantPointer) {
return new ConstantInteger(((ConstantPointer) value).getLocation()&0xff);
return new ConstantInteger(0xff & ((ConstantPointer) value).getLocation());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return SymbolType.BYTE;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,8 +18,12 @@ public class OperatorCastDWord extends OperatorUnary {
if(value instanceof ConstantInteger) {
return new ConstantInteger(0xffffffffL & ((ConstantInteger) value).getValue());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return SymbolType.DWORD;
}
}

View File

@ -2,6 +2,8 @@ package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
import dk.camelot64.kickc.model.values.ConstantPointer;
@ -18,7 +20,11 @@ public class OperatorCastPtrByte extends OperatorUnary {
if(value instanceof ConstantInteger) {
return new ConstantPointer(((ConstantInteger) value).getInteger(), SymbolType.BYTE);
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return new SymbolTypePointer(SymbolType.BYTE);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,11 @@ public class OperatorCastSByte extends OperatorUnary {
if(value instanceof ConstantInteger) {
return new ConstantInteger(0xff & ((ConstantInteger) value).getValue());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return SymbolType.SBYTE;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,11 @@ public class OperatorCastSDWord extends OperatorUnary {
if(value instanceof ConstantInteger) {
return new ConstantInteger(0xffffffffL & ((ConstantInteger) value).getValue());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return SymbolType.SDWORD;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,11 @@ public class OperatorCastSWord extends OperatorUnary {
if(value instanceof ConstantInteger) {
return new ConstantInteger(0xffff & ((ConstantInteger) value).getValue());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return SymbolType.SWORD;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
import dk.camelot64.kickc.model.values.ConstantPointer;
@ -18,9 +20,13 @@ public class OperatorCastWord extends OperatorUnary {
return new ConstantInteger(0xffff & ((ConstantInteger) value).getValue());
}
if(value instanceof ConstantPointer) {
return new ConstantInteger( (long) (0xffff & ((ConstantPointer) value).getLocation()));
return new ConstantInteger(0xffff & ((ConstantPointer) value).getLocation());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + value );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return SymbolType.WORD;
}
}

View File

@ -1,6 +1,10 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.NoMatchingType;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +20,27 @@ public class OperatorDWord extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger(0x10000 * ((ConstantInteger) left).getInteger() + ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
// Handle pointers as words
if(left instanceof SymbolTypePointer) {
left = SymbolType.WORD;
}
if(right instanceof SymbolTypePointer) {
right = SymbolType.WORD;
}
if(SymbolType.isByte(left)) {
left = SymbolType.WORD;
}
if(SymbolType.isByte(right)) {
right = SymbolType.WORD;
}
if(SymbolType.isWord(left) && SymbolType.isWord(right)) {
return SymbolType.DWORD;
}
throw new NoMatchingType("DWord constructor cannot use " + left + " " + getOperator() + " " + right);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,11 @@ public class OperatorDecrement extends OperatorUnary {
if(operand instanceof ConstantInteger ) {
return new ConstantInteger(((ConstantInteger) operand).getInteger() -1);
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + operand );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return operandType;
}
}

View File

@ -1,6 +1,9 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantLiteral;
/** Unary Pointer Dereference Operator (*p) */
@ -12,7 +15,15 @@ public class OperatorDeref extends OperatorUnary {
@Override
public ConstantLiteral calculateLiteral(ConstantLiteral operand) {
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + operand );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
if(operandType instanceof SymbolTypePointer) {
return ((SymbolTypePointer) operandType).getElementType();
}
throw new CompileError("Type error: Dereferencing a non-pointer " + operandType);
}
}

View File

@ -1,6 +1,9 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantLiteral;
/** Binary Pointer Dereference with an index Operator ( p[i] / *(p+i) ) */
@ -12,6 +15,14 @@ public class OperatorDerefIdx extends OperatorBinary {
@Override
public ConstantLiteral calculateLiteral(ConstantLiteral left, ConstantLiteral right) {
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
if(left instanceof SymbolTypePointer) {
return ((SymbolTypePointer) left).getElementType();
}
throw new RuntimeException("Type error: Dereferencing a non-pointer " + left + "[" + right + "]");
}
}

View File

@ -1,6 +1,7 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.*;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
import dk.camelot64.kickc.model.values.ConstantPointer;
@ -22,6 +23,25 @@ public class OperatorDivide extends OperatorBinary {
((ConstantPointer) left).getElementType()
);
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
if(left instanceof SymbolTypePointer) {
if(SymbolType.isByte(right) || SymbolType.isWord(right)) {
return left;
} else {
throw new NoMatchingType("Cannot divide pointer by "+right.toString());
}
}
// Handle numeric types through proper promotion
if(SymbolType.isInteger(left) && SymbolType.isInteger(right)) {
return SymbolType.promotedMathType((SymbolTypeInteger) left, (SymbolTypeInteger) right);
}
throw new RuntimeException("Type inference case not handled " + left + " " + getOperator() + " " + right);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -19,7 +21,12 @@ public class OperatorEqual extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantBool(Objects.equals(((ConstantInteger) left).getInteger(), ((ConstantInteger) right).getInteger()));
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -2,6 +2,8 @@ package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
import dk.camelot64.kickc.model.values.ConstantPointer;
@ -17,14 +19,25 @@ public class OperatorGetHigh extends OperatorUnary {
public ConstantLiteral calculateLiteral(ConstantLiteral operand) {
if(operand instanceof ConstantInteger) {
ConstantInteger operandInt = (ConstantInteger) operand;
if(SymbolType.isWord(operandInt.getType())) {
if(SymbolType.isWord(operandInt.getType()) || SymbolType.isSWord(operandInt.getType())) {
return new ConstantInteger(operandInt.getInteger()>>8);
} else if(SymbolType.isDWord(operandInt.getType())) {
} else if(SymbolType.isDWord(operandInt.getType()) || SymbolType.isSDWord(operandInt.getType())) {
return new ConstantInteger(operandInt.getInteger()>>16);
}
} else if(operand instanceof ConstantPointer) {
return new ConstantInteger(((ConstantPointer) operand).getLocation()>>8);
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + operand );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
if(operandType instanceof SymbolTypePointer || SymbolType.isWord(operandType) || SymbolType.isSWord(operandType)) {
return SymbolType.BYTE;
} else if(SymbolType.isDWord(operandType) || SymbolType.isSDWord(operandType)) {
return SymbolType.WORD;
}
throw new CompileError("Type inference not implemented "+getOperator()+" "+operandType);
}
}

View File

@ -2,6 +2,8 @@ package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
import dk.camelot64.kickc.model.values.ConstantPointer;
@ -17,15 +19,26 @@ public class OperatorGetLow extends OperatorUnary {
public ConstantLiteral calculateLiteral(ConstantLiteral operand) {
if(operand instanceof ConstantInteger) {
ConstantInteger operandInt = (ConstantInteger) operand;
if(SymbolType.isWord(operandInt.getType())) {
if(SymbolType.isWord(operandInt.getType()) || SymbolType.isSWord(operandInt.getType())) {
return new ConstantInteger(operandInt.getInteger()&0xff);
} else if(SymbolType.isDWord(operandInt.getType())) {
} else if(SymbolType.isDWord(operandInt.getType()) || SymbolType.isSDWord(operandInt.getType())) {
return new ConstantInteger(operandInt.getInteger()&0xffff);
}
} else if(operand instanceof ConstantPointer) {
return new ConstantInteger(((ConstantPointer) operand).getLocation()&0xff);
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + operand );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
if(operandType instanceof SymbolTypePointer || SymbolType.isWord(operandType) || SymbolType.isSWord(operandType)) {
return SymbolType.BYTE;
} else if(SymbolType.isDWord(operandType) || SymbolType.isSDWord(operandType)) {
return SymbolType.WORD;
}
throw new CompileError("Type inference not implemented "+getOperator()+" "+operandType);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -17,7 +19,13 @@ public class OperatorGreaterThan extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantBool(((ConstantInteger) left).getInteger() > ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -17,7 +19,13 @@ public class OperatorGreaterThanEqual extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantBool(((ConstantInteger) left).getInteger() >= ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,11 @@ public class OperatorIncrement extends OperatorUnary {
if(operand instanceof ConstantInteger ) {
return new ConstantInteger(((ConstantInteger) operand).getInteger() + 1);
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + operand );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return operandType;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -17,7 +19,13 @@ public class OperatorLessThan extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantBool(((ConstantInteger) left).getInteger() < ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -17,7 +19,13 @@ public class OperatorLessThanEqual extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantBool(((ConstantInteger) left).getInteger() <= ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,13 @@ public class OperatorLogicAnd extends OperatorBinary {
if(left instanceof ConstantBool && right instanceof ConstantBool) {
return new ConstantBool(((ConstantBool) left).getBool() && ((ConstantBool) right).getBool());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,8 +18,12 @@ public class OperatorLogicNot extends OperatorUnary {
if(left instanceof ConstantBool) {
return new ConstantBool(!((ConstantBool) left).getBool() );
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + left );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,13 @@ public class OperatorLogicOr extends OperatorBinary {
if(left instanceof ConstantBool && right instanceof ConstantBool) {
return new ConstantBool(((ConstantBool) left).getBool() || ((ConstantBool) right).getBool());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,6 +1,10 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInteger;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -14,9 +18,26 @@ public class OperatorMinus extends OperatorBinary {
@Override
public ConstantLiteral calculateLiteral(ConstantLiteral left, ConstantLiteral right) {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger(((ConstantInteger) left).getInteger() - ((ConstantInteger) right).getInteger());
long val = ((ConstantInteger) left).getInteger() - ((ConstantInteger) right).getInteger();
return new ConstantInteger(val);
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple type1, SymbolTypeSimple type2) {
// Handle pointer types
if(type1 instanceof SymbolTypePointer && SymbolType.isInteger(type2)) {
return new SymbolTypePointer(((SymbolTypePointer) type1).getElementType());
} else if(type1 instanceof SymbolTypePointer && type2 instanceof SymbolTypePointer) {
return SymbolType.WORD;
}
// Handle numeric types through proper promotion
if(SymbolType.isInteger(type1) && SymbolType.isInteger(type2)) {
return SymbolType.promotedMathType((SymbolTypeInteger) type1, (SymbolTypeInteger) type2);
}
throw new RuntimeException("Type inference case not handled " + type1 + " " + getOperator() + " " + type2);
}
}

View File

@ -1,6 +1,9 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInteger;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +19,15 @@ public class OperatorMultiply extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger(((ConstantInteger) left).getInteger() * ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
// Handle numeric types through proper promotion
if(SymbolType.isInteger(left) && SymbolType.isInteger(right)) {
return SymbolType.promotedMathType((SymbolTypeInteger) left, (SymbolTypeInteger) right);
}
throw new RuntimeException("Type inference case not handled " + left + " " + getOperator() + " " + right);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,6 +18,11 @@ public class OperatorNeg extends OperatorUnary {
if(operand instanceof ConstantInteger) {
return new ConstantInteger(-((ConstantInteger)operand).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + operand );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return operandType;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -19,7 +21,13 @@ public class OperatorNotEqual extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantBool(!Objects.equals(((ConstantInteger) left).getInteger(), ((ConstantInteger) right).getInteger()));
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return SymbolType.BOOLEAN;
}
}

View File

@ -1,7 +1,7 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.*;
import dk.camelot64.kickc.model.values.*;
/** Binary plus Operator ( x + y ) */
@ -23,15 +23,66 @@ public class OperatorPlus extends OperatorBinary {
return new ConstantString(((ConstantString) left).getString() + ((ConstantString) right).getString());
} else if(left instanceof ConstantString && right instanceof ConstantChar) {
return new ConstantString(((ConstantString) left).getString() + ((ConstantChar) right).getChar());
} else if(left instanceof ConstantString && right instanceof ConstantInteger && SymbolType.isByte(((ConstantInteger)right).getType())) {
} else if(left instanceof ConstantString && right instanceof ConstantInteger && SymbolType.isByte(((ConstantInteger) right).getType())) {
Character character = (char) ((ConstantInteger) right).getInteger().byteValue();
return new ConstantString(((ConstantString) left).getString() + character);
} else if(left instanceof ConstantPointer && right instanceof ConstantInteger) {
long location = ((ConstantPointer) left).getLocation() + ((ConstantInteger) right).getInteger();
return new ConstantPointer(location, ((ConstantPointer) left).getElementType());
}
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
throw new CompileError("Not implemented");
@Override
public SymbolType inferType(SymbolTypeSimple type1, SymbolTypeSimple type2) {
// Handle all non-numeric types
if(type1.equals(SymbolType.STRING) && isStringLike(type2)) {
return SymbolType.STRING;
} else if(isStringLike(type1) && type2.equals(SymbolType.STRING)) {
return SymbolType.STRING;
} else if(type1 instanceof SymbolTypeArray && type2 instanceof SymbolTypeArray) {
SymbolType elemType1 = ((SymbolTypeArray) type1).getElementType();
SymbolType elemType2 = ((SymbolTypeArray) type2).getElementType();
if(SymbolTypeInference.typeMatch(elemType1, elemType2)) {
return new SymbolTypeArray(elemType1);
} else if(SymbolTypeInference.typeMatch(elemType2, elemType1)) {
return new SymbolTypeArray(elemType2);
} else {
throw new RuntimeException("Type inference case not handled " + type1 + " " + getOperator() + " " + type2);
}
} else if(SymbolType.isInteger(type1) && type2 instanceof SymbolTypePointer ) {
return new SymbolTypePointer(((SymbolTypePointer) type2).getElementType());
} else if(type1 instanceof SymbolTypePointer && SymbolType.isInteger(type2)) {
return new SymbolTypePointer(((SymbolTypePointer) type1).getElementType());
} else if(type1 instanceof SymbolTypePointer && type2 instanceof SymbolTypePointer) {
throw new NoMatchingType("Two pointers cannot be added.");
}
// Handle numeric types through proper promotion
if(SymbolType.isInteger(type1) && SymbolType.isInteger(type2)) {
return SymbolType.promotedMathType((SymbolTypeInteger) type1, (SymbolTypeInteger) type2);
}
throw new CompileError("Type inference case not handled " + type1 + " " + getOperator() + " " + type2);
}
/**
* Determines if a type is enough like a string to be added to a string to yield a new string.
* This is true for Strings, arrays of bytes and single bytes.
*
* @param type The type to check
* @return true if the type is string like
*/
private boolean isStringLike(SymbolTypeSimple type) {
if(SymbolType.STRING.equals(type)) {
return true;
} else if(SymbolType.isByte(type)) {
return true;
} else if(type instanceof SymbolTypeArray && SymbolType.isByte(((SymbolTypeArray) type).getElementType())) {
return true;
}
return false;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,11 @@ public class OperatorPos extends OperatorUnary {
if(operand instanceof ConstantInteger) {
return new ConstantInteger(+((ConstantInteger)operand).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + getOperator() + " " + operand );
}
@Override
public SymbolType inferType(SymbolTypeSimple operandType) {
return operandType;
}
}

View File

@ -1,6 +1,9 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantLiteral;
/** Binary SetHighByte Operator ( w hi= b ) */
@ -12,6 +15,27 @@ public class OperatorSetHigh extends OperatorBinary {
@Override
public ConstantLiteral calculateLiteral(ConstantLiteral left, ConstantLiteral right) {
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
if(left instanceof SymbolTypePointer) {
return left;
} else if(SymbolType.isByte(left)) {
return SymbolType.WORD;
} else if(SymbolType.isSByte(left)) {
return SymbolType.WORD;
} else if(SymbolType.isWord(left)) {
return SymbolType.WORD;
} else if(SymbolType.isSWord(left)) {
return SymbolType.SWORD;
} else if(SymbolType.isDWord(left)) {
return SymbolType.DWORD;
} else if(SymbolType.isSDWord(left)) {
return SymbolType.SDWORD;
}
throw new RuntimeException("Type inference case not handled " + left + " " + getOperator() + " " + right);
}
}

View File

@ -1,6 +1,9 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantLiteral;
/** Binary SetLowByte Operator ( w lo= b ) */
@ -12,7 +15,25 @@ public class OperatorSetLow extends OperatorBinary {
@Override
public ConstantLiteral calculateLiteral(ConstantLiteral left, ConstantLiteral right) {
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
if(left instanceof SymbolTypePointer) {
return left;
}
if(SymbolType.isWord(left)) {
return SymbolType.WORD;
} else if(SymbolType.isSWord(left)) {
return SymbolType.SWORD;
} else if(SymbolType.isDWord(left)) {
return SymbolType.DWORD;
} else if(SymbolType.isSDWord(left)) {
return SymbolType.SDWORD;
}
throw new RuntimeException("Type inference case not handled " + left + " " + getOperator() + " " + right);
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantBool;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -17,7 +19,12 @@ public class OperatorShiftLeft extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger( ((ConstantInteger) left).getInteger() << ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return left;
}
}

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +18,12 @@ public class OperatorShiftRight extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger( ((ConstantInteger) left).getInteger() >> ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
return left;
}

View File

@ -1,5 +1,7 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantLiteral;
/** A unary expression operator */
@ -9,5 +11,18 @@ public abstract class OperatorUnary extends Operator {
super(operator, asmOperator, Type.UNARY, precedence);
}
/**
* Calculate the literal value of the operator applied to a constant operand
* @param operand The constant operand
* @return The literal value
*/
public abstract ConstantLiteral calculateLiteral(ConstantLiteral operand);
/**
* Infer the type of the operator applied to an operand of a specific type
* @param operandType The type of the operand
* @return The type resulting from applying the operator to the operand
*/
public abstract SymbolType inferType(SymbolTypeSimple operandType);
}

View File

@ -1,6 +1,10 @@
package dk.camelot64.kickc.model.operators;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.types.NoMatchingType;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeSimple;
import dk.camelot64.kickc.model.values.ConstantInteger;
import dk.camelot64.kickc.model.values.ConstantLiteral;
@ -16,7 +20,15 @@ public class OperatorWord extends OperatorBinary {
if(left instanceof ConstantInteger && right instanceof ConstantInteger) {
return new ConstantInteger(0x100 * ((ConstantInteger) left).getInteger() + ((ConstantInteger) right).getInteger());
}
throw new CompileError("Not implemented");
throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right);
}
@Override
public SymbolType inferType(SymbolTypeSimple left, SymbolTypeSimple right) {
if(SymbolType.isByte(left) && SymbolType.isByte(right)) {
return SymbolType.WORD;
}
throw new NoMatchingType("Word constructor cannot use " + left + " " + getOperator() + " " + right);
}
}

View File

@ -0,0 +1,10 @@
package dk.camelot64.kickc.model.types;
import dk.camelot64.kickc.model.CompileError;
/** Signalling that no type can be used to promote the operands of a binary expression to be compatible. */
public class NoMatchingType extends CompileError {
public NoMatchingType(String message) {
super(message);
}
}

View File

@ -1,5 +1,7 @@
package dk.camelot64.kickc.model.types;
import dk.camelot64.kickc.model.CompileError;
import java.util.ArrayList;
import java.util.Collection;
@ -7,29 +9,29 @@ import java.util.Collection;
public interface SymbolType {
/** Unsigned byte (8 bits)). */
SymbolTypeInteger BYTE = new SymbolTypeInteger("byte", 0, 255);
SymbolTypeInteger BYTE = new SymbolTypeInteger("byte", 0, 255, false, 8);
/** Signed byte (8 bits). */
SymbolTypeInteger SBYTE = new SymbolTypeInteger("signed byte", -128, 127);
SymbolTypeInteger SBYTE = new SymbolTypeInteger("signed byte", -128, 127, true, 8);
/** Unsigned word (2 bytes, 16 bits). */
SymbolTypeInteger WORD = new SymbolTypeInteger("word", 0, 65_535);
SymbolTypeInteger WORD = new SymbolTypeInteger("word", 0, 65_535, false, 16);
/** Signed word (2 bytes, 16 bits). */
SymbolTypeInteger SWORD = new SymbolTypeInteger("signed word", -32_768, 32_767);
SymbolTypeInteger SWORD = new SymbolTypeInteger("signed word", -32_768, 32_767, true, 16);
/** Unsigned double word (4 bytes, 32 bits). */
SymbolTypeInteger DWORD = new SymbolTypeInteger("dword", 0, 4_294_967_296L);
SymbolTypeInteger DWORD = new SymbolTypeInteger("dword", 0, 4_294_967_296L, false, 32);
/** Signed double word (4 bytes, 32 bits). */
SymbolTypeInteger SDWORD = new SymbolTypeInteger("signed dword", -2_147_483_648, 2_147_483_647);
SymbolTypeInteger SDWORD = new SymbolTypeInteger("signed dword", -2_147_483_648, 2_147_483_647, true, 32);
/** String value (treated like byte* ). */
SymbolTypeBasic STRING = new SymbolTypeBasic("string");
SymbolTypeNamed STRING = new SymbolTypeNamed("string");
/** Boolean value. */
SymbolTypeBasic BOOLEAN = new SymbolTypeBasic("boolean");
SymbolTypeNamed BOOLEAN = new SymbolTypeNamed("boolean");
/** Numeric floating point value. */
SymbolTypeBasic DOUBLE = new SymbolTypeBasic("double");
SymbolTypeNamed DOUBLE = new SymbolTypeNamed("double");
/** A label. Name of functions of jump-targets. */
SymbolTypeBasic LABEL = new SymbolTypeBasic("label");
SymbolTypeNamed LABEL = new SymbolTypeNamed("label");
/** Void type representing no value. */
SymbolTypeBasic VOID = new SymbolTypeBasic("void");
SymbolTypeNamed VOID = new SymbolTypeNamed("void");
/** An unresolved type. Will be infered later. */
SymbolTypeBasic VAR = new SymbolTypeBasic("var");
SymbolTypeNamed VAR = new SymbolTypeNamed("var");
/**
* Get a simple symbol type from the type name.
@ -61,6 +63,120 @@ public interface SymbolType {
return null;
}
/**
* Get the name of the type
*
* @return The type name
*/
String getTypeName();
/**
* Is the type {@link #BYTE} or compatible {@link SymbolTypeMulti}
*
* @param type The type to examine
* @return true if the type is BYTE compatible
*/
static boolean isByte(SymbolType type) {
if(BYTE.equals(type)) {
return true;
} else if(type instanceof SymbolTypeMulti) {
return ((SymbolTypeMulti) type).isByte();
} else {
return false;
}
}
/**
* Is the type {@link #SBYTE} or compatible {@link SymbolTypeMulti}
*
* @param type The type to examine
* @return true if the type is SBYTE compatible
*/
static boolean isSByte(SymbolType type) {
if(SBYTE.equals(type)) {
return true;
} else if(type instanceof SymbolTypeMulti) {
return ((SymbolTypeMulti) type).isSByte();
} else {
return false;
}
}
/**
* Is the type {@link #WORD} or compatible {@link SymbolTypeMulti}
*
* @param type The type to examine
* @return true if the type is WORD compatible
*/
static boolean isWord(SymbolType type) {
if(WORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeMulti) {
return ((SymbolTypeMulti) type).isWord();
} else {
return false;
}
}
/**
* Is the type {@link #SWORD} or compatible {@link SymbolTypeMulti}
*
* @param type The type to examine
* @return true if the type is SWORD compatible
*/
static boolean isSWord(SymbolType type) {
if(SWORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeMulti) {
return ((SymbolTypeMulti) type).isSWord();
} else {
return false;
}
}
/**
* Is the type {@link #DWORD} or compatible {@link SymbolTypeMulti}
*
* @param type The type to examine
* @return true if the type is DWORD compatible
*/
static boolean isDWord(SymbolType type) {
if(DWORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeMulti) {
return ((SymbolTypeMulti) type).isDWord();
} else {
return false;
}
}
/**
* Is the type {@link #SDWORD} or compatible {@link SymbolTypeMulti}
*
* @param type The type to examine
* @return true if the type is SDWORD compatible
*/
static boolean isSDWord(SymbolType type) {
if(SDWORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeMulti) {
return ((SymbolTypeMulti) type).isSWord();
} else {
return false;
}
}
/**
* Is the type an integer type or compatible {@link SymbolTypeMulti}
*
* @param type The type to examine
* @return true if the type is integer
*/
static boolean isInteger(SymbolType type) {
return isSDWord(type) || isDWord(type) || isSWord(type) || isWord(type) || isSByte(type) || isByte(type);
}
/**
* Get all integer types.
*
@ -78,116 +194,37 @@ public interface SymbolType {
}
/**
* Is the type {@link #BYTE} or compatible {@link SymbolTypeInline}
* Find the smallest integer type that contains both sub-types usable for math ( + - * / ).
*
* @param type The type to examine
* @return true if the type is BYTE compatible
* @param type1 Left type in a binary expression
* @param type2 Right type in a binary expression
* @return
*/
static boolean isByte(SymbolType type) {
if(BYTE.equals(type)) {
return true;
} else if(type instanceof SymbolTypeInline) {
return ((SymbolTypeInline) type).isByte();
} else {
return false;
static SymbolType promotedMathType(SymbolTypeInteger type1, SymbolTypeInteger type2) {
for(SymbolTypeInteger candidate : getIntegerTypes()) {
boolean match1 = type1.getMinValue() >= candidate.getMinValue() && type1.getMaxValue() <= candidate.getMaxValue();
boolean match2 = type2.getMinValue() >= candidate.getMinValue() && type2.getMaxValue() <= candidate.getMaxValue();
if(match1 && match2) {
return candidate;
}
}
throw new NoMatchingType("Cannot promote to a common type for "+type1.toString()+" and "+type2.toString());
}
/**
* Is the type {@link #SBYTE} or compatible {@link SymbolTypeInline}
* Find the unsigned integer type that contains both sub-types usable for binary operations ( & | ^ ).
*
* @param type The type to examine
* @return true if the type is SBYTE compatible
* @param type1 Left type in a binary expression
* @param type2 Right type in a binary expression
* @return
*/
static boolean isSByte(SymbolType type) {
if(SBYTE.equals(type)) {
return true;
} else if(type instanceof SymbolTypeInline) {
return ((SymbolTypeInline) type).isSByte();
} else {
return false;
static SymbolType promotedBitwiseType(SymbolTypeInteger type1, SymbolTypeInteger type2) {
for(SymbolTypeInteger candidate : getIntegerTypes()) {
if(!candidate.isSigned() && type1.getBits()<=candidate.getBits() && type2.getBits()<=candidate.getBits()) {
return candidate;
}
}
throw new CompileError("Cannot promote to a common type for "+type1.toString()+" and "+type2.toString());
}
/**
* Is the type {@link #WORD} or compatible {@link SymbolTypeInline}
*
* @param type The type to examine
* @return true if the type is WORD compatible
*/
static boolean isWord(SymbolType type) {
if(WORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeInline) {
return ((SymbolTypeInline) type).isWord();
} else {
return false;
}
}
/**
* Is the type {@link #SWORD} or compatible {@link SymbolTypeInline}
*
* @param type The type to examine
* @return true if the type is SWORD compatible
*/
static boolean isSWord(SymbolType type) {
if(SWORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeInline) {
return ((SymbolTypeInline) type).isSWord();
} else {
return false;
}
}
/**
* Is the type {@link #DWORD} or compatible {@link SymbolTypeInline}
*
* @param type The type to examine
* @return true if the type is DWORD compatible
*/
static boolean isDWord(SymbolType type) {
if(DWORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeInline) {
return ((SymbolTypeInline) type).isDWord();
} else {
return false;
}
}
/**
* Is the type {@link #SDWORD} or compatible {@link SymbolTypeInline}
*
* @param type The type to examine
* @return true if the type is SDWORD compatible
*/
static boolean isSDWord(SymbolType type) {
if(SDWORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeInline) {
return ((SymbolTypeInline) type).isSWord();
} else {
return false;
}
}
/**
* Is the type an integer type or compatible {@link SymbolTypeInline}
*
* @param type The type to examine
* @return true if the type is integer
*/
static boolean isInteger(SymbolType type) {
return isSDWord(type) || isDWord(type) || isSWord(type) || isWord(type) || isSByte(type) || isByte(type);
}
/**
* Get the name of the type
*
* @return The type name
*/
String getTypeName();
}

View File

@ -31,7 +31,7 @@ public class SymbolTypeArray extends SymbolTypePointer {
@Override
public String getTypeName() {
SymbolType elementType = getElementType();
if(elementType instanceof SymbolTypeInline) {
if(elementType instanceof SymbolTypeMulti) {
return "(" + elementType.getTypeName() + ")" + "[" + (size == null ? "" : size) + "]";
} else {
return elementType.getTypeName() + "[" + (size == null ? "" : size) + "]";

View File

@ -2,10 +2,10 @@ package dk.camelot64.kickc.model.types;
import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.ConstantNotLiteral;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.operators.Operator;
import dk.camelot64.kickc.model.operators.OperatorBinary;
import dk.camelot64.kickc.model.operators.OperatorUnary;
import dk.camelot64.kickc.model.operators.Operators;
import dk.camelot64.kickc.model.statements.StatementAssignment;
import dk.camelot64.kickc.model.statements.StatementCall;
import dk.camelot64.kickc.model.statements.StatementLValue;
@ -21,7 +21,6 @@ import java.util.Collection;
*/
public class SymbolTypeInference {
/**
* Infer the type of a unary operator on a value
*
@ -32,286 +31,103 @@ public class SymbolTypeInference {
*/
public static SymbolType inferType(ProgramScope programScope, OperatorUnary operator, RValue rValue) {
if(rValue instanceof ConstantValue) {
ConstantValue value = null;
// Calculate resulting constant literal
try {
value = operator.calculate(((ConstantValue) rValue).calculateLiteral(programScope));
} catch(ConstantNotLiteral e) {
value = null;
}
if(value != null) {
ConstantValue value = operator.calculateLiteral(((ConstantValue) rValue).calculateLiteral(programScope));
return value.getType(programScope);
} catch(ConstantNotLiteral e) {
// Value literal cannot be calculated
}
}
if(operator.equals(Operators.CAST_BYTE)) {
return SymbolType.BYTE;
} else if(operator.equals(Operators.CAST_SBYTE)) {
return SymbolType.SBYTE;
} else if(operator.equals(Operators.CAST_WORD)) {
return SymbolType.WORD;
} else if(operator.equals(Operators.CAST_SWORD)) {
return SymbolType.SWORD;
} else if(operator.equals(Operators.CAST_DWORD)) {
return SymbolType.DWORD;
} else if(operator.equals(Operators.CAST_SDWORD)) {
return SymbolType.SDWORD;
} else if(operator.equals(Operators.CAST_PTRBY)) {
return new SymbolTypePointer(SymbolType.BYTE);
} else if(operator.equals(Operators.ADDRESS_OF)) {
SymbolType valueType = inferType(programScope, rValue);
return new SymbolTypePointer(valueType);
}
// Infer value type - and then infer operator result type
SymbolType valueType = inferType(programScope, rValue);
return inferType(operator, valueType);
}
public static SymbolType inferType(ProgramScope programScope, RValue rValue1, OperatorBinary operator, RValue rValue2) {
if(rValue1 instanceof ConstantValue && rValue2 instanceof ConstantValue) {
//ConstantValue value = ConstantValueCalculator.calcValue(programScope,(ConstantValue) rValue1,operator,(ConstantValue) rValue2);
ConstantValue value = null;
/**
* Infer the type of a unary operator on an operand type
*
* @param operator The unary operator
* @param operandType The operand type
* @return The type of the result from applying the operator on the operand
*/
public static SymbolType inferType(OperatorUnary operator, SymbolType operandType) {
if(operandType instanceof SymbolTypeSimple) {
return operator.inferType((SymbolTypeSimple) operandType);
} else {
// Infer all resulting types for each sub-type of the multi-type
ArrayList<SymbolType> resultTypes = new ArrayList<>();
for(SymbolType opType : ((SymbolTypeMulti) operandType).getTypes()) {
SymbolType resType = inferType(operator, opType);
if(!resultTypes.contains(resType)) {
resultTypes.add(resType);
}
}
if(resultTypes.size() == 1) {
return resultTypes.get(0);
} else {
return new SymbolTypeMulti(resultTypes);
}
}
}
/**
* Infer the type of a binary operator on a value
*
* @param programScope The program scope usable for accessing the symbol table
* @param left The left value
* @param operator The binary operator
* @param rValue The right value
* @return The type of the resulting value
*/
public static SymbolType inferType(ProgramScope programScope, RValue left, OperatorBinary operator, RValue right) {
if(left instanceof ConstantValue && right instanceof ConstantValue) {
// Calculate resulting constant literal
try {
value = operator.calculate(
((ConstantValue) rValue1).calculateLiteral(programScope),
((ConstantValue) rValue2).calculateLiteral(programScope)
ConstantValue value = operator.calculateLiteral(
((ConstantValue) left).calculateLiteral(programScope),
((ConstantValue) right).calculateLiteral(programScope)
);
} catch(ConstantNotLiteral e) {
value = null;
}
if(value != null) {
return value.getType(programScope);
} catch(ConstantNotLiteral e) {
// Value literal cannot be calculated
}
}
SymbolType valueType1 = inferType(programScope, rValue1);
SymbolType valueType2 = inferType(programScope, rValue2);
return inferType(valueType1, operator, valueType2);
SymbolType leftType = inferType(programScope, left);
SymbolType rightType = inferType(programScope, right);
return inferType(leftType, operator, rightType);
}
public static SymbolType inferType(Operator operator, SymbolType subType) {
if(operator == null) {
return subType;
}
if(Operators.DEREF.equals(operator)) {
if(subType instanceof SymbolTypePointer) {
return ((SymbolTypePointer) subType).getElementType();
} else {
throw new RuntimeException("Type error: Dereferencing a non-pointer " + subType);
}
} else if(Operators.LOWBYTE.equals(operator)) {
if(subType instanceof SymbolTypePointer || SymbolType.isWord(subType) || SymbolType.isSWord(subType)) {
return SymbolType.BYTE;
} else if(SymbolType.isDWord(subType) || SymbolType.isSDWord(subType)) {
return SymbolType.WORD;
}
} else if(Operators.HIBYTE.equals(operator)) {
if(subType instanceof SymbolTypePointer || SymbolType.isWord(subType) || SymbolType.isSWord(subType)) {
return SymbolType.BYTE;
} else if(SymbolType.isDWord(subType) || SymbolType.isSDWord(subType)) {
return SymbolType.WORD;
}
} else if(Operators.CAST_BYTE.equals(operator)) {
return SymbolType.BYTE;
} else if(Operators.CAST_SBYTE.equals(operator)) {
return SymbolType.SBYTE;
} else if(Operators.CAST_WORD.equals(operator)) {
return SymbolType.WORD;
} else if(Operators.CAST_SWORD.equals(operator)) {
return SymbolType.SWORD;
public static SymbolType inferType(SymbolType left, OperatorBinary operator, SymbolType right) {
if(left instanceof SymbolTypeSimple && right instanceof SymbolTypeSimple) {
return operator.inferType((SymbolTypeSimple) left, (SymbolTypeSimple) right);
} else {
return subType;
}
throw new RuntimeException("Type inference problem unary " + operator + " " + subType);
}
public static SymbolType inferType(SymbolType type1, Operator operator, SymbolType type2) {
if(Operators.PLUS.equals(operator)) {
return inferPlus(type1, type2);
} else if(Operators.MINUS.equals(operator)) {
return inferMinus(type1, type2);
} else if(Operators.BOOL_AND.equals(operator)) {
return inferBoolAnd(type1, type2);
} else if(Operators.SET_HIBYTE.equals(operator)) {
return type1;
} else if(Operators.SET_LOWBYTE.equals(operator)) {
return type1;
} else if(Operators.WORD.equals(operator)) {
return SymbolType.WORD;
} else if(Operators.DWORD.equals(operator)) {
return SymbolType.DWORD;
}
String op = operator.getOperator();
switch(op) {
case "==":
case "<":
case "<=":
case "=<":
case ">":
case ">=":
case "=>":
case "<>":
case "!=":
case "&&":
case "||":
case "and":
case "or":
return SymbolType.BOOLEAN;
case "*":
if(type1 == null && type2 instanceof SymbolTypePointer) {
return ((SymbolTypePointer) type2).getElementType();
}
if(SymbolType.isByte(type1) && SymbolType.isByte(type2)) {
return SymbolType.BYTE;
} else if(SymbolType.SBYTE.equals(type1) && SymbolType.SBYTE.equals(type2)) {
return SymbolType.SBYTE;
} else if(SymbolType.isWord(type1) && SymbolType.isWord(type2)) {
return SymbolType.WORD;
} else if(SymbolType.isSWord(type1) && SymbolType.isSWord(type2)) {
return SymbolType.SWORD;
} else if(SymbolType.isDWord(type1) && SymbolType.isDWord(type2)) {
return SymbolType.DWORD;
} else if(SymbolType.isSDWord(type1) && SymbolType.isSDWord(type2)) {
return SymbolType.SDWORD;
}
throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2);
case "*idx":
if(type1 instanceof SymbolTypePointer) {
return ((SymbolTypePointer) type1).getElementType();
}
throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2);
case "/":
if(type1 instanceof SymbolTypePointer && SymbolType.isByte(type2)) {
return type1;
}
case "&":
case "|":
case "^":
if(SymbolType.isByte(type1) && SymbolType.isByte(type2)) {
return SymbolType.BYTE;
} else if(SymbolType.isWord(type1) && SymbolType.isWord(type2)) {
return SymbolType.WORD;
} else if(SymbolType.isDWord(type1) || SymbolType.isSDWord(type2)) {
return SymbolType.DWORD;
}
throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2);
case "<<":
case ">>":
if(SymbolType.isByte(type1)) {
return SymbolType.BYTE;
} else if(SymbolType.isSByte(type1)) {
return SymbolType.SBYTE;
} else if(SymbolType.isWord(type1)) {
return SymbolType.WORD;
} else if(SymbolType.isSWord(type1)) {
return SymbolType.SWORD;
} else if(SymbolType.isDWord(type1)) {
return SymbolType.DWORD;
} else if(SymbolType.isSDWord(type1)) {
return SymbolType.SDWORD;
}
throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2);
default:
throw new RuntimeException("Type inference case not handled " + type1 + " " + operator + " " + type2);
}
}
private static SymbolType inferPlus(SymbolType type1, SymbolType type2) {
if(type1.equals(SymbolType.STRING) && SymbolType.isByte(type2)) {
return SymbolType.STRING;
} else if(type1.equals(SymbolType.STRING) && SymbolType.STRING.equals(type2)) {
return SymbolType.STRING;
} else if(type1.equals(SymbolType.STRING) && type2 instanceof SymbolTypeArray && SymbolType.isByte(((SymbolTypeArray) type2).getElementType())) {
return SymbolType.STRING;
} else if(type1 instanceof SymbolTypeArray && SymbolType.isByte(((SymbolTypeArray) type1).getElementType()) && type2.equals(SymbolType.STRING)) {
return SymbolType.STRING;
} else if(type1 instanceof SymbolTypeArray && type2 instanceof SymbolTypeArray) {
SymbolType elemType1 = ((SymbolTypeArray) type1).getElementType();
SymbolType elemType2 = ((SymbolTypeArray) type2).getElementType();
if(typeMatch(elemType1, elemType2)) {
return new SymbolTypeArray(elemType1);
} else if(typeMatch(elemType2, elemType1)) {
return new SymbolTypeArray(elemType2);
} else {
throw new RuntimeException("Type inference case not handled " + type1 + " " + "+" + " " + type2);
// Infer all resulting types for each sub-type of the multi-type
if(left instanceof SymbolTypeSimple) {
left = new SymbolTypeMulti(Arrays.asList(left));
}
if(right instanceof SymbolTypeSimple) {
right = new SymbolTypeMulti(Arrays.asList(right));
}
ArrayList<SymbolType> resultTypes = new ArrayList<>();
for(SymbolType leftType : ((SymbolTypeMulti) left).getTypes()) {
for(SymbolType rightType : ((SymbolTypeMulti) right).getTypes()) {
SymbolType resType;
try {
resType = inferType(leftType, operator, rightType);
if(!resultTypes.contains(resType)) {
resultTypes.add(resType);
}
} catch(NoMatchingType e) {
// Cannot promote to common type - ignore!
}
}
}
if(resultTypes.size() == 1) {
return resultTypes.get(0);
} else {
return new SymbolTypeMulti(resultTypes);
}
} else if(type1 instanceof SymbolTypePointer && isInteger(type2)) {
return new SymbolTypePointer(((SymbolTypePointer) type1).getElementType());
} else if(SymbolType.isByte(type1) && SymbolType.isByte(type2)) {
return new SymbolTypeInline(Arrays.asList(SymbolType.BYTE, SymbolType.WORD));
} else if(SymbolType.isSByte(type1) && SymbolType.isSByte(type2)) {
return SymbolTypeInline.NUMERIC;
} else if(SymbolType.isWord(type1) && (SymbolType.isWord(type2) || SymbolType.isByte(type2))) {
return SymbolType.WORD;
} else if(SymbolType.isSWord(type1) && (SymbolType.isSWord(type2) || SymbolType.isSByte(type2))) {
return SymbolType.SWORD;
} else if(SymbolType.isDWord(type1) && (SymbolType.isDWord(type2) || SymbolType.isWord(type2)) || SymbolType.isByte(type2)) {
return SymbolType.DWORD;
} else if(SymbolType.isSDWord(type1) && (SymbolType.isSDWord(type2) || SymbolType.isSWord(type2) || SymbolType.isSByte(type2))) {
return SymbolType.SDWORD;
}
throw new RuntimeException("Type inference case not handled " + type1 + " " + "+" + " " + type2);
}
private static SymbolType inferBoolAnd(SymbolType type1, SymbolType type2) {
if(SymbolType.isSByte(type1) && SymbolType.isSByte(type2)) {
return SymbolTypeInline.SBYTE;
} else if(SymbolType.isByte(type1) || SymbolType.isByte(type2)) {
return SymbolType.BYTE;
} else if(SymbolType.isSWord(type1) && SymbolType.isSWord(type2)) {
return SymbolType.SWORD;
} else if(SymbolType.isWord(type1) || SymbolType.isWord(type2)) {
return SymbolType.WORD;
} else if(SymbolType.isSDWord(type1) || SymbolType.isSDWord(type2)) {
return SymbolType.SDWORD;
} else if(SymbolType.isDWord(type1) || SymbolType.isDWord(type2)) {
return SymbolType.DWORD;
}
throw new RuntimeException("Type inference case not handled " + type1 + " " + "+" + " " + type2);
}
private static SymbolType inferMinus(SymbolType type1, SymbolType type2) {
if(type1 instanceof SymbolTypePointer && isInteger(type2)) {
return new SymbolTypePointer(((SymbolTypePointer) type1).getElementType());
}
if(type1 instanceof SymbolTypePointer && type2 instanceof SymbolTypePointer) {
return SymbolType.WORD;
}
if(SymbolType.isByte(type1) && SymbolType.isByte(type2)) {
return SymbolTypeInline.NUMERIC;
}
if(SymbolType.isSByte(type1) && SymbolType.isSByte(type2)) {
return SymbolTypeInline.NUMERIC;
}
if(SymbolType.isWord(type1) && (SymbolType.isWord(type2) || SymbolType.isByte(type2))) {
return SymbolType.WORD;
}
if(SymbolType.isSWord(type1) && (SymbolType.isSWord(type2) || SymbolType.isSByte(type2))) {
return SymbolType.SWORD;
}
if(SymbolType.isDWord(type1) && (SymbolType.isDWord(type2) || SymbolType.isWord(type2) || SymbolType.isByte(type2))) {
return SymbolType.DWORD;
}
if(SymbolType.isSDWord(type1) && (SymbolType.isSDWord(type2) || SymbolType.isSWord(type2) || SymbolType.isSByte(type2))) {
return SymbolType.SDWORD;
}
throw new RuntimeException("Type inference case not handled " + type1 + " - " + type2);
}
private static boolean isInteger(SymbolType type) {
if(SymbolType.BYTE.equals(type)) {
return true;
} else if(SymbolType.WORD.equals(type)) {
return true;
} else if(SymbolType.SBYTE.equals(type)) {
return true;
} else if(SymbolType.SWORD.equals(type)) {
return true;
} else if(type instanceof SymbolTypeInline) {
SymbolTypeInline typeInline = (SymbolTypeInline) type;
return typeInline.isByte() || typeInline.isSByte() || typeInline.isWord() || typeInline.isSWord() || typeInline.isDWord() || typeInline.isSDWord();
} else {
return false;
}
}
@ -389,13 +205,13 @@ public class SymbolTypeInference {
ArrayList<SymbolType> types = new ArrayList<>();
types.add(new SymbolTypeArray(elmType));
types.add(SymbolType.WORD);
return new SymbolTypeInline(types);
} else if((list.getList().size() == 2 && SymbolType.isWord(elmType) )) {
return new SymbolTypeMulti(types);
} else if((list.getList().size() == 2 && SymbolType.isWord(elmType))) {
// Potentially a dword constructor - return a composite type
ArrayList<SymbolType> types = new ArrayList<>();
types.add(new SymbolTypeArray(elmType));
types.add(SymbolType.DWORD);
return new SymbolTypeInline(types);
return new SymbolTypeMulti(types);
} else {
return new SymbolTypeArray(elmType);
}
@ -415,7 +231,7 @@ public class SymbolTypeInference {
} else if(assignment.getOperator() instanceof OperatorBinary) {
rValueType = inferType(symbols, rValue1, (OperatorBinary) assignment.getOperator(), rValue2);
} else {
throw new CompileError("Cannot infer type of "+assignment.toString());
throw new CompileError("Cannot infer type of " + assignment.toString());
}
return rValueType;
}
@ -431,11 +247,11 @@ public class SymbolTypeInference {
if(lValueType.equals(rValueType)) {
// Types match directly
return true;
} else if(rValueType instanceof SymbolTypeInline) {
Collection<SymbolType> rTypes = ((SymbolTypeInline) rValueType).getTypes();
if(lValueType instanceof SymbolTypeInline) {
} else if(rValueType instanceof SymbolTypeMulti) {
Collection<SymbolType> rTypes = ((SymbolTypeMulti) rValueType).getTypes();
if(lValueType instanceof SymbolTypeMulti) {
// Both are inline types - RValue type must be superset of LValue
Collection<SymbolType> lTypes = ((SymbolTypeInline) lValueType).getTypes();
Collection<SymbolType> lTypes = ((SymbolTypeMulti) lValueType).getTypes();
return typeContainsMatchAll(lTypes, rTypes);
} else {
// Types match because the right side matches the left side
@ -482,43 +298,46 @@ public class SymbolTypeInference {
return false;
}
public static void inferCallLValue(ProgramScope programScope, StatementCall call) {
public static void inferCallLValue(Program program, StatementCall call, boolean reinfer) {
ProgramScope programScope = program.getScope();
LValue lValue = call.getlValue();
if(lValue instanceof VariableRef) {
Variable lValueVar = programScope.getVariable((VariableRef) lValue);
if(SymbolType.VAR.equals(lValueVar.getType())) {
Variable symbol = programScope.getVariable((VariableRef) lValue);
if(SymbolType.VAR.equals(symbol.getType()) || (reinfer && symbol.isInferredType())) {
Procedure procedure = programScope.getProcedure(call.getProcedure());
lValueVar.setTypeInferred(procedure.getReturnType());
SymbolType type = procedure.getReturnType();
setInferedType(program, call, symbol, type);
}
}
}
public static void inferAssignmentLValue(ProgramScope programScope, StatementAssignment assignment) {
public static void inferAssignmentLValue(Program program, StatementAssignment assignment, boolean reinfer) {
ProgramScope programScope = program.getScope();
LValue lValue = assignment.getlValue();
if(lValue instanceof VariableRef) {
Variable symbol = programScope.getVariable((VariableRef) lValue);
if(SymbolType.VAR.equals(symbol.getType())) {
if(SymbolType.VAR.equals(symbol.getType()) || (reinfer && symbol.isInferredType())) {
// Unresolved symbol - perform inference
Operator operator = assignment.getOperator();
if(assignment.getrValue1()==null && operator == null ) {
if(assignment.getrValue1() == null && operator == null) {
// Copy operation
RValue rValue = assignment.getrValue2();
SymbolType type = inferType(programScope, rValue);
symbol.setTypeInferred(type);
setInferedType(program, assignment, symbol, type);
} else if(assignment.getrValue1() == null && operator instanceof OperatorUnary) {
// Unary operation
RValue rValue = assignment.getrValue2();
SymbolType type = inferType(programScope, (OperatorUnary) operator, rValue);
symbol.setTypeInferred(type);
} else if(operator instanceof OperatorBinary){
setInferedType(program, assignment, symbol, type);
} else if(operator instanceof OperatorBinary) {
// Binary operation
SymbolType type = inferType(
programScope, assignment.getrValue1(),
(OperatorBinary) assignment.getOperator(),
assignment.getrValue2());
symbol.setTypeInferred(type);
setInferedType(program, assignment, symbol, type);
} else {
throw new CompileError("Cannot infer type of "+assignment);
throw new CompileError("Cannot infer type of " + assignment);
}
// If the type is an array or a string the symbol is constant
if(symbol.getType() instanceof SymbolTypeArray) {
@ -530,11 +349,18 @@ public class SymbolTypeInference {
}
}
public static void inferLValue(ProgramScope programScope, StatementLValue statementLValue) {
private static void setInferedType(Program program, StatementLValue statementLValue, Variable symbol, SymbolType type) {
if(!SymbolType.VAR.equals(symbol.getType()) && !type.equals(symbol.getType())) {
program.getLog().append("Inferred type updated to " + type + " in " + statementLValue.toString(program, false));
}
symbol.setTypeInferred(type);
}
public static void inferLValue(Program program, StatementLValue statementLValue, boolean reinfer) {
if(statementLValue instanceof StatementAssignment) {
inferAssignmentLValue(programScope, (StatementAssignment) statementLValue);
inferAssignmentLValue(program, (StatementAssignment) statementLValue, reinfer);
} else if(statementLValue instanceof StatementCall) {
inferCallLValue(programScope, (StatementCall) statementLValue);
inferCallLValue(program, (StatementCall) statementLValue, reinfer);
} else {
throw new RuntimeException("LValue statement not implemented " + statementLValue);
}

View File

@ -1,16 +1,20 @@
package dk.camelot64.kickc.model.types;
/** Integer symbol types (byte, signed byte, word, ...). */
public class SymbolTypeInteger implements SymbolType {
public class SymbolTypeInteger implements SymbolTypeSimple {
private final String typeName;
private final long minValue;
private final long maxValue;
private final boolean signed;
private final int bits;
SymbolTypeInteger(String typeName, long minValue, long maxValue) {
SymbolTypeInteger(String typeName, long minValue, long maxValue, boolean signed, int bits) {
this.typeName = typeName;
this.minValue = minValue;
this.maxValue = maxValue;
this.signed = signed;
this.bits = bits;
}
@Override
@ -26,6 +30,14 @@ public class SymbolTypeInteger implements SymbolType {
return maxValue;
}
public boolean isSigned() {
return signed;
}
public int getBits() {
return bits;
}
@Override
public String toString() {
return getTypeName();

View File

@ -7,16 +7,16 @@ import java.util.Collection;
* Symbol Type of an inline expression. Inline expressions can match multiple types depending on the actual value,
* eg. the value 27 matches both byte and signed byte (which can in turn be promoted to word/signed word, dword/signed dword), while the value -252 only matches signed word or signed dword.
*/
public class SymbolTypeInline implements SymbolType {
public class SymbolTypeMulti implements SymbolType {
/** All numeric types. */
public static final SymbolTypeInline NUMERIC = new SymbolTypeInline(Arrays.asList(BYTE, SBYTE, WORD, SWORD, DWORD, SDWORD));
public static final SymbolTypeMulti NUMERIC = new SymbolTypeMulti(Arrays.asList(BYTE, SBYTE, WORD, SWORD, DWORD, SDWORD));
/**
* All potential types for the inline constant.
*/
private Collection<SymbolType> types;
public SymbolTypeInline(Collection<SymbolType> types) {
public SymbolTypeMulti(Collection<SymbolType> types) {
this.types = types;
}
@ -47,7 +47,7 @@ public class SymbolTypeInline implements SymbolType {
if(o == null || getClass() != o.getClass()) {
return false;
}
SymbolTypeInline that = (SymbolTypeInline) o;
SymbolTypeMulti that = (SymbolTypeMulti) o;
return types != null ? types.equals(that.types) : that.types == null;
}

View File

@ -1,11 +1,11 @@
package dk.camelot64.kickc.model.types;
/** Basic Symbol Types */
public class SymbolTypeBasic implements SymbolType {
/** Basic named (string, char, ...) Symbol Types */
public class SymbolTypeNamed implements SymbolTypeSimple {
private String typeName;
SymbolTypeBasic(String typeName) {
SymbolTypeNamed(String typeName) {
this.typeName = typeName;
}
@ -22,7 +22,7 @@ public class SymbolTypeBasic implements SymbolType {
return false;
}
SymbolTypeBasic that = (SymbolTypeBasic) o;
SymbolTypeNamed that = (SymbolTypeNamed) o;
return typeName != null ? typeName.equals(that.typeName) : that.typeName == null;
}
@ -38,3 +38,4 @@ public class SymbolTypeBasic implements SymbolType {
}
}

View File

@ -1,7 +1,7 @@
package dk.camelot64.kickc.model.types;
/** A pointer */
public class SymbolTypePointer implements SymbolType {
public class SymbolTypePointer implements SymbolTypeSimple {
private SymbolType elementType;

View File

@ -1,7 +1,7 @@
package dk.camelot64.kickc.model.types;
/** A function returning another type */
public class SymbolTypeProcedure implements SymbolType {
public class SymbolTypeProcedure implements SymbolTypeSimple {
private SymbolType returnType;

View File

@ -1,7 +1,7 @@
package dk.camelot64.kickc.model.types;
/** A program */
public class SymbolTypeProgram implements SymbolType {
public class SymbolTypeProgram implements SymbolTypeSimple {
public SymbolTypeProgram() {

View File

@ -0,0 +1,5 @@
package dk.camelot64.kickc.model.types;
/** Marker interface for simple symbol types - ie. not a multi-type */
public interface SymbolTypeSimple extends SymbolType {
}

View File

@ -38,7 +38,7 @@ public class ConstantBinary implements ConstantValue {
@Override
public ConstantLiteral calculateLiteral(ProgramScope scope) {
return operator.calculate(left.calculateLiteral(scope), right.calculateLiteral(scope));
return operator.calculateLiteral(left.calculateLiteral(scope), right.calculateLiteral(scope));
}
@Override

View File

@ -3,7 +3,7 @@ package dk.camelot64.kickc.model.values;
import dk.camelot64.kickc.model.*;
import dk.camelot64.kickc.model.symbols.ProgramScope;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInline;
import dk.camelot64.kickc.model.types.SymbolTypeMulti;
import dk.camelot64.kickc.model.types.SymbolTypeInteger;
import java.util.ArrayList;
@ -38,7 +38,7 @@ public class ConstantInteger implements ConstantLiteral<Long> {
potentialTypes.add(typeInteger);
}
}
return new SymbolTypeInline(potentialTypes);
return new SymbolTypeMulti(potentialTypes);
}
@Override

View File

@ -3,12 +3,8 @@ package dk.camelot64.kickc.model.values;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.symbols.ProgramScope;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeInline;
import dk.camelot64.kickc.model.types.SymbolTypeInteger;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import java.util.ArrayList;
/** Constant pointer (meaning it points to a constant location)*/
public class ConstantPointer implements ConstantLiteral<Long> {

View File

@ -30,7 +30,7 @@ public class ConstantUnary implements ConstantValue {
@Override
public ConstantLiteral calculateLiteral(ProgramScope scope) {
return operator.calculate(operand.calculateLiteral(scope));
return operator.calculateLiteral(operand.calculateLiteral(scope));
}
@Override

View File

@ -67,7 +67,7 @@ public class Pass1FixLValuesLoHi extends Pass1Base {
VariableIntermediate tmpVar = currentScope.addVariableIntermediate();
VariableRef tmpVarRef = tmpVar.getRef();
statementLValue.setlValue(tmpVarRef);
SymbolTypeInference.inferLValue(programScope, statementLValue);
SymbolTypeInference.inferLValue(getProgram(), statementLValue, false);
// Insert an extra "set low" assignment statement
Statement setLoHiAssignment = new StatementAssignment(loHiVar, loHiVar, loHiOperator, tmpVarRef);
statementsIt.add(setLoHiAssignment);

View File

@ -35,7 +35,7 @@ public class Pass1TypeInference extends Pass1Base {
scopes.pop();
} else if(statement instanceof StatementAssignment) {
StatementAssignment assignment = (StatementAssignment) statement;
SymbolTypeInference.inferAssignmentLValue(programScope, assignment);
SymbolTypeInference.inferAssignmentLValue(getProgram(), assignment, false);
} else if(statement instanceof StatementCall) {
StatementCall call = (StatementCall) statement;
String procedureName = call.getProcedureName();
@ -47,7 +47,7 @@ public class Pass1TypeInference extends Pass1Base {
if(procedure.getParameters().size() != call.getParameters().size()) {
throw new CompileError("Wrong number of parameters in call. Expected " + procedure.getParameters().size() + ". " + statement.toString());
}
SymbolTypeInference.inferCallLValue(programScope, (StatementCall) statement);
SymbolTypeInference.inferCallLValue(getProgram(), (StatementCall) statement, false);
}
}
return false;

View File

@ -0,0 +1,33 @@
package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.Program;
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.types.SymbolTypeInference;
/**
* Pass through the all statements (re-)inferring types of variables.
*/
public class Pass2TypeInference extends Pass2SsaOptimization {
public Pass2TypeInference(Program program) {
super(program);
}
@Override
public boolean step() {
for(ControlFlowBlock block : getProgram().getGraph().getAllBlocks()) {
for(Statement statement : block.getStatements()) {
if(statement instanceof StatementAssignment) {
SymbolTypeInference.inferAssignmentLValue(getProgram(), (StatementAssignment) statement, true);
} else if(statement instanceof StatementCall) {
SymbolTypeInference.inferCallLValue(getProgram(), (StatementCall) statement, true);
}
}
}
return false;
}
}

View File

@ -16,7 +16,7 @@ void test_bytes() {
assert_byte("0=0@", bb, 0);
byte bc=bb+2;
assert_byte("0+2=2@", bc, 2);
byte bd=(byte)(bc-4);
byte bd=(byte)((signed byte)bc-4);
assert_byte("0+2-4=254@", bd, 254);
}

View File

@ -27,7 +27,7 @@ void main() {
// max - the maximal value
void sin8u_table(byte* sintab, word tabsize, byte min, byte max) {
byte amplitude = max-min;
word sum = min+max;
word sum = (word)min+max;
byte mid = (byte)((sum>>1)+1);
//if( sum & 1 > 0) mid++;
// u[4.28] step = PI*2/wavelength

View File

@ -168,8 +168,8 @@ line_ydxi::@3: scope:[line_ydxi] from line_ydxi::@5
line_ydxi::@2: scope:[line_ydxi] from line_ydxi::@3 line_ydxi::@5
[98] (byte) line_ydxi::e#6 ← phi( line_ydxi::@3/(byte) line_ydxi::e#2 line_ydxi::@5/(byte) line_ydxi::e#1 ) [ line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] ( main:2::lines:12::line:21::line_ydxi:42 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] main:2::lines:12::line:21::line_ydxi:86 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] )
[98] (byte) line_ydxi::x#6 ← phi( line_ydxi::@3/(byte) line_ydxi::x#2 line_ydxi::@5/(byte) line_ydxi::x#3 ) [ line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] ( main:2::lines:12::line:21::line_ydxi:42 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] main:2::lines:12::line:21::line_ydxi:86 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] )
[99] (byte/word~) line_ydxi::$6 ← (byte) line_ydxi::y1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 line_ydxi::$6 ] ( main:2::lines:12::line:21::line_ydxi:42 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 line_ydxi::$6 ] main:2::lines:12::line:21::line_ydxi:86 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 line_ydxi::$6 ] )
[100] if((byte) line_ydxi::y#2!=(byte/word~) line_ydxi::$6) goto line_ydxi::@1 [ line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] ( main:2::lines:12::line:21::line_ydxi:42 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] main:2::lines:12::line:21::line_ydxi:86 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] )
[99] (byte/signed word/word/dword/signed dword~) line_ydxi::$6 ← (byte) line_ydxi::y1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 line_ydxi::$6 ] ( main:2::lines:12::line:21::line_ydxi:42 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 line_ydxi::$6 ] main:2::lines:12::line:21::line_ydxi:86 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 line_ydxi::$6 ] )
[100] if((byte) line_ydxi::y#2!=(byte/signed word/word/dword/signed dword~) line_ydxi::$6) goto line_ydxi::@1 [ line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] ( main:2::lines:12::line:21::line_ydxi:42 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] main:2::lines:12::line:21::line_ydxi:86 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#6 line_ydxi::y#2 line_ydxi::e#6 ] )
to:line_ydxi::@return
line_ydxi::@return: scope:[line_ydxi] from line_ydxi::@2
[101] return [ ] ( main:2::lines:12::line:21::line_ydxi:42 [ lines::l#2 ] main:2::lines:12::line:21::line_ydxi:86 [ lines::l#2 ] )
@ -214,8 +214,8 @@ line_xdyi::@3: scope:[line_xdyi] from line_xdyi::@5
line_xdyi::@2: scope:[line_xdyi] from line_xdyi::@3 line_xdyi::@5
[120] (byte) line_xdyi::e#6 ← phi( line_xdyi::@3/(byte) line_xdyi::e#2 line_xdyi::@5/(byte) line_xdyi::e#1 ) [ line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] )
[120] (byte) line_xdyi::y#6 ← phi( line_xdyi::@3/(byte) line_xdyi::y#2 line_xdyi::@5/(byte) line_xdyi::y#3 ) [ line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] )
[121] (byte/word~) line_xdyi::$6 ← (byte) line_xdyi::x1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 line_xdyi::$6 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 line_xdyi::$6 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 line_xdyi::$6 ] )
[122] if((byte) line_xdyi::x#2!=(byte/word~) line_xdyi::$6) goto line_xdyi::@1 [ line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] )
[121] (byte/signed word/word/dword/signed dword~) line_xdyi::$6 ← (byte) line_xdyi::x1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 line_xdyi::$6 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 line_xdyi::$6 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 line_xdyi::$6 ] )
[122] if((byte) line_xdyi::x#2!=(byte/signed word/word/dword/signed dword~) line_xdyi::$6) goto line_xdyi::@1 [ line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#2 line_xdyi::y#6 line_xdyi::e#6 ] )
to:line_xdyi::@return
line_xdyi::@return: scope:[line_xdyi] from line_xdyi::@2
[123] return [ ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 ] )
@ -248,8 +248,8 @@ line_ydxd::@3: scope:[line_ydxd] from line_ydxd::@5
line_ydxd::@2: scope:[line_ydxd] from line_ydxd::@3 line_ydxd::@5
[135] (byte) line_ydxd::e#6 ← phi( line_ydxd::@3/(byte) line_ydxd::e#2 line_ydxd::@5/(byte) line_ydxd::e#1 ) [ line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] )
[135] (byte) line_ydxd::x#6 ← phi( line_ydxd::@3/(byte) line_ydxd::x#2 line_ydxd::@5/(byte) line_ydxd::x#3 ) [ line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] )
[136] (byte/word~) line_ydxd::$6 ← (byte) line_ydxd::y1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 line_ydxd::$6 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 line_ydxd::$6 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 line_ydxd::$6 ] )
[137] if((byte) line_ydxd::y#3!=(byte/word~) line_ydxd::$6) goto line_ydxd::@1 [ line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] )
[136] (byte/signed word/word/dword/signed dword~) line_ydxd::$6 ← (byte) line_ydxd::y1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 line_ydxd::$6 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 line_ydxd::$6 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 line_ydxd::$6 ] )
[137] if((byte) line_ydxd::y#3!=(byte/signed word/word/dword/signed dword~) line_ydxd::$6) goto line_ydxd::@1 [ line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#6 line_ydxd::y#3 line_ydxd::e#6 ] )
to:line_ydxd::@return
line_ydxd::@return: scope:[line_ydxd] from line_ydxd::@2
[138] return [ ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 ] )
@ -282,8 +282,8 @@ line_xdyd::@3: scope:[line_xdyd] from line_xdyd::@5
line_xdyd::@2: scope:[line_xdyd] from line_xdyd::@3 line_xdyd::@5
[150] (byte) line_xdyd::e#6 ← phi( line_xdyd::@3/(byte) line_xdyd::e#2 line_xdyd::@5/(byte) line_xdyd::e#1 ) [ line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] )
[150] (byte) line_xdyd::y#6 ← phi( line_xdyd::@3/(byte) line_xdyd::y#2 line_xdyd::@5/(byte) line_xdyd::y#3 ) [ line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] )
[151] (byte/word~) line_xdyd::$6 ← (byte) line_xdyd::x1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 line_xdyd::$6 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 line_xdyd::$6 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 line_xdyd::$6 ] )
[152] if((byte) line_xdyd::x#2!=(byte/word~) line_xdyd::$6) goto line_xdyd::@1 [ line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] )
[151] (byte/signed word/word/dword/signed dword~) line_xdyd::$6 ← (byte) line_xdyd::x1#6 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 line_xdyd::$6 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 line_xdyd::$6 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 line_xdyd::$6 ] )
[152] if((byte) line_xdyd::x#2!=(byte/signed word/word/dword/signed dword~) line_xdyd::$6) goto line_xdyd::@1 [ line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#2 line_xdyd::y#6 line_xdyd::e#6 ] )
to:line_xdyd::@return
line_xdyd::@return: scope:[line_xdyd] from line_xdyd::@2
[153] return [ ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 ] )

View File

@ -90,7 +90,7 @@
(byte) line::yd#10 yd zp ZP_BYTE:4 0.8888888888888888
(byte) line::yd#3 yd zp ZP_BYTE:4 0.8888888888888888
(void()) line_xdyd((byte) line_xdyd::x , (byte) line_xdyd::y , (byte) line_xdyd::x1 , (byte) line_xdyd::xd , (byte) line_xdyd::yd)
(byte/word~) line_xdyd::$6 $6 zp ZP_BYTE:7 2002.0
(byte/signed word/word/dword/signed dword~) line_xdyd::$6 $6 zp ZP_BYTE:7 2002.0
(label) line_xdyd::@1
(label) line_xdyd::@2
(label) line_xdyd::@3
@ -128,7 +128,7 @@
(byte) line_xdyd::yd#1 yd zp ZP_BYTE:4 4.0
(byte) line_xdyd::yd#2 yd zp ZP_BYTE:4 71.92857142857143
(void()) line_xdyi((byte) line_xdyi::x , (byte) line_xdyi::y , (byte) line_xdyi::x1 , (byte) line_xdyi::xd , (byte) line_xdyi::yd)
(byte/word~) line_xdyi::$6 $6 zp ZP_BYTE:8 2002.0
(byte/signed word/word/dword/signed dword~) line_xdyi::$6 $6 zp ZP_BYTE:8 2002.0
(label) line_xdyi::@1
(label) line_xdyi::@2
(label) line_xdyi::@3
@ -166,7 +166,7 @@
(byte) line_xdyi::yd#1 yd zp ZP_BYTE:4 4.0
(byte) line_xdyi::yd#2 yd zp ZP_BYTE:4 71.92857142857143
(void()) line_ydxd((byte) line_ydxd::y , (byte) line_ydxd::x , (byte) line_ydxd::y1 , (byte) line_ydxd::yd , (byte) line_ydxd::xd)
(byte/word~) line_ydxd::$6 reg byte y 2002.0
(byte/signed word/word/dword/signed dword~) line_ydxd::$6 reg byte y 2002.0
(label) line_ydxd::@1
(label) line_ydxd::@2
(label) line_ydxd::@3
@ -204,7 +204,7 @@
(byte) line_ydxd::yd#1 yd zp ZP_BYTE:4 2.0
(byte) line_ydxd::yd#5 yd zp ZP_BYTE:4 143.28571428571428
(void()) line_ydxi((byte) line_ydxi::y , (byte) line_ydxi::x , (byte) line_ydxi::y1 , (byte) line_ydxi::yd , (byte) line_ydxi::xd)
(byte/word~) line_ydxi::$6 reg byte y 2002.0
(byte/signed word/word/dword/signed dword~) line_ydxi::$6 reg byte y 2002.0
(label) line_ydxi::@1
(label) line_ydxi::@2
(label) line_ydxi::@3

View File

@ -119,14 +119,14 @@ proc (void()) main()
*((byte*) FGCOL) ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) main::$0 ← (byte) BMM | (byte) DEN
(byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL
(byte~) main::$2 ← (byte~) main::$1 | (byte/signed byte/word/signed word/dword/signed dword) 3
*((byte*) D011) ← (byte~) main::$2
(byte/word/dword~) main::$2 ← (byte~) main::$1 | (byte/signed byte/word/signed word/dword/signed dword) 3
*((byte*) D011) ← (byte/word/dword~) main::$2
(word~) main::$3 ← ((word)) (byte*) SCREEN
(word~) main::$4 ← (word~) main::$3 / (byte/signed byte/word/signed word/dword/signed dword) 64
(word/signed dword/dword~) main::$4 ← (word~) main::$3 / (byte/signed byte/word/signed word/dword/signed dword) 64
(word~) main::$5 ← ((word)) (byte*) BITMAP
(word~) main::$6 ← (word~) main::$5 / (word/signed word/dword/signed dword) 1024
(word~) main::$7 ← (word~) main::$4 | (word~) main::$6
(byte~) main::$8 ← ((byte)) (word~) main::$7
(word/signed dword/dword~) main::$6 ← (word~) main::$5 / (word/signed word/dword/signed dword) 1024
(word/dword~) main::$7 ← (word/signed dword/dword~) main::$4 | (word/signed dword/dword~) main::$6
(byte~) main::$8 ← ((byte)) (word/dword~) main::$7
*((byte*) D018) ← (byte~) main::$8
(void~) main::$9 ← call init_screen
(void~) main::$10 ← call init_plot_tables
@ -298,12 +298,12 @@ SYMBOLS
(void~) main::$10
(boolean~) main::$11
(void~) main::$12
(byte~) main::$2
(byte/word/dword~) main::$2
(word~) main::$3
(word~) main::$4
(word/signed dword/dword~) main::$4
(word~) main::$5
(word~) main::$6
(word~) main::$7
(word/signed dword/dword~) main::$6
(word/dword~) main::$7
(byte~) main::$8
(void~) main::$9
(label) main::@1
@ -376,14 +376,14 @@ main: scope:[main] from
*((byte*) FGCOL) ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) main::$0 ← (byte) BMM | (byte) DEN
(byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL
(byte~) main::$2 ← (byte~) main::$1 | (byte/signed byte/word/signed word/dword/signed dword) 3
*((byte*) D011) ← (byte~) main::$2
(byte/word/dword~) main::$2 ← (byte~) main::$1 | (byte/signed byte/word/signed word/dword/signed dword) 3
*((byte*) D011) ← (byte/word/dword~) main::$2
(word~) main::$3 ← ((word)) (byte*) SCREEN
(word~) main::$4 ← (word~) main::$3 / (byte/signed byte/word/signed word/dword/signed dword) 64
(word/signed dword/dword~) main::$4 ← (word~) main::$3 / (byte/signed byte/word/signed word/dword/signed dword) 64
(word~) main::$5 ← ((word)) (byte*) BITMAP
(word~) main::$6 ← (word~) main::$5 / (word/signed word/dword/signed dword) 1024
(word~) main::$7 ← (word~) main::$4 | (word~) main::$6
(byte~) main::$8 ← ((byte)) (word~) main::$7
(word/signed dword/dword~) main::$6 ← (word~) main::$5 / (word/signed word/dword/signed dword) 1024
(word/dword~) main::$7 ← (word/signed dword/dword~) main::$4 | (word/signed dword/dword~) main::$6
(byte~) main::$8 ← ((byte)) (word/dword~) main::$7
*((byte*) D018) ← (byte~) main::$8
(void~) main::$9 ← call init_screen
(void~) main::$10 ← call init_plot_tables
@ -604,14 +604,14 @@ main: scope:[main] from @5
*((byte*) FGCOL#1) ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) main::$0 ← (byte) BMM#1 | (byte) DEN#1
(byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#1
(byte~) main::$2 ← (byte~) main::$1 | (byte/signed byte/word/signed word/dword/signed dword) 3
*((byte*) D011#1) ← (byte~) main::$2
(byte/word/dword~) main::$2 ← (byte~) main::$1 | (byte/signed byte/word/signed word/dword/signed dword) 3
*((byte*) D011#1) ← (byte/word/dword~) main::$2
(word~) main::$3 ← ((word)) (byte*) SCREEN#1
(word~) main::$4 ← (word~) main::$3 / (byte/signed byte/word/signed word/dword/signed dword) 64
(word/signed dword/dword~) main::$4 ← (word~) main::$3 / (byte/signed byte/word/signed word/dword/signed dword) 64
(word~) main::$5 ← ((word)) (byte*) BITMAP#0
(word~) main::$6 ← (word~) main::$5 / (word/signed word/dword/signed dword) 1024
(word~) main::$7 ← (word~) main::$4 | (word~) main::$6
(byte~) main::$8 ← ((byte)) (word~) main::$7
(word/signed dword/dword~) main::$6 ← (word~) main::$5 / (word/signed word/dword/signed dword) 1024
(word/dword~) main::$7 ← (word/signed dword/dword~) main::$4 | (word/signed dword/dword~) main::$6
(byte~) main::$8 ← ((byte)) (word/dword~) main::$7
*((byte*) D018#1) ← (byte~) main::$8
call init_screen param-assignment
to:main::@5
@ -987,12 +987,12 @@ SYMBOL TABLE SSA
(byte~) main::$0
(byte~) main::$1
(boolean~) main::$11
(byte~) main::$2
(byte/word/dword~) main::$2
(word~) main::$3
(word~) main::$4
(word/signed dword/dword~) main::$4
(word~) main::$5
(word~) main::$6
(word~) main::$7
(word/signed dword/dword~) main::$6
(word/dword~) main::$7
(byte~) main::$8
(label) main::@1
(label) main::@2
@ -1234,11 +1234,11 @@ Constant (const byte*) init_screen::c#0 = SCREEN#0
Constant (const byte*) init_screen::$2 = SCREEN#0+1024
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$1 = main::$0|RSEL#0
Constant (const word) main::$4 = main::$3/64
Constant (const word) main::$6 = main::$5/1024
Constant (const word/signed dword/dword) main::$4 = main::$3/64
Constant (const word/signed dword/dword) main::$6 = main::$5/1024
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$2 = main::$1|3
Constant (const word) main::$7 = main::$4|main::$6
Constant (const byte/word/dword) main::$2 = main::$1|3
Constant (const word/dword) main::$7 = main::$4|main::$6
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$8 = ((byte))main::$7
Succesful SSA optimization Pass2ConstantIdentification

View File

@ -34,38 +34,38 @@ proc (void()) main()
(byte) main::y0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) main::x1 ← (byte/signed byte/word/signed word/dword/signed dword) 39
(byte) main::y1 ← (byte/signed byte/word/signed word/dword/signed dword) 24
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte~) main::$1
(byte) main::x ← (byte) main::x0
(byte) main::y ← (byte) main::y0
(byte~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte~) main::$2
(byte~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*~) main::$4 ← (byte[1000]) SCREEN + (byte~) main::$3
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*~) main::$4 ← (byte[1000]) SCREEN + (byte/signed word/word/dword/signed dword~) main::$3
(byte*~) main::$5 ← (byte*~) main::$4 + (byte) main::x
(byte*) main::cursor ← (byte*~) main::$5
main::@1:
*((byte*) main::cursor) ← (byte) STAR
(byte/word~) main::$6 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/signed word/word/dword/signed dword~) main::$6
(byte*~) main::$7 ← (byte*) main::cursor + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*) main::cursor ← (byte*~) main::$7
(byte/word~) main::$8 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte/word~) main::$8
(byte~) main::$8 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte~) main::$8
(boolean~) main::$9 ← (byte) main::xd <= (byte) main::e
(boolean~) main::$10 ← ! (boolean~) main::$9
if((boolean~) main::$10) goto main::@2
(byte/word~) main::$11 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/word~) main::$11
(byte/signed word/word/dword/signed dword~) main::$11 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/signed word/word/dword/signed dword~) main::$11
(byte*~) main::$12 ← (byte*) main::cursor + (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*) main::cursor ← (byte*~) main::$12
(byte/signed byte/word/signed word/dword/signed dword~) main::$13 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte/signed byte/word/signed word/dword/signed dword~) main::$13
(byte~) main::$13 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte~) main::$13
main::@2:
(byte/word~) main::$14 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$15 ← (byte) main::x < (byte/word~) main::$14
(byte/signed word/word/dword/signed dword~) main::$14 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$15 ← (byte) main::x < (byte/signed word/word/dword/signed dword~) main::$14
if((boolean~) main::$15) goto main::@1
main::@return:
return
@ -76,21 +76,21 @@ SYMBOLS
(byte[1000]) SCREEN
(byte) STAR
(void()) main()
(byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0
(byte~) main::$1
(boolean~) main::$10
(byte/word~) main::$11
(byte/signed word/word/dword/signed dword~) main::$11
(byte*~) main::$12
(byte/signed byte/word/signed word/dword/signed dword~) main::$13
(byte/word~) main::$14
(byte~) main::$13
(byte/signed word/word/dword/signed dword~) main::$14
(boolean~) main::$15
(byte~) main::$2
(byte~) main::$3
(byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3
(byte*~) main::$4
(byte*~) main::$5
(byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6
(byte*~) main::$7
(byte/word~) main::$8
(byte~) main::$8
(boolean~) main::$9
(label) main::@1
(label) main::@2
@ -117,43 +117,43 @@ main: scope:[main] from
(byte) main::y0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) main::x1 ← (byte/signed byte/word/signed word/dword/signed dword) 39
(byte) main::y1 ← (byte/signed byte/word/signed word/dword/signed dword) 24
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte~) main::$1
(byte) main::x ← (byte) main::x0
(byte) main::y ← (byte) main::y0
(byte~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte~) main::$2
(byte~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*~) main::$4 ← (byte[1000]) SCREEN + (byte~) main::$3
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*~) main::$4 ← (byte[1000]) SCREEN + (byte/signed word/word/dword/signed dword~) main::$3
(byte*~) main::$5 ← (byte*~) main::$4 + (byte) main::x
(byte*) main::cursor ← (byte*~) main::$5
to:main::@1
main::@1: scope:[main] from main main::@2
*((byte*) main::cursor) ← (byte) STAR
(byte/word~) main::$6 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/signed word/word/dword/signed dword~) main::$6
(byte*~) main::$7 ← (byte*) main::cursor + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*) main::cursor ← (byte*~) main::$7
(byte/word~) main::$8 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte/word~) main::$8
(byte~) main::$8 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte~) main::$8
(boolean~) main::$9 ← (byte) main::xd <= (byte) main::e
(boolean~) main::$10 ← ! (boolean~) main::$9
if((boolean~) main::$10) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1 main::@3
(byte/word~) main::$14 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$15 ← (byte) main::x < (byte/word~) main::$14
(byte/signed word/word/dword/signed dword~) main::$14 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$15 ← (byte) main::x < (byte/signed word/word/dword/signed dword~) main::$14
if((boolean~) main::$15) goto main::@1
to:main::@4
main::@3: scope:[main] from main::@1
(byte/word~) main::$11 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/word~) main::$11
(byte/signed word/word/dword/signed dword~) main::$11 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/signed word/word/dword/signed dword~) main::$11
(byte*~) main::$12 ← (byte*) main::cursor + (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*) main::cursor ← (byte*~) main::$12
(byte/signed byte/word/signed word/dword/signed dword~) main::$13 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte/signed byte/word/signed word/dword/signed dword~) main::$13
(byte~) main::$13 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte~) main::$13
to:main::@2
main::@4: scope:[main] from main::@2
to:main::@return
@ -183,16 +183,16 @@ main: scope:[main] from @1
(byte) main::y0#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) main::x1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 39
(byte) main::y1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 24
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
(byte) main::xd#0 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1 ← (byte) main::y1#0 - (byte) main::y0#0
(byte) main::yd#0 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
(byte) main::xd#0 ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1#0 - (byte) main::y0#0
(byte) main::yd#0 ← (byte~) main::$1
(byte) main::x#0 ← (byte) main::x0#0
(byte) main::y#0 ← (byte) main::y0#0
(byte~) main::$2 ← (byte) main::yd#0 / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e#0 ← (byte~) main::$2
(byte~) main::$3 ← (byte) main::y#0 * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*~) main::$4 ← (byte[1000]) SCREEN#0 + (byte~) main::$3
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::yd#0 / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e#0 ← (byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte) main::y#0 * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*~) main::$4 ← (byte[1000]) SCREEN#0 + (byte/signed word/word/dword/signed dword~) main::$3
(byte*~) main::$5 ← (byte*~) main::$4 + (byte) main::x#0
(byte*) main::cursor#0 ← (byte*~) main::$5
to:main::@1
@ -206,12 +206,12 @@ main::@1: scope:[main] from main main::@2
(byte*) main::cursor#3 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
(byte) STAR#1 ← phi( main/(byte) STAR#2 main::@2/(byte) STAR#3 )
*((byte*) main::cursor#3) ← (byte) STAR#1
(byte/word~) main::$6 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x#1 ← (byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x#1 ← (byte/signed word/word/dword/signed dword~) main::$6
(byte*~) main::$7 ← (byte*) main::cursor#3 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*) main::cursor#1 ← (byte*~) main::$7
(byte/word~) main::$8 ← (byte) main::e#3 + (byte) main::yd#1
(byte) main::e#1 ← (byte/word~) main::$8
(byte~) main::$8 ← (byte) main::e#3 + (byte) main::yd#1
(byte) main::e#1 ← (byte~) main::$8
(boolean~) main::$9 ← (byte) main::xd#1 <= (byte) main::e#1
(boolean~) main::$10 ← ! (boolean~) main::$9
if((boolean~) main::$10) goto main::@2
@ -225,8 +225,8 @@ main::@2: scope:[main] from main::@1 main::@3
(byte) STAR#3 ← phi( main::@1/(byte) STAR#1 main::@3/(byte) STAR#5 )
(byte) main::x#3 ← phi( main::@1/(byte) main::x#1 main::@3/(byte) main::x#4 )
(byte) main::x1#1 ← phi( main::@1/(byte) main::x1#2 main::@3/(byte) main::x1#3 )
(byte/word~) main::$14 ← (byte) main::x1#1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$15 ← (byte) main::x#3 < (byte/word~) main::$14
(byte/signed word/word/dword/signed dword~) main::$14 ← (byte) main::x1#1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$15 ← (byte) main::x#3 < (byte/signed word/word/dword/signed dword~) main::$14
if((boolean~) main::$15) goto main::@1
to:main::@return
main::@3: scope:[main] from main::@1
@ -238,12 +238,12 @@ main::@3: scope:[main] from main::@1
(byte) main::e#4 ← phi( main::@1/(byte) main::e#1 )
(byte*) main::cursor#4 ← phi( main::@1/(byte*) main::cursor#1 )
(byte) main::y#2 ← phi( main::@1/(byte) main::y#3 )
(byte/word~) main::$11 ← (byte) main::y#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y#1 ← (byte/word~) main::$11
(byte/signed word/word/dword/signed dword~) main::$11 ← (byte) main::y#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y#1 ← (byte/signed word/word/dword/signed dword~) main::$11
(byte*~) main::$12 ← (byte*) main::cursor#4 + (byte/signed byte/word/signed word/dword/signed dword) 40
(byte*) main::cursor#2 ← (byte*~) main::$12
(byte/signed byte/word/signed word/dword/signed dword~) main::$13 ← (byte) main::e#4 - (byte) main::xd#2
(byte) main::e#2 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$13
(byte~) main::$13 ← (byte) main::e#4 - (byte) main::xd#2
(byte) main::e#2 ← (byte~) main::$13
to:main::@2
main::@return: scope:[main] from main::@2
return
@ -271,21 +271,21 @@ SYMBOL TABLE SSA
(byte) STAR#4
(byte) STAR#5
(void()) main()
(byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0
(byte~) main::$1
(boolean~) main::$10
(byte/word~) main::$11
(byte/signed word/word/dword/signed dword~) main::$11
(byte*~) main::$12
(byte/signed byte/word/signed word/dword/signed dword~) main::$13
(byte/word~) main::$14
(byte~) main::$13
(byte/signed word/word/dword/signed dword~) main::$14
(boolean~) main::$15
(byte~) main::$2
(byte~) main::$3
(byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3
(byte*~) main::$4
(byte*~) main::$5
(byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6
(byte*~) main::$7
(byte/word~) main::$8
(byte~) main::$8
(boolean~) main::$9
(label) main::@1
(label) main::@2
@ -345,23 +345,23 @@ Succesful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (boolean~) main::$10 ← (byte) main::xd#1 > (byte) main::e#1 from (boolean~) main::$9 ← (byte) main::xd#1 <= (byte) main::e#1
Succesful SSA optimization Pass2UnaryNotSimplification
Not aliassing across scopes: STAR#2 STAR#4
Alias (byte) main::xd#0 = (byte/signed byte/word/signed word/dword/signed dword~) main::$0
Alias (byte) main::yd#0 = (byte/signed byte/word/signed word/dword/signed dword~) main::$1
Alias (byte) main::xd#0 = (byte~) main::$0
Alias (byte) main::yd#0 = (byte~) main::$1
Alias (byte) main::x#0 = (byte) main::x0#0
Alias (byte) main::y#0 = (byte) main::y0#0
Alias (byte) main::e#0 = (byte~) main::$2
Alias (byte) main::e#0 = (byte/signed word/word/dword/signed dword~) main::$2
Alias (byte*) main::cursor#0 = (byte*~) main::$5
Alias (byte) main::x#1 = (byte/word~) main::$6 (byte) main::x#4
Alias (byte) main::x#1 = (byte/signed word/word/dword/signed dword~) main::$6 (byte) main::x#4
Alias (byte*) main::cursor#1 = (byte*~) main::$7 (byte*) main::cursor#4
Alias (byte) main::e#1 = (byte/word~) main::$8 (byte) main::e#4
Alias (byte) main::e#1 = (byte~) main::$8 (byte) main::e#4
Alias (byte) main::y#2 = (byte) main::y#3
Alias (byte) main::xd#1 = (byte) main::xd#2
Alias (byte) main::x1#2 = (byte) main::x1#3
Alias (byte) STAR#1 = (byte) STAR#5
Alias (byte) main::yd#1 = (byte) main::yd#3
Alias (byte) main::y#1 = (byte/word~) main::$11
Alias (byte) main::y#1 = (byte/signed word/word/dword/signed dword~) main::$11
Alias (byte*) main::cursor#2 = (byte*~) main::$12
Alias (byte) main::e#2 = (byte/signed byte/word/signed word/dword/signed dword~) main::$13
Alias (byte) main::e#2 = (byte~) main::$13
Alias (byte) STAR#0 = (byte) STAR#4
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: STAR#2 STAR#0
@ -384,7 +384,7 @@ Redundant Phi (byte) main::xd#1 (byte) main::xd#0
Redundant Phi (byte) main::x1#1 (byte) main::x1#0
Succesful SSA optimization Pass2RedundantPhiElimination
Simple Condition (boolean~) main::$10 if((byte) main::xd#0>(byte) main::e#1) goto main::@2
Simple Condition (boolean~) main::$15 if((byte) main::x#1<(byte/word~) main::$14) goto main::@1
Simple Condition (boolean~) main::$15 if((byte) main::x#1<(byte/signed word/word/dword/signed dword~) main::$14) goto main::@1
Succesful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) STAR#0 = 81
Constant (const byte*) SCREEN#0 = ((byte*))1024
@ -395,8 +395,8 @@ Constant (const byte) main::y1#0 = 24
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::xd#0 = main::x1#0-main::x#0
Constant (const byte) main::yd#0 = main::y1#0-main::y#0
Constant (const byte) main::$3 = main::y#0*40
Constant (const byte/word) main::$14 = main::x1#0+1
Constant (const byte/word/signed word/dword/signed dword) main::$3 = main::y#0*40
Constant (const byte/signed word/word/dword/signed dword) main::$14 = main::x1#0+1
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::e#0 = main::yd#0/2
Constant (const byte*) main::$4 = SCREEN#0+main::$3

View File

@ -34,37 +34,37 @@ proc (void()) main()
(byte) main::y0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) main::x1 ← (byte/signed byte/word/signed word/dword/signed dword) 39
(byte) main::y1 ← (byte/signed byte/word/signed word/dword/signed dword) 24
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte~) main::$1
(byte) main::x ← (byte) main::x0
(byte) main::y ← (byte) main::y0
(byte~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte~) main::$2
(byte~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte/word~) main::$4 ← (byte) main::x + (byte~) main::$3
(word) main::idx ← (byte/word~) main::$4
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::x + (byte/signed word/word/dword/signed dword~) main::$3
(word) main::idx ← (byte/signed word/word/dword/signed dword~) main::$4
main::@1:
*((byte[1000]) main::screen + (word) main::idx) ← (byte) main::STAR
(byte/word~) main::$5 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/word~) main::$5
(word~) main::$6 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 1
(word) main::idx ← (word~) main::$6
(byte/word~) main::$7 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte/word~) main::$7
(byte/signed word/word/dword/signed dword~) main::$5 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/signed word/word/dword/signed dword~) main::$5
(word/signed dword/dword~) main::$6 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 1
(word) main::idx ← (word/signed dword/dword~) main::$6
(byte~) main::$7 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte~) main::$7
(boolean~) main::$8 ← (byte) main::xd < (byte) main::e
(boolean~) main::$9 ← ! (boolean~) main::$8
if((boolean~) main::$9) goto main::@2
(byte/word~) main::$10 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/word~) main::$10
(word~) main::$11 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 40
(word) main::idx ← (word~) main::$11
(byte/signed byte/word/signed word/dword/signed dword~) main::$12 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte/signed byte/word/signed word/dword/signed dword~) main::$12
(byte/signed word/word/dword/signed dword~) main::$10 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/signed word/word/dword/signed dword~) main::$10
(word/signed dword/dword~) main::$11 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 40
(word) main::idx ← (word/signed dword/dword~) main::$11
(byte~) main::$12 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte~) main::$12
main::@2:
(byte/word~) main::$13 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$14 ← (byte) main::x < (byte/word~) main::$13
(byte/signed word/word/dword/signed dword~) main::$13 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$14 ← (byte) main::x < (byte/signed word/word/dword/signed dword~) main::$13
if((boolean~) main::$14) goto main::@1
main::@return:
return
@ -73,19 +73,19 @@ endproc // main()
SYMBOLS
(void()) main()
(byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte/word~) main::$10
(word~) main::$11
(byte/signed byte/word/signed word/dword/signed dword~) main::$12
(byte/word~) main::$13
(byte~) main::$0
(byte~) main::$1
(byte/signed word/word/dword/signed dword~) main::$10
(word/signed dword/dword~) main::$11
(byte~) main::$12
(byte/signed word/word/dword/signed dword~) main::$13
(boolean~) main::$14
(byte~) main::$2
(byte~) main::$3
(byte/word~) main::$4
(byte/word~) main::$5
(word~) main::$6
(byte/word~) main::$7
(byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3
(byte/signed word/word/dword/signed dword~) main::$4
(byte/signed word/word/dword/signed dword~) main::$5
(word/signed dword/dword~) main::$6
(byte~) main::$7
(boolean~) main::$8
(boolean~) main::$9
(label) main::@1
@ -115,42 +115,42 @@ main: scope:[main] from
(byte) main::y0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) main::x1 ← (byte/signed byte/word/signed word/dword/signed dword) 39
(byte) main::y1 ← (byte/signed byte/word/signed word/dword/signed dword) 24
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
(byte) main::xd ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1 - (byte) main::y0
(byte) main::yd ← (byte~) main::$1
(byte) main::x ← (byte) main::x0
(byte) main::y ← (byte) main::y0
(byte~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte~) main::$2
(byte~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte/word~) main::$4 ← (byte) main::x + (byte~) main::$3
(word) main::idx ← (byte/word~) main::$4
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::yd / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e ← (byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte) main::y * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::x + (byte/signed word/word/dword/signed dword~) main::$3
(word) main::idx ← (byte/signed word/word/dword/signed dword~) main::$4
to:main::@1
main::@1: scope:[main] from main main::@2
*((byte[1000]) main::screen + (word) main::idx) ← (byte) main::STAR
(byte/word~) main::$5 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/word~) main::$5
(word~) main::$6 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 1
(word) main::idx ← (word~) main::$6
(byte/word~) main::$7 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte/word~) main::$7
(byte/signed word/word/dword/signed dword~) main::$5 ← (byte) main::x + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x ← (byte/signed word/word/dword/signed dword~) main::$5
(word/signed dword/dword~) main::$6 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 1
(word) main::idx ← (word/signed dword/dword~) main::$6
(byte~) main::$7 ← (byte) main::e + (byte) main::yd
(byte) main::e ← (byte~) main::$7
(boolean~) main::$8 ← (byte) main::xd < (byte) main::e
(boolean~) main::$9 ← ! (boolean~) main::$8
if((boolean~) main::$9) goto main::@2
to:main::@3
main::@2: scope:[main] from main::@1 main::@3
(byte/word~) main::$13 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$14 ← (byte) main::x < (byte/word~) main::$13
(byte/signed word/word/dword/signed dword~) main::$13 ← (byte) main::x1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$14 ← (byte) main::x < (byte/signed word/word/dword/signed dword~) main::$13
if((boolean~) main::$14) goto main::@1
to:main::@4
main::@3: scope:[main] from main::@1
(byte/word~) main::$10 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/word~) main::$10
(word~) main::$11 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 40
(word) main::idx ← (word~) main::$11
(byte/signed byte/word/signed word/dword/signed dword~) main::$12 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte/signed byte/word/signed word/dword/signed dword~) main::$12
(byte/signed word/word/dword/signed dword~) main::$10 ← (byte) main::y + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y ← (byte/signed word/word/dword/signed dword~) main::$10
(word/signed dword/dword~) main::$11 ← (word) main::idx + (byte/signed byte/word/signed word/dword/signed dword) 40
(word) main::idx ← (word/signed dword/dword~) main::$11
(byte~) main::$12 ← (byte) main::e - (byte) main::xd
(byte) main::e ← (byte~) main::$12
to:main::@2
main::@4: scope:[main] from main::@2
to:main::@return
@ -179,17 +179,17 @@ main: scope:[main] from @1
(byte) main::y0#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) main::x1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 39
(byte) main::y1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 24
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
(byte) main::xd#0 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1 ← (byte) main::y1#0 - (byte) main::y0#0
(byte) main::yd#0 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
(byte) main::xd#0 ← (byte~) main::$0
(byte~) main::$1 ← (byte) main::y1#0 - (byte) main::y0#0
(byte) main::yd#0 ← (byte~) main::$1
(byte) main::x#0 ← (byte) main::x0#0
(byte) main::y#0 ← (byte) main::y0#0
(byte~) main::$2 ← (byte) main::yd#0 / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e#0 ← (byte~) main::$2
(byte~) main::$3 ← (byte) main::y#0 * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte/word~) main::$4 ← (byte) main::x#0 + (byte~) main::$3
(word) main::idx#0 ← (byte/word~) main::$4
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::yd#0 / (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::e#0 ← (byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte) main::y#0 * (byte/signed byte/word/signed word/dword/signed dword) 40
(byte/signed word/word/dword/signed dword~) main::$4 ← (byte) main::x#0 + (byte/signed word/word/dword/signed dword~) main::$3
(word) main::idx#0 ← (byte/signed word/word/dword/signed dword~) main::$4
to:main::@1
main::@1: scope:[main] from main main::@2
(byte) main::y#3 ← phi( main/(byte) main::y#0 main::@2/(byte) main::y#4 )
@ -201,12 +201,12 @@ main::@1: scope:[main] from main main::@2
(word) main::idx#3 ← phi( main/(word) main::idx#0 main::@2/(word) main::idx#5 )
(byte) main::STAR#1 ← phi( main/(byte) main::STAR#0 main::@2/(byte) main::STAR#2 )
*((byte[1000]) main::screen#0 + (word) main::idx#3) ← (byte) main::STAR#1
(byte/word~) main::$5 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x#1 ← (byte/word~) main::$5
(word~) main::$6 ← (word) main::idx#3 + (byte/signed byte/word/signed word/dword/signed dword) 1
(word) main::idx#1 ← (word~) main::$6
(byte/word~) main::$7 ← (byte) main::e#3 + (byte) main::yd#1
(byte) main::e#1 ← (byte/word~) main::$7
(byte/signed word/word/dword/signed dword~) main::$5 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::x#1 ← (byte/signed word/word/dword/signed dword~) main::$5
(word/signed dword/dword~) main::$6 ← (word) main::idx#3 + (byte/signed byte/word/signed word/dword/signed dword) 1
(word) main::idx#1 ← (word/signed dword/dword~) main::$6
(byte~) main::$7 ← (byte) main::e#3 + (byte) main::yd#1
(byte) main::e#1 ← (byte~) main::$7
(boolean~) main::$8 ← (byte) main::xd#1 < (byte) main::e#1
(boolean~) main::$9 ← ! (boolean~) main::$8
if((boolean~) main::$9) goto main::@2
@ -220,8 +220,8 @@ main::@2: scope:[main] from main::@1 main::@3
(byte) main::STAR#2 ← phi( main::@1/(byte) main::STAR#1 main::@3/(byte) main::STAR#3 )
(byte) main::x#3 ← phi( main::@1/(byte) main::x#1 main::@3/(byte) main::x#4 )
(byte) main::x1#1 ← phi( main::@1/(byte) main::x1#2 main::@3/(byte) main::x1#3 )
(byte/word~) main::$13 ← (byte) main::x1#1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$14 ← (byte) main::x#3 < (byte/word~) main::$13
(byte/signed word/word/dword/signed dword~) main::$13 ← (byte) main::x1#1 + (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) main::$14 ← (byte) main::x#3 < (byte/signed word/word/dword/signed dword~) main::$13
if((boolean~) main::$14) goto main::@1
to:main::@return
main::@3: scope:[main] from main::@1
@ -233,12 +233,12 @@ main::@3: scope:[main] from main::@1
(byte) main::e#4 ← phi( main::@1/(byte) main::e#1 )
(word) main::idx#4 ← phi( main::@1/(word) main::idx#1 )
(byte) main::y#2 ← phi( main::@1/(byte) main::y#3 )
(byte/word~) main::$10 ← (byte) main::y#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y#1 ← (byte/word~) main::$10
(word~) main::$11 ← (word) main::idx#4 + (byte/signed byte/word/signed word/dword/signed dword) 40
(word) main::idx#2 ← (word~) main::$11
(byte/signed byte/word/signed word/dword/signed dword~) main::$12 ← (byte) main::e#4 - (byte) main::xd#2
(byte) main::e#2 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$12
(byte/signed word/word/dword/signed dword~) main::$10 ← (byte) main::y#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::y#1 ← (byte/signed word/word/dword/signed dword~) main::$10
(word/signed dword/dword~) main::$11 ← (word) main::idx#4 + (byte/signed byte/word/signed word/dword/signed dword) 40
(word) main::idx#2 ← (word/signed dword/dword~) main::$11
(byte~) main::$12 ← (byte) main::e#4 - (byte) main::xd#2
(byte) main::e#2 ← (byte~) main::$12
to:main::@2
main::@return: scope:[main] from main::@2
return
@ -256,19 +256,19 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(void()) main()
(byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/signed byte/word/signed word/dword/signed dword~) main::$1
(byte/word~) main::$10
(word~) main::$11
(byte/signed byte/word/signed word/dword/signed dword~) main::$12
(byte/word~) main::$13
(byte~) main::$0
(byte~) main::$1
(byte/signed word/word/dword/signed dword~) main::$10
(word/signed dword/dword~) main::$11
(byte~) main::$12
(byte/signed word/word/dword/signed dword~) main::$13
(boolean~) main::$14
(byte~) main::$2
(byte~) main::$3
(byte/word~) main::$4
(byte/word~) main::$5
(word~) main::$6
(byte/word~) main::$7
(byte/signed word/word/dword/signed dword~) main::$2
(byte/signed word/word/dword/signed dword~) main::$3
(byte/signed word/word/dword/signed dword~) main::$4
(byte/signed word/word/dword/signed dword~) main::$5
(word/signed dword/dword~) main::$6
(byte~) main::$7
(boolean~) main::$8
(boolean~) main::$9
(label) main::@1
@ -335,23 +335,23 @@ Culled Empty Block (label) @2
Succesful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (boolean~) main::$9 ← (byte) main::xd#1 >= (byte) main::e#1 from (boolean~) main::$8 ← (byte) main::xd#1 < (byte) main::e#1
Succesful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::xd#0 = (byte/signed byte/word/signed word/dword/signed dword~) main::$0
Alias (byte) main::yd#0 = (byte/signed byte/word/signed word/dword/signed dword~) main::$1
Alias (byte) main::xd#0 = (byte~) main::$0
Alias (byte) main::yd#0 = (byte~) main::$1
Alias (byte) main::x#0 = (byte) main::x0#0
Alias (byte) main::y#0 = (byte) main::y0#0
Alias (byte) main::e#0 = (byte~) main::$2
Alias (word) main::idx#0 = (byte/word~) main::$4
Alias (byte) main::x#1 = (byte/word~) main::$5 (byte) main::x#4
Alias (word) main::idx#1 = (word~) main::$6 (word) main::idx#4
Alias (byte) main::e#1 = (byte/word~) main::$7 (byte) main::e#4
Alias (byte) main::e#0 = (byte/signed word/word/dword/signed dword~) main::$2
Alias (word) main::idx#0 = (byte/signed word/word/dword/signed dword~) main::$4
Alias (byte) main::x#1 = (byte/signed word/word/dword/signed dword~) main::$5 (byte) main::x#4
Alias (word) main::idx#1 = (word/signed dword/dword~) main::$6 (word) main::idx#4
Alias (byte) main::e#1 = (byte~) main::$7 (byte) main::e#4
Alias (byte) main::y#2 = (byte) main::y#3
Alias (byte) main::xd#1 = (byte) main::xd#2
Alias (byte) main::x1#2 = (byte) main::x1#3
Alias (byte) main::STAR#1 = (byte) main::STAR#3
Alias (byte) main::yd#1 = (byte) main::yd#3
Alias (byte) main::y#1 = (byte/word~) main::$10
Alias (word) main::idx#2 = (word~) main::$11
Alias (byte) main::e#2 = (byte/signed byte/word/signed word/dword/signed dword~) main::$12
Alias (byte) main::y#1 = (byte/signed word/word/dword/signed dword~) main::$10
Alias (word) main::idx#2 = (word/signed dword/dword~) main::$11
Alias (byte) main::e#2 = (byte~) main::$12
Succesful SSA optimization Pass2AliasElimination
Alias (byte) main::x1#1 = (byte) main::x1#2
Alias (byte) main::x#1 = (byte) main::x#3
@ -370,7 +370,7 @@ Redundant Phi (byte) main::xd#1 (byte) main::xd#0
Redundant Phi (byte) main::x1#1 (byte) main::x1#0
Succesful SSA optimization Pass2RedundantPhiElimination
Simple Condition (boolean~) main::$9 if((byte) main::xd#0>=(byte) main::e#1) goto main::@2
Simple Condition (boolean~) main::$14 if((byte) main::x#1<(byte/word~) main::$13) goto main::@1
Simple Condition (boolean~) main::$14 if((byte) main::x#1<(byte/signed word/word/dword/signed dword~) main::$13) goto main::@1
Succesful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte) main::STAR#0 = 81
Constant (const byte*) main::screen#0 = ((byte*))1024
@ -381,8 +381,8 @@ Constant (const byte) main::y1#0 = 24
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::xd#0 = main::x1#0-main::x#0
Constant (const byte) main::yd#0 = main::y1#0-main::y#0
Constant (const byte) main::$3 = main::y#0*40
Constant (const byte/word) main::$13 = main::x1#0+1
Constant (const byte/signed word/word/dword/signed dword) main::$3 = main::y#0*40
Constant (const byte/signed word/word/dword/signed dword) main::$13 = main::x1#0+1
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::e#0 = main::yd#0/2
Constant (const word) main::idx#0 = main::x#0+main::$3

View File

@ -7,8 +7,8 @@ main: {
.const min = $a
.const max = $c8
.label BGCOL = $d021
.const sumw = min+max
.const sumb = min+max
.const sumw = min+max
.const midb = (sumb>>1)+1
.const midw = (sumw>>1)+1
lda #midw

View File

@ -25,18 +25,18 @@ proc (void()) main()
(byte*) main::SCREEN ← (word/signed word/dword/signed dword) 1024
(byte) main::min ← (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) main::max ← (byte/word/signed word/dword/signed dword) 200
(byte/word~) main::$0 ← (byte) main::min + (byte) main::max
(word) main::sumw ← (byte/word~) main::$0
(byte~) main::$0 ← (byte) main::min + (byte) main::max
(word) main::sumw ← (byte~) main::$0
(word~) main::$1 ← (word) main::sumw >> (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) main::$2 ← ((byte)) (word~) main::$1
(byte/word~) main::$3 ← (byte~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midw ← (byte/word~) main::$3
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midw ← (byte/signed word/word/dword/signed dword~) main::$3
*((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) main::midw
(byte/word~) main::$4 ← (byte) main::min + (byte) main::max
(byte) main::sumb ← (byte/word~) main::$4
(byte~) main::$4 ← (byte) main::min + (byte) main::max
(byte) main::sumb ← (byte~) main::$4
(byte~) main::$5 ← (byte) main::sumb >> (byte/signed byte/word/signed word/dword/signed dword) 1
(byte/word~) main::$6 ← (byte~) main::$5 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midb ← (byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte~) main::$5 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midb ← (byte/signed word/word/dword/signed dword~) main::$6
*((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) main::midb
(byte*) main::BGCOL ← (word/dword/signed dword) 53281
(boolean~) main::$7 ← *((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) == *((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1)
@ -54,13 +54,13 @@ endproc // main()
SYMBOLS
(void()) main()
(byte/word~) main::$0
(byte~) main::$0
(word~) main::$1
(byte~) main::$2
(byte/word~) main::$3
(byte/word~) main::$4
(byte/signed word/word/dword/signed dword~) main::$3
(byte~) main::$4
(byte~) main::$5
(byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(label) main::@1
@ -76,6 +76,7 @@ SYMBOLS
(word) main::sumw
Promoting word/signed word/dword/signed dword to byte* in main::SCREEN ← ((byte*)) 1024
Promoting byte to word in main::sumw ← ((word)) main::$0
Promoting word/dword/signed dword to byte* in main::BGCOL ← ((byte*)) 53281
INITIAL CONTROL FLOW GRAPH
@begin: scope:[] from
@ -84,18 +85,18 @@ main: scope:[main] from
(byte*) main::SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
(byte) main::min ← (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) main::max ← (byte/word/signed word/dword/signed dword) 200
(byte/word~) main::$0 ← (byte) main::min + (byte) main::max
(word) main::sumw ← (byte/word~) main::$0
(byte~) main::$0 ← (byte) main::min + (byte) main::max
(word) main::sumw ← ((word)) (byte~) main::$0
(word~) main::$1 ← (word) main::sumw >> (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) main::$2 ← ((byte)) (word~) main::$1
(byte/word~) main::$3 ← (byte~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midw ← (byte/word~) main::$3
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midw ← (byte/signed word/word/dword/signed dword~) main::$3
*((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) main::midw
(byte/word~) main::$4 ← (byte) main::min + (byte) main::max
(byte) main::sumb ← (byte/word~) main::$4
(byte~) main::$4 ← (byte) main::min + (byte) main::max
(byte) main::sumb ← (byte~) main::$4
(byte~) main::$5 ← (byte) main::sumb >> (byte/signed byte/word/signed word/dword/signed dword) 1
(byte/word~) main::$6 ← (byte~) main::$5 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midb ← (byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte~) main::$5 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midb ← (byte/signed word/word/dword/signed dword~) main::$6
*((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) main::midb
(byte*) main::BGCOL ← ((byte*)) (word/dword/signed dword) 53281
(boolean~) main::$7 ← *((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) == *((byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1)
@ -133,18 +134,18 @@ main: scope:[main] from @1
(byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
(byte) main::min#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) main::max#0 ← (byte/word/signed word/dword/signed dword) 200
(byte/word~) main::$0 ← (byte) main::min#0 + (byte) main::max#0
(word) main::sumw#0 ← (byte/word~) main::$0
(byte~) main::$0 ← (byte) main::min#0 + (byte) main::max#0
(word) main::sumw#0 ← ((word)) (byte~) main::$0
(word~) main::$1 ← (word) main::sumw#0 >> (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) main::$2 ← ((byte)) (word~) main::$1
(byte/word~) main::$3 ← (byte~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midw#0 ← (byte/word~) main::$3
(byte/signed word/word/dword/signed dword~) main::$3 ← (byte~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midw#0 ← (byte/signed word/word/dword/signed dword~) main::$3
*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) main::midw#0
(byte/word~) main::$4 ← (byte) main::min#0 + (byte) main::max#0
(byte) main::sumb#0 ← (byte/word~) main::$4
(byte~) main::$4 ← (byte) main::min#0 + (byte) main::max#0
(byte) main::sumb#0 ← (byte~) main::$4
(byte~) main::$5 ← (byte) main::sumb#0 >> (byte/signed byte/word/signed word/dword/signed dword) 1
(byte/word~) main::$6 ← (byte~) main::$5 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midb#0 ← (byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte~) main::$5 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::midb#0 ← (byte/signed word/word/dword/signed dword~) main::$6
*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) main::midb#0
(byte*) main::BGCOL#0 ← ((byte*)) (word/dword/signed dword) 53281
(boolean~) main::$7 ← *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)
@ -175,13 +176,13 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(void()) main()
(byte/word~) main::$0
(byte~) main::$0
(word~) main::$1
(byte~) main::$2
(byte/word~) main::$3
(byte/word~) main::$4
(byte/signed word/word/dword/signed dword~) main::$3
(byte~) main::$4
(byte~) main::$5
(byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(label) main::@1
@ -211,10 +212,9 @@ Culled Empty Block (label) @2
Succesful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (boolean~) main::$8 ← *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) != *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) from (boolean~) main::$7 ← *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)
Succesful SSA optimization Pass2UnaryNotSimplification
Alias (word) main::sumw#0 = (byte/word~) main::$0
Alias (byte) main::midw#0 = (byte/word~) main::$3
Alias (byte) main::sumb#0 = (byte/word~) main::$4
Alias (byte) main::midb#0 = (byte/word~) main::$6
Alias (byte) main::midw#0 = (byte/signed word/word/dword/signed dword~) main::$3
Alias (byte) main::sumb#0 = (byte~) main::$4
Alias (byte) main::midb#0 = (byte/signed word/word/dword/signed dword~) main::$6
Alias (byte*) main::BGCOL#0 = (byte*) main::BGCOL#1 (byte*) main::BGCOL#2
Succesful SSA optimization Pass2AliasElimination
Simple Condition (boolean~) main::$8 if(*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)!=*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)) goto main::@1
@ -224,15 +224,17 @@ Constant (const byte) main::min#0 = 10
Constant (const byte) main::max#0 = 200
Constant (const byte*) main::BGCOL#0 = ((byte*))53281
Succesful SSA optimization Pass2ConstantIdentification
Constant (const word) main::sumw#0 = main::min#0+main::max#0
Constant (const byte) main::$0 = main::min#0+main::max#0
Constant (const byte) main::sumb#0 = main::min#0+main::max#0
Succesful SSA optimization Pass2ConstantIdentification
Constant (const word) main::$1 = main::sumw#0>>1
Constant (const word) main::sumw#0 = ((word))main::$0
Constant (const byte) main::$5 = main::sumb#0>>1
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$2 = ((byte))main::$1
Constant (const word) main::$1 = main::sumw#0>>1
Constant (const byte) main::midb#0 = main::$5+1
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$2 = ((byte))main::$1
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::midw#0 = main::$2+1
Succesful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in *(main::SCREEN#0+0)
@ -244,6 +246,7 @@ OPTIMIZING CONTROL FLOW GRAPH
Constant inlined main::$5 = (const byte) main::sumb#0>>(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::$1 = (const word) main::sumw#0>>(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::$2 = ((byte))(const word) main::sumw#0>>(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined main::$0 = (const byte) main::min#0+(const byte) main::max#0
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @1 @end main main::@3 main::@return main::@1
Block Sequence Planned @begin @1 @end main main::@3 main::@return main::@1
@ -343,8 +346,8 @@ main: {
.const min = $a
.const max = $c8
.label BGCOL = $d021
.const sumw = min+max
.const sumb = min+max
.const sumw = min+max
.const midb = (sumb>>1)+1
.const midw = (sumw>>1)+1
//SEG9 [4] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (const byte) main::midw#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
@ -418,8 +421,8 @@ main: {
.const min = $a
.const max = $c8
.label BGCOL = $d021
.const sumw = min+max
.const sumb = min+max
.const sumw = min+max
.const midb = (sumb>>1)+1
.const midw = (sumw>>1)+1
//SEG9 [4] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (const byte) main::midw#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
@ -492,7 +495,7 @@ FINAL SYMBOL TABLE
(byte) main::sumb
(const byte) main::sumb#0 sumb = (const byte) main::min#0+(const byte) main::max#0
(word) main::sumw
(const word) main::sumw#0 sumw = (const byte) main::min#0+(const byte) main::max#0
(const word) main::sumw#0 sumw = ((word))(const byte) main::min#0+(const byte) main::max#0
@ -517,8 +520,8 @@ main: {
.const min = $a
.const max = $c8
.label BGCOL = $d021
.const sumw = min+max
.const sumb = min+max
.const sumw = min+max
.const midb = (sumb>>1)+1
.const midw = (sumw>>1)+1
//SEG9 [4] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (const byte) main::midw#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2

View File

@ -20,5 +20,5 @@
(byte) main::sumb
(const byte) main::sumb#0 sumb = (const byte) main::min#0+(const byte) main::max#0
(word) main::sumw
(const word) main::sumw#0 sumw = (const byte) main::min#0+(const byte) main::max#0
(const word) main::sumw#0 sumw = ((word))(const byte) main::min#0+(const byte) main::max#0

View File

@ -43,8 +43,8 @@ STATEMENTS
proc (void()) main()
(byte) main::b ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@1:
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte/word/signed word/dword/signed dword) 200 - (byte) main::b
(byte) main::b2 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/word/signed word/dword/signed dword~) main::$0 ← (byte/word/signed word/dword/signed dword) 200 - (byte) main::b
(byte) main::b2 ← (byte/word/signed word/dword/signed dword~) main::$0
*((byte*) SCREEN + (byte) main::b) ← (byte) main::b2
(signed byte~) main::$1 ← ((signed byte)) (byte) main::b
(signed byte~) main::$2 ← - (signed byte~) main::$1
@ -67,8 +67,8 @@ w::@1:
(byte~) w::$1 ← ((byte)) (word~) w::$0
(byte) w::b ← (byte~) w::$1
(byte/signed byte/word/signed word/dword/signed dword~) w::$2 ← (word/signed word/dword/signed dword) 1400 - (word/signed word/dword/signed dword) 1350
(byte/word~) w::$3 ← (byte/signed byte/word/signed word/dword/signed dword~) w::$2 + (byte) w::i
(byte) w::b2 ← (byte/word~) w::$3
(byte/signed word/word/dword/signed dword~) w::$3 ← (byte/signed byte/word/signed word/dword/signed dword~) w::$2 + (byte) w::i
(byte) w::b2 ← (byte/signed word/word/dword/signed dword~) w::$3
*((byte*) SCREEN3 + (byte) w::i) ← (byte) w::b
*((byte*) SCREEN4 + (byte) w::i) ← (byte) w::b2
(byte) w::i ← ++ (byte) w::i
@ -91,7 +91,7 @@ SYMBOLS
(byte*) SCREEN3
(byte*) SCREEN4
(void()) main()
(byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/word/signed word/dword/signed dword~) main::$0
(signed byte~) main::$1
(signed byte~) main::$2
(byte~) main::$3
@ -106,7 +106,7 @@ SYMBOLS
(word~) w::$0
(byte~) w::$1
(byte/signed byte/word/signed word/dword/signed dword~) w::$2
(byte/word~) w::$3
(byte/signed word/word/dword/signed dword~) w::$3
(boolean~) w::$4
(label) w::@1
(label) w::@return
@ -134,8 +134,8 @@ main: scope:[main] from
(byte) main::b ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte/word/signed word/dword/signed dword) 200 - (byte) main::b
(byte) main::b2 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/word/signed word/dword/signed dword~) main::$0 ← (byte/word/signed word/dword/signed dword) 200 - (byte) main::b
(byte) main::b2 ← (byte/word/signed word/dword/signed dword~) main::$0
*((byte*) SCREEN + (byte) main::b) ← (byte) main::b2
(signed byte~) main::$1 ← ((signed byte)) (byte) main::b
(signed byte~) main::$2 ← - (signed byte~) main::$1
@ -164,8 +164,8 @@ w::@1: scope:[w] from w w::@1
(byte~) w::$1 ← ((byte)) (word~) w::$0
(byte) w::b ← (byte~) w::$1
(byte/signed byte/word/signed word/dword/signed dword~) w::$2 ← (word/signed word/dword/signed dword) 1400 - (word/signed word/dword/signed dword) 1350
(byte/word~) w::$3 ← (byte/signed byte/word/signed word/dword/signed dword~) w::$2 + (byte) w::i
(byte) w::b2 ← (byte/word~) w::$3
(byte/signed word/word/dword/signed dword~) w::$3 ← (byte/signed byte/word/signed word/dword/signed dword~) w::$2 + (byte) w::i
(byte) w::b2 ← (byte/signed word/word/dword/signed dword~) w::$3
*((byte*) SCREEN3 + (byte) w::i) ← (byte) w::b
*((byte*) SCREEN4 + (byte) w::i) ← (byte) w::b2
(byte) w::i ← ++ (byte) w::i
@ -220,8 +220,8 @@ main::@1: scope:[main] from main main::@1
(byte*) SCREEN2#1 ← phi( main/(byte*) SCREEN2#2 main::@1/(byte*) SCREEN2#1 )
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#2 main::@1/(byte*) SCREEN#1 )
(byte) main::b#2 ← phi( main/(byte) main::b#0 main::@1/(byte) main::b#1 )
(byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte/word/signed word/dword/signed dword) 200 - (byte) main::b#2
(byte) main::b2#0 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/word/signed word/dword/signed dword~) main::$0 ← (byte/word/signed word/dword/signed dword) 200 - (byte) main::b#2
(byte) main::b2#0 ← (byte/word/signed word/dword/signed dword~) main::$0
*((byte*) SCREEN#1 + (byte) main::b#2) ← (byte) main::b2#0
(signed byte~) main::$1 ← ((signed byte)) (byte) main::b#2
(signed byte~) main::$2 ← - (signed byte~) main::$1
@ -257,8 +257,8 @@ w::@1: scope:[w] from w w::@1
(byte~) w::$1 ← ((byte)) (word~) w::$0
(byte) w::b#0 ← (byte~) w::$1
(byte/signed byte/word/signed word/dword/signed dword~) w::$2 ← (word/signed word/dword/signed dword) 1400 - (word/signed word/dword/signed dword) 1350
(byte/word~) w::$3 ← (byte/signed byte/word/signed word/dword/signed dword~) w::$2 + (byte) w::i#2
(byte) w::b2#0 ← (byte/word~) w::$3
(byte/signed word/word/dword/signed dword~) w::$3 ← (byte/signed byte/word/signed word/dword/signed dword~) w::$2 + (byte) w::i#2
(byte) w::b2#0 ← (byte/signed word/word/dword/signed dword~) w::$3
*((byte*) SCREEN3#1 + (byte) w::i#2) ← (byte) w::b#0
*((byte*) SCREEN4#1 + (byte) w::i#2) ← (byte) w::b2#0
(byte) w::i#1 ← ++ (byte) w::i#2
@ -317,7 +317,7 @@ SYMBOL TABLE SSA
(byte*) SCREEN4#5
(byte*) SCREEN4#6
(void()) main()
(byte/signed byte/word/signed word/dword/signed dword~) main::$0
(byte/word/signed word/dword/signed dword~) main::$0
(signed byte~) main::$1
(signed byte~) main::$2
(byte~) main::$3
@ -338,7 +338,7 @@ SYMBOL TABLE SSA
(word~) w::$0
(byte~) w::$1
(byte/signed byte/word/signed word/dword/signed dword~) w::$2
(byte/word~) w::$3
(byte/signed word/word/dword/signed dword~) w::$3
(boolean~) w::$4
(label) w::@1
(label) w::@return
@ -368,12 +368,12 @@ Not aliassing across scopes: SCREEN4#2 SCREEN4#3
Alias (byte*) SCREEN2#0 = (byte*~) $1 (byte*) SCREEN2#3
Alias (byte*) SCREEN3#0 = (byte*~) $3 (byte*) SCREEN3#6
Alias (byte*) SCREEN4#0 = (byte*~) $5 (byte*) SCREEN4#6
Alias (byte) main::b2#0 = (byte/signed byte/word/signed word/dword/signed dword~) main::$0
Alias (byte) main::b2#0 = (byte/word/signed word/dword/signed dword~) main::$0
Alias (signed byte) main::sb#0 = (signed byte~) main::$2
Alias (byte*) SCREEN3#3 = (byte*) SCREEN3#4
Alias (byte*) SCREEN4#3 = (byte*) SCREEN4#4
Alias (byte) w::b#0 = (byte~) w::$1
Alias (byte) w::b2#0 = (byte/word~) w::$3
Alias (byte) w::b2#0 = (byte/signed word/word/dword/signed dword~) w::$3
Alias (byte*) SCREEN#0 = (byte*) SCREEN#3
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: SCREEN#2 SCREEN#0

View File

@ -49,8 +49,8 @@ line::@1: scope:[line] from line
plot: scope:[plot] from line::@1 line::@2
[23] (byte) plot::x#2 ← phi( line::@1/(const byte) line::x0#0 line::@2/(byte) plot::x#1 ) [ plot::x#2 ] ( main:2::line:11::plot:17 [ line::x#2 plot::x#2 ] main:2::line:11::plot:22 [ plot::x#2 ] )
[24] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#2) [ plot::idx#0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 ] main:2::line:11::plot:22 [ plot::idx#0 ] )
[25] (byte/word~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] )
[26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/word~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] )
[25] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] )
[26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] )
to:plot::@return
plot::@return: scope:[plot] from plot
[27] return [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] )

View File

@ -65,8 +65,8 @@ line::@return:
endproc // line()
proc (void()) plot((byte) plot::x)
(byte) plot::idx ← *((byte*) plots + (byte) plot::x)
(byte/word~) plot::$0 ← *((byte*) SCREEN + (byte) plot::idx) + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) plot::idx) ← (byte/word~) plot::$0
(byte/signed word/word/dword/signed dword~) plot::$0 ← *((byte*) SCREEN + (byte) plot::idx) + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) plot::idx) ← (byte/signed word/word/dword/signed dword~) plot::$0
plot::@return:
return
endproc // plot()
@ -95,7 +95,7 @@ SYMBOLS
(label) main::@return
(byte) main::i
(void()) plot((byte) plot::x)
(byte/word~) plot::$0
(byte/signed word/word/dword/signed dword~) plot::$0
(label) plot::@return
(byte) plot::idx
(byte) plot::x
@ -161,8 +161,8 @@ line::@return: scope:[line] from line::@3
to:@3
plot: scope:[plot] from
(byte) plot::idx ← *((byte*) plots + (byte) plot::x)
(byte/word~) plot::$0 ← *((byte*) SCREEN + (byte) plot::idx) + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) plot::idx) ← (byte/word~) plot::$0
(byte/signed word/word/dword/signed dword~) plot::$0 ← *((byte*) SCREEN + (byte) plot::idx) + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) plot::idx) ← (byte/signed word/word/dword/signed dword~) plot::$0
to:plot::@return
plot::@return: scope:[plot] from plot
return
@ -253,8 +253,8 @@ line::@return: scope:[line] from line::@7 line::@8
plot: scope:[plot] from line::@1 line::@2
(byte) plot::x#2 ← phi( line::@1/(byte) plot::x#0 line::@2/(byte) plot::x#1 )
(byte) plot::idx#0 ← *((byte*) plots#0 + (byte) plot::x#2)
(byte/word~) plot::$0 ← *((byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/word~) plot::$0
(byte/signed word/word/dword/signed dword~) plot::$0 ← *((byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0
to:plot::@return
plot::@return: scope:[plot] from plot
return
@ -310,7 +310,7 @@ SYMBOL TABLE SSA
(byte) main::i#1
(byte) main::i#2
(void()) plot((byte) plot::x)
(byte/word~) plot::$0
(byte/signed word/word/dword/signed dword~) plot::$0
(label) plot::@return
(byte) plot::idx
(byte) plot::idx#0
@ -467,8 +467,8 @@ line::@1: scope:[line] from line
plot: scope:[plot] from line::@1 line::@2
[23] (byte) plot::x#2 ← phi( line::@1/(const byte) line::x0#0 line::@2/(byte) plot::x#1 ) [ plot::x#2 ] ( main:2::line:11::plot:17 [ line::x#2 plot::x#2 ] main:2::line:11::plot:22 [ plot::x#2 ] )
[24] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#2) [ plot::idx#0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 ] main:2::line:11::plot:22 [ plot::idx#0 ] )
[25] (byte/word~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] )
[26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/word~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] )
[25] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] )
[26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] )
to:plot::@return
plot::@return: scope:[plot] from plot
[27] return [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] )
@ -528,7 +528,7 @@ VARIABLE REGISTER WEIGHTS
(byte) main::i#1 16.5
(byte) main::i#2 18.333333333333332
(void()) plot((byte) plot::x)
(byte/word~) plot::$0 4.0
(byte/signed word/word/dword/signed dword~) plot::$0 4.0
(byte) plot::idx
(byte) plot::idx#0 3.0
(byte) plot::x
@ -692,13 +692,13 @@ plot: {
ldy x
lda plots,y
sta idx
//SEG49 [25] (byte/word~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) -- vbuz1=pbuc1_derefidx_vbuz2_plus_1
//SEG49 [25] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) -- vbuz1=pbuc1_derefidx_vbuz2_plus_1
ldy idx
lda SCREEN,y
clc
adc #1
sta _0
//SEG50 [26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/word~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] ) -- pbuc1_derefidx_vbuz1=vbuz2
//SEG50 [26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] ) -- pbuc1_derefidx_vbuz1=vbuz2
lda _0
ldy idx
sta SCREEN,y
@ -713,13 +713,13 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Statement [14] if((const byte) line::x0#0>=(const byte) line::x1#0) goto line::@1 [ ] ( main:2::line:11 [ ] ) always clobbers reg byte a
Statement [25] (byte/word~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) always clobbers reg byte a
Statement [25] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ line::x#2 line::x#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ plot::idx#0 ]
Statement [6] *((const byte*) plots#0 + (byte) main::i#2) ← (byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [7] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
Statement [14] if((const byte) line::x0#0>=(const byte) line::x1#0) goto line::@1 [ ] ( main:2::line:11 [ ] ) always clobbers reg byte a
Statement [25] (byte/word~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) always clobbers reg byte a
Statement [25] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ line::x#2 line::x#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:4 [ plot::x#2 plot::x#1 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y ,
@ -866,11 +866,11 @@ line: {
plot: {
//SEG48 [24] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#2) [ plot::idx#0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 ] main:2::line:11::plot:22 [ plot::idx#0 ] ) -- vbuyy=pbuc1_derefidx_vbuxx
ldy plots,x
//SEG49 [25] (byte/word~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) -- vbuaa=pbuc1_derefidx_vbuyy_plus_1
//SEG49 [25] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) -- vbuaa=pbuc1_derefidx_vbuyy_plus_1
lda SCREEN,y
clc
adc #1
//SEG50 [26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/word~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] ) -- pbuc1_derefidx_vbuyy=vbuaa
//SEG50 [26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] ) -- pbuc1_derefidx_vbuyy=vbuaa
sta SCREEN,y
jmp breturn
//SEG51 plot::@return
@ -952,7 +952,7 @@ FINAL SYMBOL TABLE
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 18.333333333333332
(void()) plot((byte) plot::x)
(byte/word~) plot::$0 reg byte a 4.0
(byte/signed word/word/dword/signed dword~) plot::$0 reg byte a 4.0
(label) plot::@return
(byte) plot::idx
(byte) plot::idx#0 reg byte y 3.0
@ -1065,11 +1065,11 @@ line: {
plot: {
//SEG48 [24] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#2) [ plot::idx#0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 ] main:2::line:11::plot:22 [ plot::idx#0 ] ) -- vbuyy=pbuc1_derefidx_vbuxx
ldy plots,x
//SEG49 [25] (byte/word~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) -- vbuaa=pbuc1_derefidx_vbuyy_plus_1
//SEG49 [25] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:17 [ line::x#2 plot::idx#0 plot::$0 ] main:2::line:11::plot:22 [ plot::idx#0 plot::$0 ] ) -- vbuaa=pbuc1_derefidx_vbuyy_plus_1
lda SCREEN,y
clc
adc #1
//SEG50 [26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/word~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] ) -- pbuc1_derefidx_vbuyy=vbuaa
//SEG50 [26] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] ) -- pbuc1_derefidx_vbuyy=vbuaa
sta SCREEN,y
//SEG51 plot::@return
//SEG52 [27] return [ ] ( main:2::line:11::plot:17 [ line::x#2 ] main:2::line:11::plot:22 [ ] )

View File

@ -24,7 +24,7 @@
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 18.333333333333332
(void()) plot((byte) plot::x)
(byte/word~) plot::$0 reg byte a 4.0
(byte/signed word/word/dword/signed dword~) plot::$0 reg byte a 4.0
(label) plot::@return
(byte) plot::idx
(byte) plot::idx#0 reg byte y 3.0

View File

@ -28,8 +28,8 @@ proc (void()) main()
*((byte*) BGCOL) ← (byte) RED
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 40
main::@1:
(byte/word~) main::$0 ← (byte) STAR + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) main::i) ← (byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) STAR + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) main::i) ← (byte/signed word/word/dword/signed dword~) main::$0
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$1 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 80
if((boolean~) main::$1) goto main::@1
@ -48,7 +48,7 @@ SYMBOLS
(byte) STAR
(byte*) VIC
(void()) main()
(byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0
(boolean~) main::$1
(label) main::@1
(label) main::@return
@ -73,8 +73,8 @@ main: scope:[main] from
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 40
to:main::@1
main::@1: scope:[main] from main main::@1
(byte/word~) main::$0 ← (byte) STAR + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) main::i) ← (byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) STAR + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN + (byte) main::i) ← (byte/signed word/word/dword/signed dword~) main::$0
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$1 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 80
if((boolean~) main::$1) goto main::@1
@ -115,8 +115,8 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
(byte/word~) main::$0 ← (byte) STAR#0 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) STAR#0 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte/signed word/word/dword/signed dword~) main::$0
(byte) main::i#1 ← ++ (byte) main::i#2
(boolean~) main::$1 ← (byte) main::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 80
if((boolean~) main::$1) goto main::@1
@ -156,7 +156,7 @@ SYMBOL TABLE SSA
(byte*) VIC
(byte*) VIC#0
(void()) main()
(byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0
(boolean~) main::$1
(label) main::@1
(label) main::@return
@ -188,7 +188,7 @@ Constant (const byte) RED#0 = 2
Constant (const byte) main::i#0 = 40
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte*) $1 = VIC#0+$0
Constant (const byte/word) main::$0 = STAR#0+1
Constant (const byte/signed word/word/dword/signed dword) main::$0 = STAR#0+1
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte*) BGCOL#0 = $1+1
Succesful SSA optimization Pass2ConstantIdentification

View File

@ -17,7 +17,7 @@ void test_bytes() {
assert_byte("0=0@", bb, 0);
byte bc=bb+2;
assert_byte("0+2=2@", bc, 2);
byte bd=(byte)(bc-4);
byte bd=(byte)((signed byte)bc-4);
assert_byte("0+2-4=254@", bd, 254);
}
@ -275,13 +275,14 @@ endproc // main()
proc (void()) test_bytes()
(byte) test_bytes::bb ← (byte/signed byte/word/signed word/dword/signed dword) 0
(void~) test_bytes::$0 ← call assert_byte (string) "0=0@" (byte) test_bytes::bb (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) test_bytes::$1 ← (byte) test_bytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bc ← (byte/word~) test_bytes::$1
(byte/signed word/word/dword/signed dword~) test_bytes::$1 ← (byte) test_bytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bc ← (byte/signed word/word/dword/signed dword~) test_bytes::$1
(void~) test_bytes::$2 ← call assert_byte (string) "0+2=2@" (byte) test_bytes::bc (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3 ← (byte) test_bytes::bc - (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) test_bytes::$4 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3
(byte) test_bytes::bd ← (byte~) test_bytes::$4
(void~) test_bytes::$5 ← call assert_byte (string) "0+2-4=254@" (byte) test_bytes::bd (byte/word/signed word/dword/signed dword) 254
(signed byte~) test_bytes::$3 ← ((signed byte)) (byte) test_bytes::bc
(signed word/signed byte/signed dword~) test_bytes::$4 ← (signed byte~) test_bytes::$3 - (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) test_bytes::$5 ← ((byte)) (signed word/signed byte/signed dword~) test_bytes::$4
(byte) test_bytes::bd ← (byte~) test_bytes::$5
(void~) test_bytes::$6 ← call assert_byte (string) "0+2-4=254@" (byte) test_bytes::bd (byte/word/signed word/dword/signed dword) 254
test_bytes::@return:
return
endproc // test_bytes()
@ -304,19 +305,19 @@ endproc // assert_byte()
proc (void()) test_sbytes()
(signed byte) test_sbytes::bb ← (byte/signed byte/word/signed word/dword/signed dword) 0
(void~) test_sbytes::$0 ← call assert_sbyte (string) "0=0@" (signed byte) test_sbytes::bb (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1 ← (signed byte) test_sbytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte) test_sbytes::bc ← (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1
(signed word/signed byte/signed dword~) test_sbytes::$1 ← (signed byte) test_sbytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte) test_sbytes::bc ← (signed word/signed byte/signed dword~) test_sbytes::$1
(void~) test_sbytes::$2 ← call assert_sbyte (string) "0+2=2@" (signed byte) test_sbytes::bc (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3 ← (signed byte) test_sbytes::bc - (byte/signed byte/word/signed word/dword/signed dword) 4
(signed byte) test_sbytes::bd ← (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3
(signed word/signed byte/signed dword~) test_sbytes::$3 ← (signed byte) test_sbytes::bc - (byte/signed byte/word/signed word/dword/signed dword) 4
(signed byte) test_sbytes::bd ← (signed word/signed byte/signed dword~) test_sbytes::$3
(signed byte/signed word/signed dword~) test_sbytes::$4 ← - (byte/signed byte/word/signed word/dword/signed dword) 2
(void~) test_sbytes::$5 ← call assert_sbyte (string) "0+2-4=-2@" (signed byte) test_sbytes::bd (signed byte/signed word/signed dword~) test_sbytes::$4
(signed byte~) test_sbytes::$6 ← - (signed byte) test_sbytes::bd
(signed byte) test_sbytes::be ← (signed byte~) test_sbytes::$6
(void~) test_sbytes::$7 ← call assert_sbyte (string) "-(0+2-4)=2@" (signed byte) test_sbytes::be (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte/signed word/signed dword~) test_sbytes::$8 ← - (byte/signed byte/word/signed word/dword/signed dword) 127
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9 ← (signed byte/signed word/signed dword~) test_sbytes::$8 - (byte/signed byte/word/signed word/dword/signed dword) 127
(signed byte~) test_sbytes::$10 ← ((signed byte)) (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9
(signed word/signed byte/signed dword~) test_sbytes::$9 ← (signed byte/signed word/signed dword~) test_sbytes::$8 - (byte/signed byte/word/signed word/dword/signed dword) 127
(signed byte~) test_sbytes::$10 ← ((signed byte)) (signed word/signed byte/signed dword~) test_sbytes::$9
(signed byte) test_sbytes::bf ← (signed byte~) test_sbytes::$10
(void~) test_sbytes::$11 ← call assert_sbyte (string) "-127-127=2@" (signed byte) test_sbytes::bf (byte/signed byte/word/signed word/dword/signed dword) 2
test_sbytes::@return:
@ -455,28 +456,29 @@ SYMBOLS
(word) print_word::w
(void()) test_bytes()
(void~) test_bytes::$0
(byte/word~) test_bytes::$1
(byte/signed word/word/dword/signed dword~) test_bytes::$1
(void~) test_bytes::$2
(byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3
(byte~) test_bytes::$4
(void~) test_bytes::$5
(signed byte~) test_bytes::$3
(signed word/signed byte/signed dword~) test_bytes::$4
(byte~) test_bytes::$5
(void~) test_bytes::$6
(label) test_bytes::@return
(byte) test_bytes::bb
(byte) test_bytes::bc
(byte) test_bytes::bd
(void()) test_sbytes()
(void~) test_sbytes::$0
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1
(signed word/signed byte/signed dword~) test_sbytes::$1
(signed byte~) test_sbytes::$10
(void~) test_sbytes::$11
(void~) test_sbytes::$2
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3
(signed word/signed byte/signed dword~) test_sbytes::$3
(signed byte/signed word/signed dword~) test_sbytes::$4
(void~) test_sbytes::$5
(signed byte~) test_sbytes::$6
(void~) test_sbytes::$7
(signed byte/signed word/signed dword~) test_sbytes::$8
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9
(signed word/signed byte/signed dword~) test_sbytes::$9
(label) test_sbytes::@return
(signed byte) test_sbytes::bb
(signed byte) test_sbytes::bc
@ -668,13 +670,14 @@ main::@return: scope:[main] from main
test_bytes: scope:[test_bytes] from
(byte) test_bytes::bb ← (byte/signed byte/word/signed word/dword/signed dword) 0
(void~) test_bytes::$0 ← call assert_byte (string) "0=0@" (byte) test_bytes::bb (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) test_bytes::$1 ← (byte) test_bytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bc ← (byte/word~) test_bytes::$1
(byte/signed word/word/dword/signed dword~) test_bytes::$1 ← (byte) test_bytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bc ← (byte/signed word/word/dword/signed dword~) test_bytes::$1
(void~) test_bytes::$2 ← call assert_byte (string) "0+2=2@" (byte) test_bytes::bc (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3 ← (byte) test_bytes::bc - (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) test_bytes::$4 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3
(byte) test_bytes::bd ← (byte~) test_bytes::$4
(void~) test_bytes::$5 ← call assert_byte (string) "0+2-4=254@" (byte) test_bytes::bd (byte/word/signed word/dword/signed dword) 254
(signed byte~) test_bytes::$3 ← ((signed byte)) (byte) test_bytes::bc
(signed word/signed byte/signed dword~) test_bytes::$4 ← (signed byte~) test_bytes::$3 - (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) test_bytes::$5 ← ((byte)) (signed word/signed byte/signed dword~) test_bytes::$4
(byte) test_bytes::bd ← (byte~) test_bytes::$5
(void~) test_bytes::$6 ← call assert_byte (string) "0+2-4=254@" (byte) test_bytes::bd (byte/word/signed word/dword/signed dword) 254
to:test_bytes::@return
test_bytes::@return: scope:[test_bytes] from test_bytes
return
@ -708,19 +711,19 @@ assert_byte::@return: scope:[assert_byte] from assert_byte::@2
test_sbytes: scope:[test_sbytes] from
(signed byte) test_sbytes::bb ← (byte/signed byte/word/signed word/dword/signed dword) 0
(void~) test_sbytes::$0 ← call assert_sbyte (string) "0=0@" (signed byte) test_sbytes::bb (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1 ← (signed byte) test_sbytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte) test_sbytes::bc ← (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1
(signed word/signed byte/signed dword~) test_sbytes::$1 ← (signed byte) test_sbytes::bb + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte) test_sbytes::bc ← (signed word/signed byte/signed dword~) test_sbytes::$1
(void~) test_sbytes::$2 ← call assert_sbyte (string) "0+2=2@" (signed byte) test_sbytes::bc (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3 ← (signed byte) test_sbytes::bc - (byte/signed byte/word/signed word/dword/signed dword) 4
(signed byte) test_sbytes::bd ← (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3
(signed word/signed byte/signed dword~) test_sbytes::$3 ← (signed byte) test_sbytes::bc - (byte/signed byte/word/signed word/dword/signed dword) 4
(signed byte) test_sbytes::bd ← (signed word/signed byte/signed dword~) test_sbytes::$3
(signed byte/signed word/signed dword~) test_sbytes::$4 ← - (byte/signed byte/word/signed word/dword/signed dword) 2
(void~) test_sbytes::$5 ← call assert_sbyte (string) "0+2-4=-2@" (signed byte) test_sbytes::bd (signed byte/signed word/signed dword~) test_sbytes::$4
(signed byte~) test_sbytes::$6 ← - (signed byte) test_sbytes::bd
(signed byte) test_sbytes::be ← (signed byte~) test_sbytes::$6
(void~) test_sbytes::$7 ← call assert_sbyte (string) "-(0+2-4)=2@" (signed byte) test_sbytes::be (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte/signed word/signed dword~) test_sbytes::$8 ← - (byte/signed byte/word/signed word/dword/signed dword) 127
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9 ← (signed byte/signed word/signed dword~) test_sbytes::$8 - (byte/signed byte/word/signed word/dword/signed dword) 127
(signed byte~) test_sbytes::$10 ← ((signed byte)) (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9
(signed word/signed byte/signed dword~) test_sbytes::$9 ← (signed byte/signed word/signed dword~) test_sbytes::$8 - (byte/signed byte/word/signed word/dword/signed dword) 127
(signed byte~) test_sbytes::$10 ← ((signed byte)) (signed word/signed byte/signed dword~) test_sbytes::$9
(signed byte) test_sbytes::bf ← (signed byte~) test_sbytes::$10
(void~) test_sbytes::$11 ← call assert_sbyte (string) "-127-127=2@" (signed byte) test_sbytes::bf (byte/signed byte/word/signed word/dword/signed dword) 2
to:test_sbytes::@return
@ -768,7 +771,7 @@ Eliminating unused variable - keeping the call (void~) main::$1
Eliminating unused variable - keeping the call (void~) main::$2
Eliminating unused variable - keeping the call (void~) test_bytes::$0
Eliminating unused variable - keeping the call (void~) test_bytes::$2
Eliminating unused variable - keeping the call (void~) test_bytes::$5
Eliminating unused variable - keeping the call (void~) test_bytes::$6
Eliminating unused variable - keeping the call (void~) assert_byte::$0
Eliminating unused variable - keeping the call (void~) assert_byte::$1
Eliminating unused variable - keeping the call (void~) assert_byte::$5
@ -970,8 +973,8 @@ test_bytes::@1: scope:[test_bytes] from test_bytes
(byte*) char_cursor#43 ← phi( test_bytes/(byte*) char_cursor#20 )
(byte*) char_cursor#11 ← (byte*) char_cursor#43
(byte*) line_cursor#9 ← (byte*) line_cursor#32
(byte/word~) test_bytes::$1 ← (byte) test_bytes::bb#1 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bc#0 ← (byte/word~) test_bytes::$1
(byte/signed word/word/dword/signed dword~) test_bytes::$1 ← (byte) test_bytes::bb#1 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bc#0 ← (byte/signed word/word/dword/signed dword~) test_bytes::$1
(byte*) assert_byte::msg#1 ← (const string) test_bytes::msg1
(byte) assert_byte::b#1 ← (byte) test_bytes::bc#0
(byte) assert_byte::c#1 ← (byte/signed byte/word/signed word/dword/signed dword) 2
@ -983,9 +986,10 @@ test_bytes::@2: scope:[test_bytes] from test_bytes::@1
(byte*) char_cursor#44 ← phi( test_bytes::@1/(byte*) char_cursor#20 )
(byte*) char_cursor#12 ← (byte*) char_cursor#44
(byte*) line_cursor#10 ← (byte*) line_cursor#33
(byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3 ← (byte) test_bytes::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) test_bytes::$4 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3
(byte) test_bytes::bd#0 ← (byte~) test_bytes::$4
(signed byte~) test_bytes::$3 ← ((signed byte)) (byte) test_bytes::bc#1
(signed word/signed byte/signed dword~) test_bytes::$4 ← (signed byte~) test_bytes::$3 - (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) test_bytes::$5 ← ((byte)) (signed word/signed byte/signed dword~) test_bytes::$4
(byte) test_bytes::bd#0 ← (byte~) test_bytes::$5
(byte*) assert_byte::msg#2 ← (const string) test_bytes::msg2
(byte) assert_byte::b#2 ← (byte) test_bytes::bd#0
(byte) assert_byte::c#2 ← (byte/word/signed word/dword/signed dword) 254
@ -1088,8 +1092,8 @@ test_sbytes::@1: scope:[test_sbytes] from test_sbytes
(byte*) char_cursor#53 ← phi( test_sbytes/(byte*) char_cursor#32 )
(byte*) char_cursor#21 ← (byte*) char_cursor#53
(byte*) line_cursor#15 ← (byte*) line_cursor#38
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1 ← (signed byte) test_sbytes::bb#1 + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte) test_sbytes::bc#0 ← (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1
(signed word/signed byte/signed dword~) test_sbytes::$1 ← (signed byte) test_sbytes::bb#1 + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed byte) test_sbytes::bc#0 ← (signed word/signed byte/signed dword~) test_sbytes::$1
(byte*) assert_sbyte::msg#1 ← (const string) test_sbytes::msg1
(signed byte) assert_sbyte::b#1 ← (signed byte) test_sbytes::bc#0
(signed byte) assert_sbyte::c#1 ← (byte/signed byte/word/signed word/dword/signed dword) 2
@ -1101,8 +1105,8 @@ test_sbytes::@2: scope:[test_sbytes] from test_sbytes::@1
(byte*) char_cursor#54 ← phi( test_sbytes::@1/(byte*) char_cursor#32 )
(byte*) char_cursor#22 ← (byte*) char_cursor#54
(byte*) line_cursor#16 ← (byte*) line_cursor#39
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3 ← (signed byte) test_sbytes::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) 4
(signed byte) test_sbytes::bd#0 ← (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3
(signed word/signed byte/signed dword~) test_sbytes::$3 ← (signed byte) test_sbytes::bc#1 - (byte/signed byte/word/signed word/dword/signed dword) 4
(signed byte) test_sbytes::bd#0 ← (signed word/signed byte/signed dword~) test_sbytes::$3
(signed byte/signed word/signed dword~) test_sbytes::$4 ← - (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*) assert_sbyte::msg#2 ← (const string) test_sbytes::msg2
(signed byte) assert_sbyte::b#2 ← (signed byte) test_sbytes::bd#0
@ -1128,8 +1132,8 @@ test_sbytes::@4: scope:[test_sbytes] from test_sbytes::@3
(byte*) char_cursor#24 ← (byte*) char_cursor#56
(byte*) line_cursor#18 ← (byte*) line_cursor#41
(signed byte/signed word/signed dword~) test_sbytes::$8 ← - (byte/signed byte/word/signed word/dword/signed dword) 127
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9 ← (signed byte/signed word/signed dword~) test_sbytes::$8 - (byte/signed byte/word/signed word/dword/signed dword) 127
(signed byte~) test_sbytes::$10 ← ((signed byte)) (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9
(signed word/signed byte/signed dword~) test_sbytes::$9 ← (signed byte/signed word/signed dword~) test_sbytes::$8 - (byte/signed byte/word/signed word/dword/signed dword) 127
(signed byte~) test_sbytes::$10 ← ((signed byte)) (signed word/signed byte/signed dword~) test_sbytes::$9
(signed byte) test_sbytes::bf#0 ← (signed byte~) test_sbytes::$10
(byte*) assert_sbyte::msg#4 ← (const string) test_sbytes::msg4
(signed byte) assert_sbyte::b#4 ← (signed byte) test_sbytes::bf#0
@ -1512,9 +1516,10 @@ SYMBOL TABLE SSA
(byte*) print_str::str#8
(byte*) print_str::str#9
(void()) test_bytes()
(byte/word~) test_bytes::$1
(byte/signed byte/word/signed word/dword/signed dword~) test_bytes::$3
(byte~) test_bytes::$4
(byte/signed word/word/dword/signed dword~) test_bytes::$1
(signed byte~) test_bytes::$3
(signed word/signed byte/signed dword~) test_bytes::$4
(byte~) test_bytes::$5
(label) test_bytes::@1
(label) test_bytes::@2
(label) test_bytes::@3
@ -1531,13 +1536,13 @@ SYMBOL TABLE SSA
(const string) test_bytes::msg1 = (string) "0+2=2@"
(const string) test_bytes::msg2 = (string) "0+2-4=254@"
(void()) test_sbytes()
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1
(signed word/signed byte/signed dword~) test_sbytes::$1
(signed byte~) test_sbytes::$10
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3
(signed word/signed byte/signed dword~) test_sbytes::$3
(signed byte/signed word/signed dword~) test_sbytes::$4
(signed byte~) test_sbytes::$6
(signed byte/signed word/signed dword~) test_sbytes::$8
(byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$9
(signed word/signed byte/signed dword~) test_sbytes::$9
(label) test_sbytes::@1
(label) test_sbytes::@2
(label) test_sbytes::@3
@ -1649,10 +1654,10 @@ Alias (byte*) line_cursor#30 = (byte*) line_cursor#7 (byte*) line_cursor#31 (byt
Alias (byte) test_bytes::bb#0 = (byte) test_bytes::bb#1
Alias (byte*) char_cursor#11 = (byte*) char_cursor#43
Alias (byte*) line_cursor#32 = (byte*) line_cursor#9
Alias (byte) test_bytes::bc#0 = (byte/word~) test_bytes::$1 (byte) test_bytes::bc#1
Alias (byte) test_bytes::bc#0 = (byte/signed word/word/dword/signed dword~) test_bytes::$1 (byte) test_bytes::bc#1
Alias (byte*) char_cursor#12 = (byte*) char_cursor#44
Alias (byte*) line_cursor#10 = (byte*) line_cursor#33
Alias (byte) test_bytes::bd#0 = (byte~) test_bytes::$4
Alias (byte) test_bytes::bd#0 = (byte~) test_bytes::$5
Alias (byte*) char_cursor#13 = (byte*) char_cursor#45 (byte*) char_cursor#46 (byte*) char_cursor#14
Alias (byte*) line_cursor#11 = (byte*) line_cursor#34 (byte*) line_cursor#35 (byte*) line_cursor#12
Alias (byte) assert_byte::b#3 = (byte) assert_byte::b#4 (byte) assert_byte::b#5
@ -1667,10 +1672,10 @@ Alias (byte*) char_cursor#19 = (byte*) char_cursor#51 (byte*) char_cursor#52 (by
Alias (signed byte) test_sbytes::bb#0 = (signed byte) test_sbytes::bb#1
Alias (byte*) char_cursor#21 = (byte*) char_cursor#53
Alias (byte*) line_cursor#15 = (byte*) line_cursor#38
Alias (signed byte) test_sbytes::bc#0 = (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$1 (signed byte) test_sbytes::bc#1
Alias (signed byte) test_sbytes::bc#0 = (signed word/signed byte/signed dword~) test_sbytes::$1 (signed byte) test_sbytes::bc#1
Alias (byte*) char_cursor#22 = (byte*) char_cursor#54
Alias (byte*) line_cursor#16 = (byte*) line_cursor#39
Alias (signed byte) test_sbytes::bd#0 = (byte/signed byte/word/signed word/dword/signed dword~) test_sbytes::$3 (signed byte) test_sbytes::bd#1
Alias (signed byte) test_sbytes::bd#0 = (signed word/signed byte/signed dword~) test_sbytes::$3 (signed byte) test_sbytes::bd#1
Alias (signed byte) assert_sbyte::c#2 = (signed byte/signed word/signed dword~) test_sbytes::$4
Alias (byte*) char_cursor#23 = (byte*) char_cursor#55
Alias (byte*) line_cursor#17 = (byte*) line_cursor#40
@ -1930,19 +1935,21 @@ Constant (const signed byte) test_sbytes::bc#0 = test_sbytes::bb#0+2
Constant (const signed word/signed dword) test_sbytes::$9 = test_sbytes::$8-127
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) assert_byte::b#1 = test_bytes::bc#0
Constant (const signed byte/signed word/signed dword) test_bytes::$3 = test_bytes::bc#0-4
Constant (const signed byte) test_bytes::$3 = ((signed byte))test_bytes::bc#0
Constant (const signed byte) assert_sbyte::b#1 = test_sbytes::bc#0
Constant (const signed byte) test_sbytes::bd#0 = test_sbytes::bc#0-4
Constant (const signed byte) test_sbytes::bf#0 = ((signed byte))test_sbytes::$9
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) test_bytes::bd#0 = ((byte))test_bytes::$3
Constant (const signed byte/signed word/signed dword) test_bytes::$4 = test_bytes::$3-4
Constant (const signed byte) assert_sbyte::b#2 = test_sbytes::bd#0
Constant (const signed byte) test_sbytes::be#0 = -test_sbytes::bd#0
Constant (const signed byte) assert_sbyte::b#4 = test_sbytes::bf#0
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) assert_byte::b#2 = test_bytes::bd#0
Constant (const byte) test_bytes::bd#0 = ((byte))test_bytes::$4
Constant (const signed byte) assert_sbyte::b#3 = test_sbytes::be#0
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) assert_byte::b#2 = test_bytes::bd#0
Succesful SSA optimization Pass2ConstantIdentification
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_cls::@2
Culled Empty Block (label) @10
@ -2059,9 +2066,10 @@ Constant inlined assert_byte::b#1 = (const byte) test_bytes::bc#0
Constant inlined assert_byte::c#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined assert_byte::b#2 = (const byte) test_bytes::bd#0
Constant inlined assert_byte::c#1 = (byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined test_bytes::$3 = (const byte) test_bytes::bc#0-(byte/signed byte/word/signed word/dword/signed dword) 4
Constant inlined test_bytes::$3 = ((signed byte))(const byte) test_bytes::bc#0
Constant inlined assert_byte::c#2 = (byte/word/signed word/dword/signed dword) 254
Constant inlined assert_sbyte::c#4 = (byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined test_bytes::$4 = ((signed byte))(const byte) test_bytes::bc#0-(byte/signed byte/word/signed word/dword/signed dword) 4
Constant inlined assert_sbyte::b#4 = (const signed byte) test_sbytes::bf#0
Constant inlined assert_sbyte::c#3 = (byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined assert_sbyte::b#3 = (const signed byte) test_sbytes::be#0
@ -3884,7 +3892,7 @@ FINAL SYMBOL TABLE
(byte) test_bytes::bc
(const byte) test_bytes::bc#0 bc = (const byte) test_bytes::bb#0+(byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bd
(const byte) test_bytes::bd#0 bd = ((byte))(const byte) test_bytes::bc#0-(byte/signed byte/word/signed word/dword/signed dword) 4
(const byte) test_bytes::bd#0 bd = ((byte))((signed byte))(const byte) test_bytes::bc#0-(byte/signed byte/word/signed word/dword/signed dword) 4
(const string) test_bytes::msg msg = (string) "0=0@"
(const string) test_bytes::msg1 msg1 = (string) "0+2=2@"
(const string) test_bytes::msg2 msg2 = (string) "0+2-4=254@"

View File

@ -86,7 +86,7 @@
(byte) test_bytes::bc
(const byte) test_bytes::bc#0 bc = (const byte) test_bytes::bb#0+(byte/signed byte/word/signed word/dword/signed dword) 2
(byte) test_bytes::bd
(const byte) test_bytes::bd#0 bd = ((byte))(const byte) test_bytes::bc#0-(byte/signed byte/word/signed word/dword/signed dword) 4
(const byte) test_bytes::bd#0 bd = ((byte))((signed byte))(const byte) test_bytes::bc#0-(byte/signed byte/word/signed word/dword/signed dword) 4
(const string) test_bytes::msg msg = (string) "0=0@"
(const string) test_bytes::msg1 msg1 = (string) "0+2=2@"
(const string) test_bytes::msg2 msg2 = (string) "0+2-4=254@"

View File

@ -13,8 +13,8 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[6] (byte) main::i#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) main::i#1 ) [ main::i#2 ] ( main:2 [ main::i#2 ] )
[7] (byte/word~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] )
[8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte/word~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[7] (byte~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] )
[8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[9] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] )
[10] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 15) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] )
to:main::@return

View File

@ -18,10 +18,10 @@ proc (void()) main()
*((byte[15]) fibs + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@1:
(byte/word~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/word~) main::$1 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte/word~) main::$2 ← *((byte[15]) fibs + (byte) main::i) + *((byte[15]) fibs + (byte/word~) main::$1)
*((byte[15]) fibs + (byte/word~) main::$0) ← (byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) main::$2 ← *((byte[15]) fibs + (byte) main::i) + *((byte[15]) fibs + (byte/signed word/word/dword/signed dword~) main::$1)
*((byte[15]) fibs + (byte/signed word/word/dword/signed dword~) main::$0) ← (byte~) main::$2
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$3 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword) 15
if((boolean~) main::$3) goto main::@1
@ -33,9 +33,9 @@ endproc // main()
SYMBOLS
(byte[15]) fibs
(void()) main()
(byte/word~) main::$0
(byte/word~) main::$1
(byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0
(byte/signed word/word/dword/signed dword~) main::$1
(byte~) main::$2
(boolean~) main::$3
(label) main::@1
(label) main::@return
@ -52,10 +52,10 @@ main: scope:[main] from
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte/word~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/word~) main::$1 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte/word~) main::$2 ← *((byte[15]) fibs + (byte) main::i) + *((byte[15]) fibs + (byte/word~) main::$1)
*((byte[15]) fibs + (byte/word~) main::$0) ← (byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) main::$2 ← *((byte[15]) fibs + (byte) main::i) + *((byte[15]) fibs + (byte/signed word/word/dword/signed dword~) main::$1)
*((byte[15]) fibs + (byte/signed word/word/dword/signed dword~) main::$0) ← (byte~) main::$2
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$3 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword) 15
if((boolean~) main::$3) goto main::@1
@ -86,10 +86,10 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
(byte/word~) main::$0 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte/word~) main::$2 ← *((byte[15]) fibs#0 + (byte) main::i#2) + *((byte[15]) fibs#0 + (byte/word~) main::$1)
*((byte[15]) fibs#0 + (byte/word~) main::$0) ← (byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) main::$2 ← *((byte[15]) fibs#0 + (byte) main::i#2) + *((byte[15]) fibs#0 + (byte/signed word/word/dword/signed dword~) main::$1)
*((byte[15]) fibs#0 + (byte/signed word/word/dword/signed dword~) main::$0) ← (byte~) main::$2
(byte) main::i#1 ← ++ (byte) main::i#2
(boolean~) main::$3 ← (byte) main::i#1 < (byte/signed byte/word/signed word/dword/signed dword) 15
if((boolean~) main::$3) goto main::@1
@ -112,9 +112,9 @@ SYMBOL TABLE SSA
(byte[15]) fibs
(byte[15]) fibs#0
(void()) main()
(byte/word~) main::$0
(byte/word~) main::$1
(byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0
(byte/signed word/word/dword/signed dword~) main::$1
(byte~) main::$2
(boolean~) main::$3
(label) main::@1
(label) main::@return
@ -140,7 +140,9 @@ Consolidated array index constant in assignment *(fibs#0+1 + main::$1)
Consolidated array index constant in assignment *(fibs#0+2 + main::$0)
Succesful SSA optimization Pass2ConstantAdditionElimination
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Alias (byte) main::i#2 = (byte/word~) main::$0 (byte/word~) main::$1
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2
Alias (byte) main::i#2 = (byte~) main::$0 (byte~) main::$1
Succesful SSA optimization Pass2AliasElimination
OPTIMIZING CONTROL FLOW GRAPH
Inlining constant with var siblings (const byte) main::i#0
@ -185,8 +187,8 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[6] (byte) main::i#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) main::i#1 ) [ main::i#2 ] ( main:2 [ main::i#2 ] )
[7] (byte/word~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] )
[8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte/word~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[7] (byte~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] )
[8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[9] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] )
[10] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 15) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] )
to:main::@return
@ -217,7 +219,7 @@ Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1
VARIABLE REGISTER WEIGHTS
(byte[15]) fibs
(void()) main()
(byte/word~) main::$2 22.0
(byte~) main::$2 22.0
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 18.333333333333332
@ -274,13 +276,13 @@ main: {
jmp b1
//SEG15 main::@1
b1:
//SEG16 [7] (byte/word~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) -- vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuz2
//SEG16 [7] (byte~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) -- vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuz2
ldy i
lda fibs,y
clc
adc fibs+1,y
sta _2
//SEG17 [8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte/word~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuz1=vbuz2
//SEG17 [8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuz1=vbuz2
lda _2
ldy i
sta fibs+2,y
@ -300,11 +302,11 @@ main: {
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] (byte/word~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) always clobbers reg byte a
Statement [7] (byte~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Statement [4] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [7] (byte/word~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) always clobbers reg byte a
Statement [7] (byte~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ main::$2 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
@ -355,11 +357,11 @@ main: {
jmp b1
//SEG15 main::@1
b1:
//SEG16 [7] (byte/word~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) -- vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
//SEG16 [7] (byte~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) -- vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
lda fibs,x
clc
adc fibs+1,x
//SEG17 [8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte/word~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
//SEG17 [8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
sta fibs+2,x
//SEG18 [9] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=_inc_vbuxx
inx
@ -400,7 +402,7 @@ FINAL SYMBOL TABLE
(byte[15]) fibs
(const byte*) fibs#0 fibs = ((byte*))(word/signed word/dword/signed dword) 4352
(void()) main()
(byte/word~) main::$2 reg byte a 22.0
(byte~) main::$2 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte) main::i
@ -442,11 +444,11 @@ main: {
//SEG14 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
//SEG15 main::@1
b1:
//SEG16 [7] (byte/word~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) -- vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
//SEG16 [7] (byte~) main::$2 ← *((const byte*) fibs#0 + (byte) main::i#2) + *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::i#2) [ main::i#2 main::$2 ] ( main:2 [ main::i#2 main::$2 ] ) -- vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
lda fibs,x
clc
adc fibs+1,x
//SEG17 [8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte/word~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
//SEG17 [8] *((const byte*) fibs#0+(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2) ← (byte~) main::$2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
sta fibs+2,x
//SEG18 [9] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=_inc_vbuxx
inx

View File

@ -4,7 +4,7 @@
(byte[15]) fibs
(const byte*) fibs#0 fibs = ((byte*))(word/signed word/dword/signed dword) 4352
(void()) main()
(byte/word~) main::$2 reg byte a 22.0
(byte~) main::$2 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte) main::i

View File

@ -99,8 +99,8 @@ flip::@1:
flip::@2:
*((byte[256]) buffer2 + (byte) flip::dstIdx) ← *((byte[256]) buffer1 + (byte) flip::srcIdx)
(byte) flip::srcIdx ← ++ (byte) flip::srcIdx
(byte/word~) flip::$0 ← (byte) flip::dstIdx + (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) flip::dstIdx ← (byte/word~) flip::$0
(byte/signed word/word/dword/signed dword~) flip::$0 ← (byte) flip::dstIdx + (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) flip::dstIdx ← (byte/signed word/word/dword/signed dword~) flip::$0
(byte) flip::c ← -- (byte) flip::c
(boolean~) flip::$1 ← (byte) flip::c != (byte/signed byte/word/signed word/dword/signed dword) 0
if((boolean~) flip::$1) goto flip::@2
@ -148,7 +148,7 @@ SYMBOLS
(byte[256]) buffer1
(byte[256]) buffer2
(void()) flip()
(byte/word~) flip::$0
(byte/signed word/word/dword/signed dword~) flip::$0
(boolean~) flip::$1
(boolean~) flip::$2
(boolean~) flip::$3
@ -265,8 +265,8 @@ flip::@1: scope:[flip] from flip flip::@4
flip::@2: scope:[flip] from flip::@1 flip::@2
*((byte[256]) buffer2 + (byte) flip::dstIdx) ← *((byte[256]) buffer1 + (byte) flip::srcIdx)
(byte) flip::srcIdx ← ++ (byte) flip::srcIdx
(byte/word~) flip::$0 ← (byte) flip::dstIdx + (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) flip::dstIdx ← (byte/word~) flip::$0
(byte/signed word/word/dword/signed dword~) flip::$0 ← (byte) flip::dstIdx + (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) flip::dstIdx ← (byte/signed word/word/dword/signed dword~) flip::$0
(byte) flip::c ← -- (byte) flip::c
(boolean~) flip::$1 ← (byte) flip::c != (byte/signed byte/word/signed word/dword/signed dword) 0
if((boolean~) flip::$1) goto flip::@2
@ -449,8 +449,8 @@ flip::@2: scope:[flip] from flip::@1 flip::@2
(byte) flip::srcIdx#2 ← phi( flip::@1/(byte) flip::srcIdx#3 flip::@2/(byte) flip::srcIdx#1 )
*((byte[256]) buffer2#0 + (byte) flip::dstIdx#3) ← *((byte[256]) buffer1#0 + (byte) flip::srcIdx#2)
(byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2
(byte/word~) flip::$0 ← (byte) flip::dstIdx#3 + (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) flip::dstIdx#1 ← (byte/word~) flip::$0
(byte/signed word/word/dword/signed dword~) flip::$0 ← (byte) flip::dstIdx#3 + (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) flip::dstIdx#1 ← (byte/signed word/word/dword/signed dword~) flip::$0
(byte) flip::c#1 ← -- (byte) flip::c#2
(boolean~) flip::$1 ← (byte) flip::c#1 != (byte/signed byte/word/signed word/dword/signed dword) 0
if((boolean~) flip::$1) goto flip::@2
@ -562,7 +562,7 @@ SYMBOL TABLE SSA
(byte[256]) buffer2
(byte[256]) buffer2#0
(void()) flip()
(byte/word~) flip::$0
(byte/signed word/word/dword/signed dword~) flip::$0
(boolean~) flip::$1
(boolean~) flip::$2
(boolean~) flip::$3
@ -674,7 +674,7 @@ Alias (byte*) RASTER#11 = (byte*) RASTER#4 (byte*) RASTER#7 (byte*) RASTER#2 (by
Alias (byte) main::c#1 = (byte) main::c#5
Alias (byte*) SCREEN#2 = (byte*) SCREEN#8 (byte*) SCREEN#4 (byte*) SCREEN#5 (byte*) SCREEN#3 (byte*) SCREEN#9
Alias (byte) main::c#2 = (byte) main::c#3
Alias (byte) flip::dstIdx#1 = (byte/word~) flip::$0 (byte) flip::dstIdx#4
Alias (byte) flip::dstIdx#1 = (byte/signed word/word/dword/signed dword~) flip::$0 (byte) flip::dstIdx#4
Alias (byte) flip::r#2 = (byte) flip::r#3
Alias (byte) flip::srcIdx#1 = (byte) flip::srcIdx#4
Alias (byte*) plot::line#0 = (byte*~) plot::$2

View File

@ -15,8 +15,8 @@ proc (void()) main()
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@1:
*((byte*) SCREEN + (byte) main::i) ← (byte) main::i
(byte/word~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/signed word/word/dword/signed dword~) main::$0
(boolean~) main::$1 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword) 40
if((boolean~) main::$1) goto main::@1
main::@return:
@ -27,7 +27,7 @@ endproc // main()
SYMBOLS
(byte*) SCREEN
(void()) main()
(byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0
(boolean~) main::$1
(label) main::@1
(label) main::@return
@ -43,8 +43,8 @@ main: scope:[main] from
to:main::@1
main::@1: scope:[main] from main main::@1
*((byte*) SCREEN + (byte) main::i) ← (byte) main::i
(byte/word~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/signed word/word/dword/signed dword~) main::$0
(boolean~) main::$1 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword) 40
if((boolean~) main::$1) goto main::@1
to:main::@2
@ -77,8 +77,8 @@ main::@1: scope:[main] from main main::@1
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#2 main::@1/(byte*) SCREEN#1 )
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
*((byte*) SCREEN#1 + (byte) main::i#2) ← (byte) main::i#2
(byte/word~) main::$0 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i#1 ← (byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i#1 ← (byte/signed word/word/dword/signed dword~) main::$0
(boolean~) main::$1 ← (byte) main::i#1 < (byte/signed byte/word/signed word/dword/signed dword) 40
if((boolean~) main::$1) goto main::@1
to:main::@return
@ -104,7 +104,7 @@ SYMBOL TABLE SSA
(byte*) SCREEN#2
(byte*) SCREEN#3
(void()) main()
(byte/word~) main::$0
(byte/signed word/word/dword/signed dword~) main::$0
(boolean~) main::$1
(label) main::@1
(label) main::@return
@ -117,7 +117,7 @@ OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) @2
Succesful SSA optimization Pass2CullEmptyBlocks
Not aliassing across scopes: SCREEN#2 SCREEN#3
Alias (byte) main::i#1 = (byte/word~) main::$0
Alias (byte) main::i#1 = (byte/signed word/word/dword/signed dword~) main::$0
Alias (byte*) SCREEN#0 = (byte*) SCREEN#3
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: SCREEN#2 SCREEN#0

View File

@ -71,8 +71,8 @@ main::@1:
(boolean~) main::$7 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
(boolean~) main::$8 ← ! (boolean~) main::$7
if((boolean~) main::$8) goto main::@2
(byte/word~) main::$9 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$9
(byte/signed word/word/dword/signed dword~) main::$9 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$9
main::@2:
(byte~) main::$10 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte~) main::$10
@ -85,8 +85,8 @@ main::@2:
(boolean~) main::$16 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
(boolean~) main::$17 ← ! (boolean~) main::$16
if((boolean~) main::$17) goto main::@3
(byte/word~) main::$18 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$18
(byte/signed word/word/dword/signed dword~) main::$18 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$18
main::@3:
(byte~) main::$19 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte~) main::$19
@ -99,8 +99,8 @@ main::@3:
(boolean~) main::$25 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
(boolean~) main::$26 ← ! (boolean~) main::$25
if((boolean~) main::$26) goto main::@4
(byte/word~) main::$27 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$27
(byte/signed word/word/dword/signed dword~) main::$27 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$27
main::@4:
(byte~) main::$28 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte~) main::$28
@ -112,8 +112,8 @@ main::@4:
(boolean~) main::$33 ← (byte) main::bits >= (byte/signed byte/word/signed word/dword/signed dword) 2
(boolean~) main::$34 ← ! (boolean~) main::$33
if((boolean~) main::$34) goto main::@5
(byte/word~) main::$35 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$35
(byte/signed word/word/dword/signed dword~) main::$35 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$35
main::@5:
(byte~) main::$36 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte~) main::$36
@ -157,7 +157,7 @@ SYMBOLS
(byte~) main::$15
(boolean~) main::$16
(boolean~) main::$17
(byte/word~) main::$18
(byte/signed word/word/dword/signed dword~) main::$18
(byte~) main::$19
(byte~) main::$2
(byte~) main::$20
@ -167,7 +167,7 @@ SYMBOLS
(byte~) main::$24
(boolean~) main::$25
(boolean~) main::$26
(byte/word~) main::$27
(byte/signed word/word/dword/signed dword~) main::$27
(byte~) main::$28
(byte~) main::$29
(byte~) main::$3
@ -176,7 +176,7 @@ SYMBOLS
(byte~) main::$32
(boolean~) main::$33
(boolean~) main::$34
(byte/word~) main::$35
(byte/signed word/word/dword/signed dword~) main::$35
(byte~) main::$36
(byte*~) main::$37
(byte*~) main::$38
@ -187,7 +187,7 @@ SYMBOLS
(byte~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(byte/word~) main::$9
(byte/signed word/word/dword/signed dword~) main::$9
(label) main::@1
(label) main::@2
(label) main::@3
@ -253,8 +253,8 @@ main::@2: scope:[main] from main::@1 main::@7
if((boolean~) main::$17) goto main::@3
to:main::@8
main::@7: scope:[main] from main::@1
(byte/word~) main::$9 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$9
(byte/signed word/word/dword/signed dword~) main::$9 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$9
to:main::@2
main::@3: scope:[main] from main::@2 main::@8
(byte~) main::$19 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
@ -270,8 +270,8 @@ main::@3: scope:[main] from main::@2 main::@8
if((boolean~) main::$26) goto main::@4
to:main::@9
main::@8: scope:[main] from main::@2
(byte/word~) main::$18 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$18
(byte/signed word/word/dword/signed dword~) main::$18 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$18
to:main::@3
main::@4: scope:[main] from main::@3 main::@9
(byte~) main::$28 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
@ -286,8 +286,8 @@ main::@4: scope:[main] from main::@3 main::@9
if((boolean~) main::$34) goto main::@5
to:main::@10
main::@9: scope:[main] from main::@3
(byte/word~) main::$27 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$27
(byte/signed word/word/dword/signed dword~) main::$27 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$27
to:main::@4
main::@5: scope:[main] from main::@10 main::@4
(byte~) main::$36 ← (byte) main::bits_gen << (byte/signed byte/word/signed word/dword/signed dword) 1
@ -301,8 +301,8 @@ main::@5: scope:[main] from main::@10 main::@4
if((boolean~) main::$39) goto main::@1
to:main::@11
main::@10: scope:[main] from main::@4
(byte/word~) main::$35 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/word~) main::$35
(byte/signed word/word/dword/signed dword~) main::$35 ← (byte) main::bits_gen + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen ← (byte/signed word/word/dword/signed dword~) main::$35
to:main::@5
main::@11: scope:[main] from main::@5
*((byte*) PROCPORT) ← (byte/signed byte/word/signed word/dword/signed dword) 55
@ -411,8 +411,8 @@ main::@7: scope:[main] from main::@1
(byte*) main::chargen1#4 ← phi( main::@1/(byte*) main::chargen1#0 )
(byte*) main::chargen#7 ← phi( main::@1/(byte*) main::chargen#2 )
(byte) main::bits_gen#10 ← phi( main::@1/(byte) main::bits_gen#0 )
(byte/word~) main::$9 ← (byte) main::bits_gen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#2 ← (byte/word~) main::$9
(byte/signed word/word/dword/signed dword~) main::$9 ← (byte) main::bits_gen#10 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#2 ← (byte/signed word/word/dword/signed dword~) main::$9
to:main::@2
main::@3: scope:[main] from main::@2 main::@8
(byte*) D018#7 ← phi( main::@2/(byte*) D018#9 main::@8/(byte*) D018#10 )
@ -444,8 +444,8 @@ main::@8: scope:[main] from main::@2
(byte*) main::chargen1#5 ← phi( main::@2/(byte*) main::chargen1#1 )
(byte*) main::chargen#8 ← phi( main::@2/(byte*) main::chargen#3 )
(byte) main::bits_gen#12 ← phi( main::@2/(byte) main::bits_gen#1 )
(byte/word~) main::$18 ← (byte) main::bits_gen#12 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#4 ← (byte/word~) main::$18
(byte/signed word/word/dword/signed dword~) main::$18 ← (byte) main::bits_gen#12 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#4 ← (byte/signed word/word/dword/signed dword~) main::$18
to:main::@3
main::@4: scope:[main] from main::@3 main::@9
(byte*) D018#6 ← phi( main::@3/(byte*) D018#7 main::@9/(byte*) D018#8 )
@ -476,8 +476,8 @@ main::@9: scope:[main] from main::@3
(byte*) main::chargen1#6 ← phi( main::@3/(byte*) main::chargen1#2 )
(byte*) main::chargen#9 ← phi( main::@3/(byte*) main::chargen#4 )
(byte) main::bits_gen#14 ← phi( main::@3/(byte) main::bits_gen#3 )
(byte/word~) main::$27 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#6 ← (byte/word~) main::$27
(byte/signed word/word/dword/signed dword~) main::$27 ← (byte) main::bits_gen#14 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#6 ← (byte/signed word/word/dword/signed dword~) main::$27
to:main::@4
main::@5: scope:[main] from main::@10 main::@4
(byte*) D018#4 ← phi( main::@10/(byte*) D018#5 main::@4/(byte*) D018#6 )
@ -505,8 +505,8 @@ main::@10: scope:[main] from main::@4
(byte*) main::chargen#10 ← phi( main::@4/(byte*) main::chargen#5 )
(byte*) main::charset4#3 ← phi( main::@4/(byte*) main::charset4#4 )
(byte) main::bits_gen#16 ← phi( main::@4/(byte) main::bits_gen#5 )
(byte/word~) main::$35 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#8 ← (byte/word~) main::$35
(byte/signed word/word/dword/signed dword~) main::$35 ← (byte) main::bits_gen#16 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::bits_gen#8 ← (byte/signed word/word/dword/signed dword~) main::$35
to:main::@5
main::@11: scope:[main] from main::@5
(byte*) D018#3 ← phi( main::@5/(byte*) D018#4 )
@ -624,7 +624,7 @@ SYMBOL TABLE SSA
(byte~) main::$15
(boolean~) main::$16
(boolean~) main::$17
(byte/word~) main::$18
(byte/signed word/word/dword/signed dword~) main::$18
(byte~) main::$19
(byte~) main::$2
(byte~) main::$20
@ -634,7 +634,7 @@ SYMBOL TABLE SSA
(byte~) main::$24
(boolean~) main::$25
(boolean~) main::$26
(byte/word~) main::$27
(byte/signed word/word/dword/signed dword~) main::$27
(byte~) main::$28
(byte~) main::$29
(byte~) main::$3
@ -643,7 +643,7 @@ SYMBOL TABLE SSA
(byte~) main::$32
(boolean~) main::$33
(boolean~) main::$34
(byte/word~) main::$35
(byte/signed word/word/dword/signed dword~) main::$35
(byte~) main::$36
(byte*~) main::$37
(byte*~) main::$38
@ -654,7 +654,7 @@ SYMBOL TABLE SSA
(byte~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(byte/word~) main::$9
(byte/signed word/word/dword/signed dword~) main::$9
(label) main::@1
(label) main::@10
(label) main::@11
@ -752,7 +752,7 @@ Alias (byte*) CHARGEN#10 = (byte*) CHARGEN#11
Alias (byte*) PROCPORT#11 = (byte*) PROCPORT#12
Alias (byte*) SCREEN#10 = (byte*) SCREEN#11
Alias (byte*) D018#11 = (byte*) D018#12
Alias (byte) main::bits_gen#2 = (byte/word~) main::$9
Alias (byte) main::bits_gen#2 = (byte/signed word/word/dword/signed dword~) main::$9
Alias (byte) main::bits_gen#14 = (byte) main::bits_gen#3 (byte~) main::$19
Alias (byte*) main::chargen#3 = (byte*) main::chargen#8
Alias (byte*) main::chargen1#1 = (byte*) main::chargen1#5
@ -761,7 +761,7 @@ Alias (byte*) CHARGEN#8 = (byte*) CHARGEN#9
Alias (byte*) PROCPORT#10 = (byte*) PROCPORT#9
Alias (byte*) SCREEN#8 = (byte*) SCREEN#9
Alias (byte*) D018#10 = (byte*) D018#9
Alias (byte) main::bits_gen#4 = (byte/word~) main::$18
Alias (byte) main::bits_gen#4 = (byte/signed word/word/dword/signed dword~) main::$18
Alias (byte) main::bits_gen#16 = (byte) main::bits_gen#5 (byte~) main::$28
Alias (byte*) main::chargen#4 = (byte*) main::chargen#9
Alias (byte*) main::chargen1#2 = (byte*) main::chargen1#6
@ -770,7 +770,7 @@ Alias (byte*) CHARGEN#6 = (byte*) CHARGEN#7
Alias (byte*) PROCPORT#7 = (byte*) PROCPORT#8
Alias (byte*) SCREEN#6 = (byte*) SCREEN#7
Alias (byte*) D018#7 = (byte*) D018#8
Alias (byte) main::bits_gen#6 = (byte/word~) main::$27
Alias (byte) main::bits_gen#6 = (byte/signed word/word/dword/signed dword~) main::$27
Alias (byte) main::bits_gen#7 = (byte~) main::$36
Alias (byte*) main::chargen#1 = (byte*~) main::$37
Alias (byte*) main::charset4#3 = (byte*) main::charset4#4
@ -779,7 +779,7 @@ Alias (byte*) CHARGEN#4 = (byte*) CHARGEN#5
Alias (byte*) PROCPORT#5 = (byte*) PROCPORT#6
Alias (byte*) SCREEN#4 = (byte*) SCREEN#5
Alias (byte*) D018#5 = (byte*) D018#6
Alias (byte) main::bits_gen#8 = (byte/word~) main::$35
Alias (byte) main::bits_gen#8 = (byte/signed word/word/dword/signed dword~) main::$35
Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#4
Alias (byte*) SCREEN#2 = (byte*) SCREEN#3
Alias (byte*) D018#3 = (byte*) D018#4

View File

@ -12,8 +12,8 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::i#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 5 main::@1/(byte) main::i#1 ) [ main::i#2 ] ( main:2 [ main::i#2 ] )
[6] (byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] )
[7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/word~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[6] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] )
[7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/signed word/word/dword/signed dword~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#1 ] ( main:2 [ main::i#1 ] )
[9] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] )
to:main::@return

View File

@ -13,11 +13,11 @@ proc (void()) main()
(byte[16]) main::buf ← (word/signed word/dword/signed dword) 4352
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 5
main::@1:
(byte/word~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i
(byte/word~) main::$1 ← (byte/word~) main::$0 + (byte/signed byte/word/signed word/dword/signed dword) 2
*((byte[16]) main::buf + (byte) main::i) ← (byte/word~) main::$1
(byte/word~) main::$2 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::i ← (byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte/signed word/word/dword/signed dword~) main::$0 + (byte/signed byte/word/signed word/dword/signed dword) 2
*((byte[16]) main::buf + (byte) main::i) ← (byte/signed word/word/dword/signed dword~) main::$1
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::i ← (byte/signed word/word/dword/signed dword~) main::$2
(boolean~) main::$3 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword) 10
if((boolean~) main::$3) goto main::@1
main::@return:
@ -27,9 +27,9 @@ endproc // main()
SYMBOLS
(void()) main()
(byte/word~) main::$0
(byte/word~) main::$1
(byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0
(byte/signed word/word/dword/signed dword~) main::$1
(byte/signed word/word/dword/signed dword~) main::$2
(boolean~) main::$3
(label) main::@1
(label) main::@return
@ -45,11 +45,11 @@ main: scope:[main] from
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 5
to:main::@1
main::@1: scope:[main] from main main::@1
(byte/word~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i
(byte/word~) main::$1 ← (byte/word~) main::$0 + (byte/signed byte/word/signed word/dword/signed dword) 2
*((byte[16]) main::buf + (byte) main::i) ← (byte/word~) main::$1
(byte/word~) main::$2 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::i ← (byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte/signed word/word/dword/signed dword~) main::$0 + (byte/signed byte/word/signed word/dword/signed dword) 2
*((byte[16]) main::buf + (byte) main::i) ← (byte/signed word/word/dword/signed dword~) main::$1
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::i ← (byte/signed word/word/dword/signed dword~) main::$2
(boolean~) main::$3 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword) 10
if((boolean~) main::$3) goto main::@1
to:main::@2
@ -77,11 +77,11 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
(byte/word~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2
(byte/word~) main::$1 ← (byte/word~) main::$0 + (byte/signed byte/word/signed word/dword/signed dword) 2
*((byte[16]) main::buf#0 + (byte) main::i#2) ← (byte/word~) main::$1
(byte/word~) main::$2 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::i#1 ← (byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::i#2
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte/signed word/word/dword/signed dword~) main::$0 + (byte/signed byte/word/signed word/dword/signed dword) 2
*((byte[16]) main::buf#0 + (byte) main::i#2) ← (byte/signed word/word/dword/signed dword~) main::$1
(byte/signed word/word/dword/signed dword~) main::$2 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) main::i#1 ← (byte/signed word/word/dword/signed dword~) main::$2
(boolean~) main::$3 ← (byte) main::i#1 < (byte/signed byte/word/signed word/dword/signed dword) 10
if((boolean~) main::$3) goto main::@1
to:main::@return
@ -101,9 +101,9 @@ SYMBOL TABLE SSA
(label) @begin
(label) @end
(void()) main()
(byte/word~) main::$0
(byte/word~) main::$1
(byte/word~) main::$2
(byte/signed word/word/dword/signed dword~) main::$0
(byte/signed word/word/dword/signed dword~) main::$1
(byte/signed word/word/dword/signed dword~) main::$2
(boolean~) main::$3
(label) main::@1
(label) main::@return
@ -117,7 +117,7 @@ SYMBOL TABLE SSA
OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) @2
Succesful SSA optimization Pass2CullEmptyBlocks
Alias (byte) main::i#1 = (byte/word~) main::$2
Alias (byte) main::i#1 = (byte/signed word/word/dword/signed dword~) main::$2
Succesful SSA optimization Pass2AliasElimination
Simple Condition (boolean~) main::$3 if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@1
Succesful SSA optimization Pass2ConditionalJumpSimplification
@ -131,7 +131,8 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Succesful SSA optimization Pass2ConstantAdditionElimination
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Alias (byte) main::i#2 = (byte/word~) main::$0
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2
Alias (byte) main::i#2 = (byte~) main::$0
Succesful SSA optimization Pass2AliasElimination
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
@ -183,8 +184,8 @@ main: scope:[main] from @1
to:main::@1
main::@1: scope:[main] from main main::@1
[5] (byte) main::i#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 5 main::@1/(byte) main::i#1 ) [ main::i#2 ] ( main:2 [ main::i#2 ] )
[6] (byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] )
[7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/word~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[6] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] )
[7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/signed word/word/dword/signed dword~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] )
[8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#1 ] ( main:2 [ main::i#1 ] )
[9] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] )
to:main::@return
@ -214,7 +215,7 @@ Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte/word~) main::$1 22.0
(byte/signed word/word/dword/signed dword~) main::$1 22.0
(byte[16]) main::buf
(byte) main::i
(byte) main::i#1 16.5
@ -268,12 +269,12 @@ main: {
jmp b1
//SEG14 main::@1
b1:
//SEG15 [6] (byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) -- vbuz1=vbuz2_plus_vbuc1
//SEG15 [6] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) -- vbuz1=vbuz2_plus_vbuc1
lda #2+2
clc
adc i
sta _1
//SEG16 [7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/word~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuz1=vbuz2
//SEG16 [7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/signed word/word/dword/signed dword~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuz1=vbuz2
lda _1
ldy i
sta buf,y
@ -291,9 +292,9 @@ main: {
}
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] (byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) always clobbers reg byte a
Statement [6] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Statement [6] (byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) always clobbers reg byte a
Statement [6] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ main::$1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
@ -340,11 +341,11 @@ main: {
jmp b1
//SEG14 main::@1
b1:
//SEG15 [6] (byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) -- vbuaa=vbuxx_plus_vbuc1
//SEG15 [6] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) -- vbuaa=vbuxx_plus_vbuc1
txa
clc
adc #2+2
//SEG16 [7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/word~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
//SEG16 [7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/signed word/word/dword/signed dword~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
sta buf,x
//SEG17 [8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=vbuxx_plus_1
inx
@ -384,7 +385,7 @@ FINAL SYMBOL TABLE
(label) @begin
(label) @end
(void()) main()
(byte/word~) main::$1 reg byte a 22.0
(byte/signed word/word/dword/signed dword~) main::$1 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte[16]) main::buf
@ -423,11 +424,11 @@ main: {
//SEG13 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
//SEG14 main::@1
b1:
//SEG15 [6] (byte/word~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) -- vbuaa=vbuxx_plus_vbuc1
//SEG15 [6] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) -- vbuaa=vbuxx_plus_vbuc1
txa
clc
adc #2+2
//SEG16 [7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/word~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
//SEG16 [7] *((const byte*) main::buf#0 + (byte) main::i#2) ← (byte/signed word/word/dword/signed dword~) main::$1 [ main::i#2 ] ( main:2 [ main::i#2 ] ) -- pbuc1_derefidx_vbuxx=vbuaa
sta buf,x
//SEG17 [8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=vbuxx_plus_1
inx

View File

@ -2,7 +2,7 @@
(label) @begin
(label) @end
(void()) main()
(byte/word~) main::$1 reg byte a 22.0
(byte/signed word/word/dword/signed dword~) main::$1 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte[16]) main::buf

View File

@ -319,8 +319,8 @@ divr8u::@1:
(boolean~) divr8u::$2 ← (byte~) divr8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) divr8u::$3 ← ! (boolean~) divr8u::$2
if((boolean~) divr8u::$3) goto divr8u::@2
(byte~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte~) divr8u::$4
(byte/word/dword~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte/word/dword~) divr8u::$4
divr8u::@2:
(byte~) divr8u::$5 ← (byte) divr8u::dividend << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::dividend ← (byte~) divr8u::$5
@ -330,8 +330,8 @@ divr8u::@2:
(boolean~) divr8u::$8 ← ! (boolean~) divr8u::$7
if((boolean~) divr8u::$8) goto divr8u::@3
(byte) divr8u::quotient ← ++ (byte) divr8u::quotient
(byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9
(byte~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte~) divr8u::$9
divr8u::@3:
(byte) divr8u::i ← ++ (byte) divr8u::i
(boolean~) divr8u::$10 ← (byte) divr8u::i != (byte/signed byte/word/signed word/dword/signed dword) 8
@ -355,8 +355,8 @@ divr16u::@1:
(boolean~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) divr16u::$4 ← ! (boolean~) divr16u::$3
if((boolean~) divr16u::$4) goto divr16u::@2
(word~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word~) divr16u::$5
(word/dword~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word/dword~) divr16u::$5
divr16u::@2:
(word~) divr16u::$6 ← (word) divr16u::dividend << (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::dividend ← (word~) divr16u::$6
@ -424,8 +424,8 @@ div8s::@2:
(signed byte~) div8s::$7 ← - (signed byte) div8s::divisor
(byte~) div8s::$8 ← ((byte)) (signed byte~) div8s::$7
(byte) div8s::divisoru ← (byte~) div8s::$8
(byte~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte~) div8s::$9
(byte/word/dword~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte/word/dword~) div8s::$9
goto div8s::@4
div8s::@3:
(byte~) div8s::$10 ← ((byte)) (signed byte) div8s::divisor
@ -478,8 +478,8 @@ div16s::@2:
(signed word~) div16s::$7 ← - (signed word) div16s::divisor
(word~) div16s::$8 ← ((word)) (signed word~) div16s::$7
(word) div16s::divisoru ← (word~) div16s::$8
(byte~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte~) div16s::$9
(byte/word/dword~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte/word/dword~) div16s::$9
goto div16s::@4
div16s::@3:
(word~) div16s::$10 ← ((word)) (signed word) div16s::divisor
@ -644,8 +644,8 @@ main::@1:
(void~) main::$16 ← call print_str (string) " @"
(void~) main::$17 ← call print_word *((word[20]) main::lintab3 + (byte) main::i)
(void~) main::$18 ← call print_ln
(byte/word~) main::$19 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/word~) main::$19
(byte/signed word/word/dword/signed dword~) main::$19 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/signed word/word/dword/signed dword~) main::$19
(byte/signed byte/word/signed word/dword/signed dword~) main::$20 ← (byte/signed byte/word/signed word/dword/signed dword) 20 * (byte/signed byte/word/signed word/dword/signed dword) 2
(boolean~) main::$21 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword~) main::$20
if((boolean~) main::$21) goto main::@1
@ -662,11 +662,11 @@ endproc // main()
proc (void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length)
(word~) lin16u_gen::$0 ← (word) lin16u_gen::max - (word) lin16u_gen::min
(word) lin16u_gen::ampl ← (word~) lin16u_gen::$0
(word~) lin16u_gen::$1 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$2 ← call divr16u (word) lin16u_gen::ampl (word~) lin16u_gen::$1 (byte/signed byte/word/signed word/dword/signed dword) 0
(word/signed dword/dword~) lin16u_gen::$1 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$2 ← call divr16u (word) lin16u_gen::ampl (word/signed dword/dword~) lin16u_gen::$1 (byte/signed byte/word/signed word/dword/signed dword) 0
(word) lin16u_gen::stepi ← (word~) lin16u_gen::$2
(word~) lin16u_gen::$3 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$4 ← call divr16u (byte/signed byte/word/signed word/dword/signed dword) 0 (word~) lin16u_gen::$3 (word) rem16u
(word/signed dword/dword~) lin16u_gen::$3 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$4 ← call divr16u (byte/signed byte/word/signed word/dword/signed dword) 0 (word/signed dword/dword~) lin16u_gen::$3 (word) rem16u
(word) lin16u_gen::stepf ← (word~) lin16u_gen::$4
(dword) lin16u_gen::step ← { (word) lin16u_gen::stepi, (word) lin16u_gen::stepf }
(dword) lin16u_gen::val ← { (word) lin16u_gen::min, (byte/signed byte/word/signed word/dword/signed dword) 0 }
@ -709,7 +709,7 @@ SYMBOLS
(boolean~) div16s::$6
(signed word~) div16s::$7
(word~) div16s::$8
(byte~) div16s::$9
(byte/word/dword~) div16s::$9
(label) div16s::@1
(label) div16s::@2
(label) div16s::@3
@ -762,7 +762,7 @@ SYMBOLS
(boolean~) div8s::$6
(signed byte~) div8s::$7
(byte~) div8s::$8
(byte~) div8s::$9
(byte/word/dword~) div8s::$9
(label) div8s::@1
(label) div8s::@2
(label) div8s::@3
@ -791,7 +791,7 @@ SYMBOLS
(byte~) divr16u::$2
(boolean~) divr16u::$3
(boolean~) divr16u::$4
(word~) divr16u::$5
(word/dword~) divr16u::$5
(word~) divr16u::$6
(word~) divr16u::$7
(boolean~) divr16u::$8
@ -812,12 +812,12 @@ SYMBOLS
(boolean~) divr8u::$10
(boolean~) divr8u::$2
(boolean~) divr8u::$3
(byte~) divr8u::$4
(byte/word/dword~) divr8u::$4
(byte~) divr8u::$5
(byte~) divr8u::$6
(boolean~) divr8u::$7
(boolean~) divr8u::$8
(byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9
(byte~) divr8u::$9
(label) divr8u::@1
(label) divr8u::@2
(label) divr8u::@3
@ -830,9 +830,9 @@ SYMBOLS
(byte) divr8u::return
(void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length)
(word~) lin16u_gen::$0
(word~) lin16u_gen::$1
(word/signed dword/dword~) lin16u_gen::$1
(word~) lin16u_gen::$2
(word~) lin16u_gen::$3
(word/signed dword/dword~) lin16u_gen::$3
(word~) lin16u_gen::$4
(word~) lin16u_gen::$5
(dword~) lin16u_gen::$6
@ -863,7 +863,7 @@ SYMBOLS
(void~) main::$16
(void~) main::$17
(void~) main::$18
(byte/word~) main::$19
(byte/signed word/word/dword/signed dword~) main::$19
(void~) main::$2
(byte/signed byte/word/signed word/dword/signed dword~) main::$20
(boolean~) main::$21
@ -1004,8 +1004,8 @@ divr8u::@2: scope:[divr8u] from divr8u::@1 divr8u::@4
if((boolean~) divr8u::$8) goto divr8u::@3
to:divr8u::@5
divr8u::@4: scope:[divr8u] from divr8u::@1
(byte~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte~) divr8u::$4
(byte/word/dword~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte/word/dword~) divr8u::$4
to:divr8u::@2
divr8u::@3: scope:[divr8u] from divr8u::@2 divr8u::@5
(byte) divr8u::i ← ++ (byte) divr8u::i
@ -1014,8 +1014,8 @@ divr8u::@3: scope:[divr8u] from divr8u::@2 divr8u::@5
to:divr8u::@6
divr8u::@5: scope:[divr8u] from divr8u::@2
(byte) divr8u::quotient ← ++ (byte) divr8u::quotient
(byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9
(byte~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte~) divr8u::$9
to:divr8u::@3
divr8u::@6: scope:[divr8u] from divr8u::@3
(byte) rem8u ← (byte) divr8u::rem
@ -1053,8 +1053,8 @@ divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4
if((boolean~) divr16u::$9) goto divr16u::@3
to:divr16u::@5
divr16u::@4: scope:[divr16u] from divr16u::@1
(word~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word~) divr16u::$5
(word/dword~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word/dword~) divr16u::$5
to:divr16u::@2
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
(byte) divr16u::i ← ++ (byte) divr16u::i
@ -1142,8 +1142,8 @@ div8s::@9: scope:[div8s] from div8s::@2
(signed byte~) div8s::$7 ← - (signed byte) div8s::divisor
(byte~) div8s::$8 ← ((byte)) (signed byte~) div8s::$7
(byte) div8s::divisoru ← (byte~) div8s::$8
(byte~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte~) div8s::$9
(byte/word/dword~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte/word/dword~) div8s::$9
to:div8s::@4
div8s::@4: scope:[div8s] from div8s::@3 div8s::@9
(byte~) div8s::$11 ← call div8u (byte) div8s::dividendu (byte) div8s::divisoru
@ -1216,8 +1216,8 @@ div16s::@9: scope:[div16s] from div16s::@2
(signed word~) div16s::$7 ← - (signed word) div16s::divisor
(word~) div16s::$8 ← ((word)) (signed word~) div16s::$7
(word) div16s::divisoru ← (word~) div16s::$8
(byte~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte~) div16s::$9
(byte/word/dword~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte/word/dword~) div16s::$9
to:div16s::@4
div16s::@4: scope:[div16s] from div16s::@3 div16s::@9
(word~) div16s::$11 ← call div16u (word) div16s::dividendu (word) div16s::divisoru
@ -1444,8 +1444,8 @@ main::@1: scope:[main] from main main::@1
(void~) main::$16 ← call print_str (string) " @"
(void~) main::$17 ← call print_word *((word[20]) main::lintab3 + (byte) main::i)
(void~) main::$18 ← call print_ln
(byte/word~) main::$19 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/word~) main::$19
(byte/signed word/word/dword/signed dword~) main::$19 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i ← (byte/signed word/word/dword/signed dword~) main::$19
(byte/signed byte/word/signed word/dword/signed dword~) main::$20 ← (byte/signed byte/word/signed word/dword/signed dword) 20 * (byte/signed byte/word/signed word/dword/signed dword) 2
(boolean~) main::$21 ← (byte) main::i < (byte/signed byte/word/signed word/dword/signed dword~) main::$20
if((boolean~) main::$21) goto main::@1
@ -1467,11 +1467,11 @@ main::@return: scope:[main] from main::@2
lin16u_gen: scope:[lin16u_gen] from
(word~) lin16u_gen::$0 ← (word) lin16u_gen::max - (word) lin16u_gen::min
(word) lin16u_gen::ampl ← (word~) lin16u_gen::$0
(word~) lin16u_gen::$1 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$2 ← call divr16u (word) lin16u_gen::ampl (word~) lin16u_gen::$1 (byte/signed byte/word/signed word/dword/signed dword) 0
(word/signed dword/dword~) lin16u_gen::$1 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$2 ← call divr16u (word) lin16u_gen::ampl (word/signed dword/dword~) lin16u_gen::$1 (byte/signed byte/word/signed word/dword/signed dword) 0
(word) lin16u_gen::stepi ← (word~) lin16u_gen::$2
(word~) lin16u_gen::$3 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$4 ← call divr16u (byte/signed byte/word/signed word/dword/signed dword) 0 (word~) lin16u_gen::$3 (word) rem16u
(word/signed dword/dword~) lin16u_gen::$3 ← (word) lin16u_gen::length - (byte/signed byte/word/signed word/dword/signed dword) 1
(word~) lin16u_gen::$4 ← call divr16u (byte/signed byte/word/signed word/dword/signed dword) 0 (word/signed dword/dword~) lin16u_gen::$3 (word) rem16u
(word) lin16u_gen::stepf ← (word~) lin16u_gen::$4
(dword) lin16u_gen::step ← { (word) lin16u_gen::stepi, (word) lin16u_gen::stepf }
(dword) lin16u_gen::val ← { (word) lin16u_gen::min, (byte/signed byte/word/signed word/dword/signed dword) 0 }
@ -1662,8 +1662,8 @@ divr16u::@4: scope:[divr16u] from divr16u::@1
(word) divr16u::quotient#7 ← phi( divr16u::@1/(word) divr16u::quotient#6 )
(word) divr16u::dividend#7 ← phi( divr16u::@1/(word) divr16u::dividend#3 )
(word) divr16u::rem#7 ← phi( divr16u::@1/(word) divr16u::rem#0 )
(word~) divr16u::$5 ← (word) divr16u::rem#7 | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem#1 ← (word~) divr16u::$5
(word/dword~) divr16u::$5 ← (word) divr16u::rem#7 | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem#1 ← (word/dword~) divr16u::$5
to:divr16u::@2
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
(word) divr16u::divisor#7 ← phi( divr16u::@2/(word) divr16u::divisor#2 divr16u::@5/(word) divr16u::divisor#3 )
@ -2014,8 +2014,8 @@ main::@21: scope:[main] from main::@20
(byte*) line_cursor#17 ← phi( main::@20/(byte*) line_cursor#2 )
(byte*) line_cursor#7 ← (byte*) line_cursor#17
(byte*) char_cursor#30 ← (byte*) char_cursor#68
(byte/word~) main::$19 ← (byte) main::i#6 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i#1 ← (byte/word~) main::$19
(byte/signed word/word/dword/signed dword~) main::$19 ← (byte) main::i#6 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::i#1 ← (byte/signed word/word/dword/signed dword~) main::$19
(byte/signed byte/word/signed word/dword/signed dword~) main::$20 ← (byte/signed byte/word/signed word/dword/signed dword) 20 * (byte/signed byte/word/signed word/dword/signed dword) 2
(boolean~) main::$21 ← (byte) main::i#1 < (byte/signed byte/word/signed word/dword/signed dword~) main::$20
if((boolean~) main::$21) goto main::@1
@ -2098,9 +2098,9 @@ lin16u_gen: scope:[lin16u_gen] from main main::@3 main::@4
(word) lin16u_gen::max#3 ← phi( main/(word) lin16u_gen::max#0 main::@3/(word) lin16u_gen::max#1 main::@4/(word) lin16u_gen::max#2 )
(word~) lin16u_gen::$0 ← (word) lin16u_gen::max#3 - (word) lin16u_gen::min#3
(word) lin16u_gen::ampl#0 ← (word~) lin16u_gen::$0
(word~) lin16u_gen::$1 ← (word) lin16u_gen::length#3 - (byte/signed byte/word/signed word/dword/signed dword) 1
(word/signed dword/dword~) lin16u_gen::$1 ← (word) lin16u_gen::length#3 - (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::dividend#1 ← (word) lin16u_gen::ampl#0
(word) divr16u::divisor#0 ← (word~) lin16u_gen::$1
(word) divr16u::divisor#0 ← (word/signed dword/dword~) lin16u_gen::$1
(word) divr16u::rem#3 ← (byte/signed byte/word/signed word/dword/signed dword) 0
call divr16u param-assignment
(word) divr16u::return#2 ← (word) divr16u::return#1
@ -2114,9 +2114,9 @@ lin16u_gen::@3: scope:[lin16u_gen] from lin16u_gen
(word~) lin16u_gen::$2 ← (word) divr16u::return#5
(word) rem16u#7 ← (word) rem16u#16
(word) lin16u_gen::stepi#0 ← (word~) lin16u_gen::$2
(word~) lin16u_gen::$3 ← (word) lin16u_gen::length#4 - (byte/signed byte/word/signed word/dword/signed dword) 1
(word/signed dword/dword~) lin16u_gen::$3 ← (word) lin16u_gen::length#4 - (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::dividend#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0
(word) divr16u::divisor#1 ← (word~) lin16u_gen::$3
(word) divr16u::divisor#1 ← (word/signed dword/dword~) lin16u_gen::$3
(word) divr16u::rem#4 ← (word) rem16u#7
call divr16u param-assignment
(word) divr16u::return#3 ← (word) divr16u::return#1
@ -2281,7 +2281,7 @@ SYMBOL TABLE SSA
(byte~) divr16u::$2
(boolean~) divr16u::$3
(boolean~) divr16u::$4
(word~) divr16u::$5
(word/dword~) divr16u::$5
(word~) divr16u::$6
(word~) divr16u::$7
(boolean~) divr16u::$8
@ -2353,9 +2353,9 @@ SYMBOL TABLE SSA
(word) divr16u::return#6
(void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length)
(word~) lin16u_gen::$0
(word~) lin16u_gen::$1
(word/signed dword/dword~) lin16u_gen::$1
(word~) lin16u_gen::$2
(word~) lin16u_gen::$3
(word/signed dword/dword~) lin16u_gen::$3
(word~) lin16u_gen::$4
(word~) lin16u_gen::$5
(dword~) lin16u_gen::$6
@ -2462,7 +2462,7 @@ SYMBOL TABLE SSA
(byte*) line_cursor#8
(byte*) line_cursor#9
(void()) main()
(byte/word~) main::$19
(byte/signed word/word/dword/signed dword~) main::$19
(byte/signed byte/word/signed word/dword/signed dword~) main::$20
(boolean~) main::$21
(label) main::@1
@ -2734,7 +2734,7 @@ Alias (word) divr16u::dividend#3 = (word) divr16u::dividend#7
Alias (word) divr16u::quotient#6 = (word) divr16u::quotient#7
Alias (word) divr16u::divisor#4 = (word) divr16u::divisor#5
Alias (byte) divr16u::i#5 = (byte) divr16u::i#6
Alias (word) divr16u::rem#1 = (word~) divr16u::$5
Alias (word) divr16u::rem#1 = (word/dword~) divr16u::$5
Alias (word) divr16u::rem#6 = (word) divr16u::rem#8
Alias (word) divr16u::divisor#2 = (word) divr16u::divisor#3
Alias (byte) divr16u::i#3 = (byte) divr16u::i#4
@ -2784,7 +2784,7 @@ Alias (byte*) char_cursor#28 = (byte*) char_cursor#66
Alias (byte*) char_cursor#29 = (byte*) char_cursor#67
Alias (byte*) line_cursor#17 = (byte*) line_cursor#7 (byte*) line_cursor#46 (byte*) line_cursor#44 (byte*) line_cursor#41 (byte*) line_cursor#38 (byte*) line_cursor#34 (byte*) line_cursor#30 (byte*) line_cursor#25
Alias (byte*) char_cursor#30 = (byte*) char_cursor#68 (byte*) char_cursor#84
Alias (byte) main::i#1 = (byte/word~) main::$19
Alias (byte) main::i#1 = (byte/signed word/word/dword/signed dword~) main::$19
Alias (byte*) char_cursor#31 = (byte*) char_cursor#69
Alias (byte*) char_cursor#32 = (byte*) char_cursor#70
Alias (byte*) char_cursor#33 = (byte*) char_cursor#71
@ -2794,14 +2794,14 @@ Alias (byte*) char_cursor#36 = (byte*) char_cursor#74
Alias (byte*) line_cursor#18 = (byte*) line_cursor#8 (byte*) line_cursor#19 (byte*) line_cursor#9
Alias (byte*) char_cursor#37 = (byte*) char_cursor#75 (byte*) char_cursor#76 (byte*) char_cursor#38
Alias (word) lin16u_gen::ampl#0 = (word~) lin16u_gen::$0
Alias (word) divr16u::divisor#0 = (word~) lin16u_gen::$1
Alias (word) divr16u::divisor#0 = (word/signed dword/dword~) lin16u_gen::$1
Alias (word) divr16u::return#2 = (word) divr16u::return#5
Alias (word) lin16u_gen::length#3 = (word) lin16u_gen::length#4 (word) lin16u_gen::length#6
Alias (word) lin16u_gen::min#3 = (word) lin16u_gen::min#5 (word) lin16u_gen::min#4
Alias (word*) lin16u_gen::lintab#5 = (word*) lin16u_gen::lintab#6 (word*) lin16u_gen::lintab#7
Alias (word) rem16u#16 = (word) rem16u#7
Alias (word) lin16u_gen::stepi#0 = (word~) lin16u_gen::$2 (word) lin16u_gen::stepi#1
Alias (word) divr16u::divisor#1 = (word~) lin16u_gen::$3
Alias (word) divr16u::divisor#1 = (word/signed dword/dword~) lin16u_gen::$3
Alias (word) divr16u::return#3 = (word) divr16u::return#6
Alias (word) rem16u#17 = (word) rem16u#8
Alias (word) lin16u_gen::stepf#0 = (word~) lin16u_gen::$4

View File

@ -28,10 +28,10 @@ proc (void()) main()
*((byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) num
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@1:
(byte/word~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) main::i
*((byte*) SCREEN + (byte/word~) main::$0) ← *((byte[]) str + (byte) main::i)
(byte/word~) main::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) main::i
*((byte*) SCREEN + (byte/word~) main::$1) ← *((byte[]) nums + (byte) main::i)
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) main::i
*((byte*) SCREEN + (byte/signed word/word/dword/signed dword~) main::$0) ← *((byte[]) str + (byte) main::i)
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) main::i
*((byte*) SCREEN + (byte/signed word/word/dword/signed dword~) main::$1) ← *((byte[]) nums + (byte) main::i)
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$2 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 4
if((boolean~) main::$2) goto main::@1
@ -46,8 +46,8 @@ SYMBOLS
(byte*) SCREEN
(byte) char
(void()) main()
(byte/word~) main::$0
(byte/word~) main::$1
(byte/signed word/word/dword/signed dword~) main::$0
(byte/signed word/word/dword/signed dword~) main::$1
(boolean~) main::$2
(label) main::@1
(label) main::@return
@ -73,10 +73,10 @@ main: scope:[main] from
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:main::@1
main::@1: scope:[main] from main main::@1
(byte/word~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) main::i
*((byte*) SCREEN + (byte/word~) main::$0) ← *((byte[]) str + (byte) main::i)
(byte/word~) main::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) main::i
*((byte*) SCREEN + (byte/word~) main::$1) ← *((byte[]) nums + (byte) main::i)
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) main::i
*((byte*) SCREEN + (byte/signed word/word/dword/signed dword~) main::$0) ← *((byte[]) str + (byte) main::i)
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) main::i
*((byte*) SCREEN + (byte/signed word/word/dword/signed dword~) main::$1) ← *((byte[]) nums + (byte) main::i)
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$2 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 4
if((boolean~) main::$2) goto main::@1
@ -120,10 +120,10 @@ main: scope:[main] from @1
main::@1: scope:[main] from main main::@1
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#1 main::@1/(byte*) SCREEN#2 )
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
(byte/word~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) main::i#2
*((byte*) SCREEN#2 + (byte/word~) main::$0) ← *((byte[]) str#0 + (byte) main::i#2)
(byte/word~) main::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) main::i#2
*((byte*) SCREEN#2 + (byte/word~) main::$1) ← *((byte[]) nums#0 + (byte) main::i#2)
(byte/signed word/word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) main::i#2
*((byte*) SCREEN#2 + (byte/signed word/word/dword/signed dword~) main::$0) ← *((byte[]) str#0 + (byte) main::i#2)
(byte/signed word/word/dword/signed dword~) main::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) main::i#2
*((byte*) SCREEN#2 + (byte/signed word/word/dword/signed dword~) main::$1) ← *((byte[]) nums#0 + (byte) main::i#2)
(byte) main::i#1 ← ++ (byte) main::i#2
(boolean~) main::$2 ← (byte) main::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 4
if((boolean~) main::$2) goto main::@1
@ -160,8 +160,8 @@ SYMBOL TABLE SSA
(byte) char#1
(byte) char#2
(void()) main()
(byte/word~) main::$0
(byte/word~) main::$1
(byte/signed word/word/dword/signed dword~) main::$0
(byte/signed word/word/dword/signed dword~) main::$1
(boolean~) main::$2
(label) main::@1
(label) main::@return
@ -221,11 +221,13 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Succesful SSA optimization Pass2ConstantAdditionElimination
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2
Eliminating unused constant (const string) $2
Eliminating unused constant (const string) $3
Eliminating unused constant (const string) $0
Succesful SSA optimization PassNEliminateUnusedVars
Alias (byte) main::i#2 = (byte/word~) main::$0 (byte/word~) main::$1
Alias (byte) main::i#2 = (byte~) main::$0 (byte~) main::$1
Succesful SSA optimization Pass2AliasElimination
OPTIMIZING CONTROL FLOW GRAPH
Inlining constant with var siblings (const byte) main::i#0

View File

@ -20,11 +20,11 @@ STATEMENTS
proc (void()) main()
(byte) main::a ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) main::$0 ← call inci
(byte/word~) main::$1 ← (byte) main::a + (byte~) main::$0
(byte) main::a ← (byte/word~) main::$1
(byte~) main::$1 ← (byte) main::a + (byte~) main::$0
(byte) main::a ← (byte~) main::$1
(byte~) main::$2 ← call inci
(byte/word~) main::$3 ← (byte) main::a + (byte~) main::$2
(byte) main::a ← (byte/word~) main::$3
(byte~) main::$3 ← (byte) main::a + (byte~) main::$2
(byte) main::a ← (byte~) main::$3
(byte*) main::SCREEN ← (word/signed word/dword/signed dword) 1024
*((byte*) main::SCREEN) ← (byte) i
(byte*~) main::$4 ← (byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1
@ -33,8 +33,8 @@ main::@return:
return
endproc // main()
proc (byte()) inci()
(byte/word~) inci::$0 ← (byte) i + (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) i ← (byte/word~) inci::$0
(byte/signed word/word/dword/signed dword~) inci::$0 ← (byte) i + (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) i ← (byte/signed word/word/dword/signed dword~) inci::$0
(byte) inci::return ← (byte) i
goto inci::@return
inci::@return:
@ -46,14 +46,14 @@ endproc // inci()
SYMBOLS
(byte) i
(byte()) inci()
(byte/word~) inci::$0
(byte/signed word/word/dword/signed dword~) inci::$0
(label) inci::@return
(byte) inci::return
(void()) main()
(byte~) main::$0
(byte/word~) main::$1
(byte~) main::$1
(byte~) main::$2
(byte/word~) main::$3
(byte~) main::$3
(byte*~) main::$4
(label) main::@return
(byte*) main::SCREEN
@ -67,11 +67,11 @@ INITIAL CONTROL FLOW GRAPH
main: scope:[main] from
(byte) main::a ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte~) main::$0 ← call inci
(byte/word~) main::$1 ← (byte) main::a + (byte~) main::$0
(byte) main::a ← (byte/word~) main::$1
(byte~) main::$1 ← (byte) main::a + (byte~) main::$0
(byte) main::a ← (byte~) main::$1
(byte~) main::$2 ← call inci
(byte/word~) main::$3 ← (byte) main::a + (byte~) main::$2
(byte) main::a ← (byte/word~) main::$3
(byte~) main::$3 ← (byte) main::a + (byte~) main::$2
(byte) main::a ← (byte~) main::$3
(byte*) main::SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
*((byte*) main::SCREEN) ← (byte) i
(byte*~) main::$4 ← (byte*) main::SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1
@ -83,8 +83,8 @@ main::@return: scope:[main] from main
@1: scope:[] from @begin
to:@2
inci: scope:[inci] from
(byte/word~) inci::$0 ← (byte) i + (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) i ← (byte/word~) inci::$0
(byte/signed word/word/dword/signed dword~) inci::$0 ← (byte) i + (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) i ← (byte/signed word/word/dword/signed dword~) inci::$0
(byte) inci::return ← (byte) i
to:inci::@return
inci::@return: scope:[inci] from inci inci::@1
@ -123,8 +123,8 @@ main::@1: scope:[main] from main
(byte) inci::return#4 ← phi( main/(byte) inci::return#0 )
(byte~) main::$0 ← (byte) inci::return#4
(byte) i#1 ← (byte) i#7
(byte/word~) main::$1 ← (byte) main::a#3 + (byte~) main::$0
(byte) main::a#1 ← (byte/word~) main::$1
(byte~) main::$1 ← (byte) main::a#3 + (byte~) main::$0
(byte) main::a#1 ← (byte~) main::$1
call inci param-assignment
(byte) inci::return#1 ← (byte) inci::return#3
to:main::@2
@ -134,8 +134,8 @@ main::@2: scope:[main] from main::@1
(byte) inci::return#5 ← phi( main::@1/(byte) inci::return#1 )
(byte~) main::$2 ← (byte) inci::return#5
(byte) i#2 ← (byte) i#8
(byte/word~) main::$3 ← (byte) main::a#4 + (byte~) main::$2
(byte) main::a#2 ← (byte/word~) main::$3
(byte~) main::$3 ← (byte) main::a#4 + (byte~) main::$2
(byte) main::a#2 ← (byte~) main::$3
(byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
*((byte*) main::SCREEN#0) ← (byte) i#2
(byte*~) main::$4 ← (byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1
@ -148,8 +148,8 @@ main::@return: scope:[main] from main::@2
to:@return
inci: scope:[inci] from main main::@1
(byte) i#10 ← phi( main/(byte) i#13 main::@1/(byte) i#1 )
(byte/word~) inci::$0 ← (byte) i#10 + (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) i#4 ← (byte/word~) inci::$0
(byte/signed word/word/dword/signed dword~) inci::$0 ← (byte) i#10 + (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) i#4 ← (byte/signed word/word/dword/signed dword~) inci::$0
(byte) inci::return#2 ← (byte) i#4
to:inci::@return
inci::@return: scope:[inci] from inci
@ -191,7 +191,7 @@ SYMBOL TABLE SSA
(byte) i#8
(byte) i#9
(byte()) inci()
(byte/word~) inci::$0
(byte/signed word/word/dword/signed dword~) inci::$0
(label) inci::@return
(byte) inci::return
(byte) inci::return#0
@ -203,9 +203,9 @@ SYMBOL TABLE SSA
(byte) inci::return#6
(void()) main()
(byte~) main::$0
(byte/word~) main::$1
(byte~) main::$1
(byte~) main::$2
(byte/word~) main::$3
(byte~) main::$3
(byte*~) main::$4
(label) main::@1
(label) main::@2
@ -233,11 +233,11 @@ Not aliassing across scopes: i#12 i#3
Alias (byte) inci::return#0 = (byte) inci::return#4
Alias (byte) main::a#0 = (byte) main::a#3
Alias (byte) i#1 = (byte) i#7
Alias (byte) main::a#1 = (byte/word~) main::$1 (byte) main::a#4
Alias (byte) main::a#1 = (byte~) main::$1 (byte) main::a#4
Alias (byte) inci::return#1 = (byte) inci::return#5
Alias (byte) i#2 = (byte) i#8 (byte) i#9 (byte) i#3
Alias (byte) main::a#2 = (byte/word~) main::$3
Alias (byte) i#11 = (byte) i#4 (byte/word~) inci::$0 (byte) i#5
Alias (byte) main::a#2 = (byte~) main::$3
Alias (byte) i#11 = (byte) i#4 (byte/signed word/word/dword/signed dword~) inci::$0 (byte) i#5
Alias (byte) inci::return#2 = (byte) inci::return#6 (byte) inci::return#3
Alias (byte) i#0 = (byte) i#14
Alias (byte) i#12 = (byte) i#6

View File

@ -19,8 +19,8 @@ main::@1:
(boolean~) main::$0 ← (byte) main::i > (byte/signed byte/word/signed word/dword/signed dword) 5
(boolean~) main::$1 ← ! (boolean~) main::$0
if((boolean~) main::$1) goto main::@2
(byte/word~) main::$2 ← (byte) main::s + (byte) main::i
(byte) main::s ← (byte/word~) main::$2
(byte~) main::$2 ← (byte) main::s + (byte) main::i
(byte) main::s ← (byte~) main::$2
main::@2:
(byte) main::i ← -- (byte) main::i
(boolean~) main::$3 ← (byte) main::i > (byte/signed byte/word/signed word/dword/signed dword) 0
@ -34,7 +34,7 @@ SYMBOLS
(void()) main()
(boolean~) main::$0
(boolean~) main::$1
(byte/word~) main::$2
(byte~) main::$2
(boolean~) main::$3
(label) main::@1
(label) main::@2
@ -60,8 +60,8 @@ main::@2: scope:[main] from main::@1 main::@3
if((boolean~) main::$3) goto main::@1
to:main::@4
main::@3: scope:[main] from main::@1
(byte/word~) main::$2 ← (byte) main::s + (byte) main::i
(byte) main::s ← (byte/word~) main::$2
(byte~) main::$2 ← (byte) main::s + (byte) main::i
(byte) main::s ← (byte~) main::$2
to:main::@2
main::@4: scope:[main] from main::@2
to:main::@return
@ -104,8 +104,8 @@ main::@2: scope:[main] from main::@1 main::@3
main::@3: scope:[main] from main::@1
(byte) main::i#4 ← phi( main::@1/(byte) main::i#2 )
(byte) main::s#2 ← phi( main::@1/(byte) main::s#3 )
(byte/word~) main::$2 ← (byte) main::s#2 + (byte) main::i#4
(byte) main::s#1 ← (byte/word~) main::$2
(byte~) main::$2 ← (byte) main::s#2 + (byte) main::i#4
(byte) main::s#1 ← (byte~) main::$2
to:main::@2
main::@return: scope:[main] from main::@2
return
@ -125,7 +125,7 @@ SYMBOL TABLE SSA
(void()) main()
(boolean~) main::$0
(boolean~) main::$1
(byte/word~) main::$2
(byte~) main::$2
(boolean~) main::$3
(label) main::@1
(label) main::@2
@ -151,7 +151,7 @@ Inversing boolean not (boolean~) main::$1 ← (byte) main::i#2 <= (byte/signed b
Succesful SSA optimization Pass2UnaryNotSimplification
Alias (byte) main::s#2 = (byte) main::s#3
Alias (byte) main::i#2 = (byte) main::i#4
Alias (byte) main::s#1 = (byte/word~) main::$2
Alias (byte) main::s#1 = (byte~) main::$2
Succesful SSA optimization Pass2AliasElimination
Alias (byte) main::i#2 = (byte) main::i#3
Succesful SSA optimization Pass2AliasElimination

View File

@ -41,8 +41,8 @@ main::@return:
endproc // main()
proc (void()) line((byte) line::l)
(void~) line::$0 ← call plot (byte) line::l
(byte/word~) line::$1 ← (byte) line::l + (byte/signed byte/word/signed word/dword/signed dword) 20
(void~) line::$2 ← call plot (byte/word~) line::$1
(byte/signed word/word/dword/signed dword~) line::$1 ← (byte) line::l + (byte/signed byte/word/signed word/dword/signed dword) 20
(void~) line::$2 ← call plot (byte/signed word/word/dword/signed dword~) line::$1
line::@return:
return
endproc // line()
@ -57,7 +57,7 @@ SYMBOLS
(byte*) SCREEN
(void()) line((byte) line::l)
(void~) line::$0
(byte/word~) line::$1
(byte/signed word/word/dword/signed dword~) line::$1
(void~) line::$2
(label) line::@return
(byte) line::l
@ -107,8 +107,8 @@ main::@return: scope:[main] from main::@4
to:@2
line: scope:[line] from
(void~) line::$0 ← call plot (byte) line::l
(byte/word~) line::$1 ← (byte) line::l + (byte/signed byte/word/signed word/dword/signed dword) 20
(void~) line::$2 ← call plot (byte/word~) line::$1
(byte/signed word/word/dword/signed dword~) line::$1 ← (byte) line::l + (byte/signed byte/word/signed word/dword/signed dword) 20
(void~) line::$2 ← call plot (byte/signed word/word/dword/signed dword~) line::$1
to:line::@return
line::@return: scope:[line] from line
return
@ -191,8 +191,8 @@ line: scope:[line] from main::@1 main::@2
line::@1: scope:[line] from line
(byte*) SCREEN#3 ← phi( line/(byte*) SCREEN#2 )
(byte) line::l#3 ← phi( line/(byte) line::l#2 )
(byte/word~) line::$1 ← (byte) line::l#3 + (byte/signed byte/word/signed word/dword/signed dword) 20
(byte) plot::x#1 ← (byte/word~) line::$1
(byte/signed word/word/dword/signed dword~) line::$1 ← (byte) line::l#3 + (byte/signed byte/word/signed word/dword/signed dword) 20
(byte) plot::x#1 ← (byte/signed word/word/dword/signed dword~) line::$1
call plot param-assignment
to:line::@2
line::@2: scope:[line] from line::@1
@ -234,7 +234,7 @@ SYMBOL TABLE SSA
(byte*) SCREEN#8
(byte*) SCREEN#9
(void()) line((byte) line::l)
(byte/word~) line::$1
(byte/signed word/word/dword/signed dword~) line::$1
(label) line::@1
(label) line::@2
(label) line::@return
@ -287,7 +287,7 @@ Alias (byte) main::j#2 = (byte) main::j#3
Alias (byte*) SCREEN#5 = (byte*) SCREEN#9
Alias (byte) line::l#2 = (byte) line::l#3
Alias (byte*) SCREEN#2 = (byte*) SCREEN#3
Alias (byte) plot::x#1 = (byte/word~) line::$1
Alias (byte) plot::x#1 = (byte/signed word/word/dword/signed dword~) line::$1
Alias (byte*) SCREEN#0 = (byte*) SCREEN#10
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: SCREEN#6 SCREEN#0

View File

@ -40,8 +40,8 @@ main::@return:
return
endproc // main()
proc (void()) ln()
(byte/word~) ln::$0 ← (byte) line + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) line ← (byte/word~) ln::$0
(byte/signed word/word/dword/signed dword~) ln::$0 ← (byte) line + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) line ← (byte/signed word/word/dword/signed dword~) ln::$0
(byte) char ← (byte) line
ln::@return:
return
@ -53,7 +53,7 @@ SYMBOLS
(byte) char
(byte) line
(void()) ln()
(byte/word~) ln::$0
(byte/signed word/word/dword/signed dword~) ln::$0
(label) ln::@return
(void()) main()
(void~) main::$0
@ -82,8 +82,8 @@ main::@return: scope:[main] from main
@1: scope:[] from @begin
to:@2
ln: scope:[ln] from
(byte/word~) ln::$0 ← (byte) line + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) line ← (byte/word~) ln::$0
(byte/signed word/word/dword/signed dword~) ln::$0 ← (byte) line + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) line ← (byte/signed word/word/dword/signed dword~) ln::$0
(byte) char ← (byte) line
to:ln::@return
ln::@return: scope:[ln] from ln
@ -157,8 +157,8 @@ main::@return: scope:[main] from main::@3
to:@return
ln: scope:[ln] from main main::@1 main::@2
(byte) line#12 ← phi( main/(byte) line#15 main::@1/(byte) line#1 main::@2/(byte) line#2 )
(byte/word~) ln::$0 ← (byte) line#12 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) line#5 ← (byte/word~) ln::$0
(byte/signed word/word/dword/signed dword~) ln::$0 ← (byte) line#12 + (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) line#5 ← (byte/signed word/word/dword/signed dword~) ln::$0
(byte) char#7 ← (byte) line#5
to:ln::@return
ln::@return: scope:[ln] from ln
@ -232,7 +232,7 @@ SYMBOL TABLE SSA
(byte) line#8
(byte) line#9
(void()) ln()
(byte/word~) ln::$0
(byte/signed word/word/dword/signed dword~) ln::$0
(label) ln::@return
(void()) main()
(label) main::@1
@ -261,7 +261,7 @@ Alias (byte) line#2 = (byte) line#9
Alias (byte) char#11 = (byte) char#3
Alias (byte) line#10 = (byte) line#3 (byte) line#11 (byte) line#4
Alias (byte) char#12 = (byte) char#5 (byte) char#13 (byte) char#6
Alias (byte) line#13 = (byte) line#5 (byte/word~) ln::$0 (byte) char#7 (byte) char#14 (byte) line#6 (byte) char#8
Alias (byte) line#13 = (byte) line#5 (byte/signed word/word/dword/signed dword~) ln::$0 (byte) char#7 (byte) char#14 (byte) line#6 (byte) char#8
Alias (byte*) SCREEN#0 = (byte*) SCREEN#5
Alias (byte) line#14 = (byte) line#7
Alias (byte) char#15 = (byte) char#9

View File

@ -75,8 +75,8 @@ main::@3:
(byte) main::scroll ← (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@5:
(byte/word~) main::$6 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte[]) main::line + (byte) main::i) ← *((byte[]) main::line + (byte/word~) main::$6)
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte[]) main::line + (byte) main::i) ← *((byte[]) main::line + (byte/signed word/word/dword/signed dword~) main::$6)
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$7 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 39
if((boolean~) main::$7) goto main::@5
@ -130,7 +130,7 @@ SYMBOLS
(boolean~) main::$3
(boolean~) main::$4
(boolean~) main::$5
(byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(boolean~) main::$9
@ -195,8 +195,8 @@ main::@9: scope:[main] from main::@8
(byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:main::@5
main::@5: scope:[main] from main::@5 main::@9
(byte/word~) main::$6 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte[]) main::line + (byte) main::i) ← *((byte[]) main::line + (byte/word~) main::$6)
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte[]) main::line + (byte) main::i) ← *((byte[]) main::line + (byte/signed word/word/dword/signed dword~) main::$6)
(byte) main::i ← ++ (byte) main::i
(boolean~) main::$7 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 39
if((boolean~) main::$7) goto main::@5
@ -359,8 +359,8 @@ main::@5: scope:[main] from main::@5 main::@9
(byte*) TEXT#6 ← phi( main::@5/(byte*) TEXT#6 main::@9/(byte*) TEXT#7 )
(byte*) main::nxt#5 ← phi( main::@5/(byte*) main::nxt#5 main::@9/(byte*) main::nxt#6 )
(byte) main::i#2 ← phi( main::@5/(byte) main::i#1 main::@9/(byte) main::i#0 )
(byte/word~) main::$6 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte[]) main::line#0 + (byte) main::i#2) ← *((byte[]) main::line#0 + (byte/word~) main::$6)
(byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte[]) main::line#0 + (byte) main::i#2) ← *((byte[]) main::line#0 + (byte/signed word/word/dword/signed dword~) main::$6)
(byte) main::i#1 ← ++ (byte) main::i#2
(boolean~) main::$7 ← (byte) main::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 39
if((boolean~) main::$7) goto main::@5
@ -524,7 +524,7 @@ SYMBOL TABLE SSA
(boolean~) main::$3
(boolean~) main::$4
(boolean~) main::$5
(byte/word~) main::$6
(byte/signed word/word/dword/signed dword~) main::$6
(boolean~) main::$7
(boolean~) main::$8
(boolean~) main::$9
@ -745,6 +745,7 @@ Consolidated array index constant in assignment *(main::line#0+1 + main::$6)
Consolidated array index constant in *(main::line#0+39)
Succesful SSA optimization Pass2ConstantAdditionElimination
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::i#2
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@9
@ -754,7 +755,7 @@ Not aliassing identity: BGCOL#5 BGCOL#5
Not aliassing identity: SCROLL#7 SCROLL#7
Not aliassing identity: TEXT#10 TEXT#10
Not aliassing across scopes: main::nxt#2 TEXT#10
Alias (byte) main::i#2 = (byte/word~) main::$6
Alias (byte) main::i#2 = (byte~) main::$6
Succesful SSA optimization Pass2AliasElimination
Not aliassing identity: RASTER#1 RASTER#1
Not aliassing identity: BGCOL#5 BGCOL#5

View File

@ -201,50 +201,50 @@ scroll_hard::@1:
(byte*~) scroll_hard::$1 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$0
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 0
(byte*~) scroll_hard::$3 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2
(byte/word~) scroll_hard::$4 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$1 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$3 + (byte/word~) scroll_hard::$4)
(byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$1 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$3 + (byte/signed word/word/dword/signed dword~) scroll_hard::$4)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*~) scroll_hard::$6 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*~) scroll_hard::$8 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7
(byte/word~) scroll_hard::$9 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$6 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$8 + (byte/word~) scroll_hard::$9)
(byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$6 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$8 + (byte/signed word/word/dword/signed dword~) scroll_hard::$9)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*~) scroll_hard::$11 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*~) scroll_hard::$13 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12
(byte/word~) scroll_hard::$14 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$11 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$13 + (byte/word~) scroll_hard::$14)
(byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$11 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$13 + (byte/signed word/word/dword/signed dword~) scroll_hard::$14)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*~) scroll_hard::$16 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*~) scroll_hard::$18 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17
(byte/word~) scroll_hard::$19 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$16 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$18 + (byte/word~) scroll_hard::$19)
(byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$16 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$18 + (byte/signed word/word/dword/signed dword~) scroll_hard::$19)
(byte/word/signed word/dword/signed dword~) scroll_hard::$20 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
(byte*~) scroll_hard::$21 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$20
(byte/word/signed word/dword/signed dword~) scroll_hard::$22 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
(byte*~) scroll_hard::$23 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$22
(byte/word~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$21 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$23 + (byte/word~) scroll_hard::$24)
(byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$21 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$23 + (byte/signed word/word/dword/signed dword~) scroll_hard::$24)
(byte/word/signed word/dword/signed dword~) scroll_hard::$25 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
(byte*~) scroll_hard::$26 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$25
(byte/word/signed word/dword/signed dword~) scroll_hard::$27 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
(byte*~) scroll_hard::$28 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$27
(byte/word~) scroll_hard::$29 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$26 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$28 + (byte/word~) scroll_hard::$29)
(byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$26 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$28 + (byte/signed word/word/dword/signed dword~) scroll_hard::$29)
(byte/word/signed word/dword/signed dword~) scroll_hard::$30 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*~) scroll_hard::$31 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$30
(byte/word/signed word/dword/signed dword~) scroll_hard::$32 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*~) scroll_hard::$33 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$32
(byte/word~) scroll_hard::$34 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$31 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$33 + (byte/word~) scroll_hard::$34)
(byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$31 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$33 + (byte/signed word/word/dword/signed dword~) scroll_hard::$34)
(word/signed word/dword/signed dword~) scroll_hard::$35 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
(byte*~) scroll_hard::$36 ← (byte*) SCREEN + (word/signed word/dword/signed dword~) scroll_hard::$35
(word/signed word/dword/signed dword~) scroll_hard::$37 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
(byte*~) scroll_hard::$38 ← (byte*) SCREEN + (word/signed word/dword/signed dword~) scroll_hard::$37
(byte/word~) scroll_hard::$39 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$36 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$38 + (byte/word~) scroll_hard::$39)
(byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$36 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$38 + (byte/signed word/word/dword/signed dword~) scroll_hard::$39)
(byte) scroll_hard::i ← ++ (byte) scroll_hard::i
(boolean~) scroll_hard::$40 ← (byte) scroll_hard::i != (byte/signed byte/word/signed word/dword/signed dword) 39
if((boolean~) scroll_hard::$40) goto scroll_hard::@1
@ -332,41 +332,41 @@ SYMBOLS
(byte*~) scroll_hard::$11
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12
(byte*~) scroll_hard::$13
(byte/word~) scroll_hard::$14
(byte/signed word/word/dword/signed dword~) scroll_hard::$14
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15
(byte*~) scroll_hard::$16
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17
(byte*~) scroll_hard::$18
(byte/word~) scroll_hard::$19
(byte/signed word/word/dword/signed dword~) scroll_hard::$19
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2
(byte/word/signed word/dword/signed dword~) scroll_hard::$20
(byte*~) scroll_hard::$21
(byte/word/signed word/dword/signed dword~) scroll_hard::$22
(byte*~) scroll_hard::$23
(byte/word~) scroll_hard::$24
(byte/signed word/word/dword/signed dword~) scroll_hard::$24
(byte/word/signed word/dword/signed dword~) scroll_hard::$25
(byte*~) scroll_hard::$26
(byte/word/signed word/dword/signed dword~) scroll_hard::$27
(byte*~) scroll_hard::$28
(byte/word~) scroll_hard::$29
(byte/signed word/word/dword/signed dword~) scroll_hard::$29
(byte*~) scroll_hard::$3
(byte/word/signed word/dword/signed dword~) scroll_hard::$30
(byte*~) scroll_hard::$31
(byte/word/signed word/dword/signed dword~) scroll_hard::$32
(byte*~) scroll_hard::$33
(byte/word~) scroll_hard::$34
(byte/signed word/word/dword/signed dword~) scroll_hard::$34
(word/signed word/dword/signed dword~) scroll_hard::$35
(byte*~) scroll_hard::$36
(word/signed word/dword/signed dword~) scroll_hard::$37
(byte*~) scroll_hard::$38
(byte/word~) scroll_hard::$39
(byte/word~) scroll_hard::$4
(byte/signed word/word/dword/signed dword~) scroll_hard::$39
(byte/signed word/word/dword/signed dword~) scroll_hard::$4
(boolean~) scroll_hard::$40
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5
(byte*~) scroll_hard::$6
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7
(byte*~) scroll_hard::$8
(byte/word~) scroll_hard::$9
(byte/signed word/word/dword/signed dword~) scroll_hard::$9
(label) scroll_hard::@1
(label) scroll_hard::@return
(byte) scroll_hard::i
@ -527,50 +527,50 @@ scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1
(byte*~) scroll_hard::$1 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$0
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 0
(byte*~) scroll_hard::$3 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2
(byte/word~) scroll_hard::$4 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$1 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$3 + (byte/word~) scroll_hard::$4)
(byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$1 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$3 + (byte/signed word/word/dword/signed dword~) scroll_hard::$4)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*~) scroll_hard::$6 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*~) scroll_hard::$8 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7
(byte/word~) scroll_hard::$9 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$6 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$8 + (byte/word~) scroll_hard::$9)
(byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$6 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$8 + (byte/signed word/word/dword/signed dword~) scroll_hard::$9)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*~) scroll_hard::$11 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*~) scroll_hard::$13 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12
(byte/word~) scroll_hard::$14 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$11 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$13 + (byte/word~) scroll_hard::$14)
(byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$11 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$13 + (byte/signed word/word/dword/signed dword~) scroll_hard::$14)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*~) scroll_hard::$16 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*~) scroll_hard::$18 ← (byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17
(byte/word~) scroll_hard::$19 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$16 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$18 + (byte/word~) scroll_hard::$19)
(byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$16 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$18 + (byte/signed word/word/dword/signed dword~) scroll_hard::$19)
(byte/word/signed word/dword/signed dword~) scroll_hard::$20 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
(byte*~) scroll_hard::$21 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$20
(byte/word/signed word/dword/signed dword~) scroll_hard::$22 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
(byte*~) scroll_hard::$23 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$22
(byte/word~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$21 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$23 + (byte/word~) scroll_hard::$24)
(byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$21 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$23 + (byte/signed word/word/dword/signed dword~) scroll_hard::$24)
(byte/word/signed word/dword/signed dword~) scroll_hard::$25 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
(byte*~) scroll_hard::$26 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$25
(byte/word/signed word/dword/signed dword~) scroll_hard::$27 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
(byte*~) scroll_hard::$28 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$27
(byte/word~) scroll_hard::$29 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$26 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$28 + (byte/word~) scroll_hard::$29)
(byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$26 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$28 + (byte/signed word/word/dword/signed dword~) scroll_hard::$29)
(byte/word/signed word/dword/signed dword~) scroll_hard::$30 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*~) scroll_hard::$31 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$30
(byte/word/signed word/dword/signed dword~) scroll_hard::$32 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*~) scroll_hard::$33 ← (byte*) SCREEN + (byte/word/signed word/dword/signed dword~) scroll_hard::$32
(byte/word~) scroll_hard::$34 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$31 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$33 + (byte/word~) scroll_hard::$34)
(byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$31 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$33 + (byte/signed word/word/dword/signed dword~) scroll_hard::$34)
(word/signed word/dword/signed dword~) scroll_hard::$35 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
(byte*~) scroll_hard::$36 ← (byte*) SCREEN + (word/signed word/dword/signed dword~) scroll_hard::$35
(word/signed word/dword/signed dword~) scroll_hard::$37 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
(byte*~) scroll_hard::$38 ← (byte*) SCREEN + (word/signed word/dword/signed dword~) scroll_hard::$37
(byte/word~) scroll_hard::$39 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$36 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$38 + (byte/word~) scroll_hard::$39)
(byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$36 + (byte) scroll_hard::i) ← *((byte*~) scroll_hard::$38 + (byte/signed word/word/dword/signed dword~) scroll_hard::$39)
(byte) scroll_hard::i ← ++ (byte) scroll_hard::i
(boolean~) scroll_hard::$40 ← (byte) scroll_hard::i != (byte/signed byte/word/signed word/dword/signed dword) 39
if((boolean~) scroll_hard::$40) goto scroll_hard::@1
@ -1012,50 +1012,50 @@ scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1
(byte*~) scroll_hard::$1 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$0
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 0
(byte*~) scroll_hard::$3 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2
(byte/word~) scroll_hard::$4 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$1 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$3 + (byte/word~) scroll_hard::$4)
(byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$1 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$3 + (byte/signed word/word/dword/signed dword~) scroll_hard::$4)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*~) scroll_hard::$6 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*~) scroll_hard::$8 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7
(byte/word~) scroll_hard::$9 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$6 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$8 + (byte/word~) scroll_hard::$9)
(byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$6 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$8 + (byte/signed word/word/dword/signed dword~) scroll_hard::$9)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*~) scroll_hard::$11 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*~) scroll_hard::$13 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12
(byte/word~) scroll_hard::$14 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$11 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$13 + (byte/word~) scroll_hard::$14)
(byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$11 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$13 + (byte/signed word/word/dword/signed dword~) scroll_hard::$14)
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*~) scroll_hard::$16 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*~) scroll_hard::$18 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17
(byte/word~) scroll_hard::$19 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$16 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$18 + (byte/word~) scroll_hard::$19)
(byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$16 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$18 + (byte/signed word/word/dword/signed dword~) scroll_hard::$19)
(byte/word/signed word/dword/signed dword~) scroll_hard::$20 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
(byte*~) scroll_hard::$21 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$20
(byte/word/signed word/dword/signed dword~) scroll_hard::$22 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
(byte*~) scroll_hard::$23 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$22
(byte/word~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$21 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$23 + (byte/word~) scroll_hard::$24)
(byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$21 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$23 + (byte/signed word/word/dword/signed dword~) scroll_hard::$24)
(byte/word/signed word/dword/signed dword~) scroll_hard::$25 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
(byte*~) scroll_hard::$26 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$25
(byte/word/signed word/dword/signed dword~) scroll_hard::$27 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
(byte*~) scroll_hard::$28 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$27
(byte/word~) scroll_hard::$29 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$26 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$28 + (byte/word~) scroll_hard::$29)
(byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$26 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$28 + (byte/signed word/word/dword/signed dword~) scroll_hard::$29)
(byte/word/signed word/dword/signed dword~) scroll_hard::$30 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*~) scroll_hard::$31 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$30
(byte/word/signed word/dword/signed dword~) scroll_hard::$32 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*~) scroll_hard::$33 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$32
(byte/word~) scroll_hard::$34 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$31 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$33 + (byte/word~) scroll_hard::$34)
(byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$31 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$33 + (byte/signed word/word/dword/signed dword~) scroll_hard::$34)
(word/signed word/dword/signed dword~) scroll_hard::$35 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
(byte*~) scroll_hard::$36 ← (byte*) SCREEN#3 + (word/signed word/dword/signed dword~) scroll_hard::$35
(word/signed word/dword/signed dword~) scroll_hard::$37 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
(byte*~) scroll_hard::$38 ← (byte*) SCREEN#3 + (word/signed word/dword/signed dword~) scroll_hard::$37
(byte/word~) scroll_hard::$39 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$36 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$38 + (byte/word~) scroll_hard::$39)
(byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
*((byte*~) scroll_hard::$36 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$38 + (byte/signed word/word/dword/signed dword~) scroll_hard::$39)
(byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2
(boolean~) scroll_hard::$40 ← (byte) scroll_hard::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 39
if((boolean~) scroll_hard::$40) goto scroll_hard::@1
@ -1467,41 +1467,41 @@ SYMBOL TABLE SSA
(byte*~) scroll_hard::$11
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12
(byte*~) scroll_hard::$13
(byte/word~) scroll_hard::$14
(byte/signed word/word/dword/signed dword~) scroll_hard::$14
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15
(byte*~) scroll_hard::$16
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17
(byte*~) scroll_hard::$18
(byte/word~) scroll_hard::$19
(byte/signed word/word/dword/signed dword~) scroll_hard::$19
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2
(byte/word/signed word/dword/signed dword~) scroll_hard::$20
(byte*~) scroll_hard::$21
(byte/word/signed word/dword/signed dword~) scroll_hard::$22
(byte*~) scroll_hard::$23
(byte/word~) scroll_hard::$24
(byte/signed word/word/dword/signed dword~) scroll_hard::$24
(byte/word/signed word/dword/signed dword~) scroll_hard::$25
(byte*~) scroll_hard::$26
(byte/word/signed word/dword/signed dword~) scroll_hard::$27
(byte*~) scroll_hard::$28
(byte/word~) scroll_hard::$29
(byte/signed word/word/dword/signed dword~) scroll_hard::$29
(byte*~) scroll_hard::$3
(byte/word/signed word/dword/signed dword~) scroll_hard::$30
(byte*~) scroll_hard::$31
(byte/word/signed word/dword/signed dword~) scroll_hard::$32
(byte*~) scroll_hard::$33
(byte/word~) scroll_hard::$34
(byte/signed word/word/dword/signed dword~) scroll_hard::$34
(word/signed word/dword/signed dword~) scroll_hard::$35
(byte*~) scroll_hard::$36
(word/signed word/dword/signed dword~) scroll_hard::$37
(byte*~) scroll_hard::$38
(byte/word~) scroll_hard::$39
(byte/word~) scroll_hard::$4
(byte/signed word/word/dword/signed dword~) scroll_hard::$39
(byte/signed word/word/dword/signed dword~) scroll_hard::$4
(boolean~) scroll_hard::$40
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5
(byte*~) scroll_hard::$6
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7
(byte*~) scroll_hard::$8
(byte/word~) scroll_hard::$9
(byte/signed word/word/dword/signed dword~) scroll_hard::$9
(label) scroll_hard::@1
(label) scroll_hard::@return
(byte) scroll_hard::i
@ -2054,6 +2054,14 @@ Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#
Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2
Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2
Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i#2
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i#2
Not culling empty block because it shares successor with its predecessor. (label) scroll_bit::@5
Not aliassing across scopes: scroll#18 scroll#10
Not aliassing across scopes: current_bit#29 current_bit#12
@ -2067,7 +2075,7 @@ Not aliassing across scopes: nxt#36 nxt#31
Not aliassing across scopes: next_char::return#0 next_char::return#1
Not aliassing across scopes: scroll_bit::$3 next_char::return#0
Not aliassing across scopes: nxt#18 nxt#31
Alias (byte) scroll_hard::i#2 = (byte/word~) scroll_hard::$4 (byte/word~) scroll_hard::$9 (byte/word~) scroll_hard::$14 (byte/word~) scroll_hard::$19 (byte/word~) scroll_hard::$24 (byte/word~) scroll_hard::$29 (byte/word~) scroll_hard::$34 (byte/word~) scroll_hard::$39
Alias (byte) scroll_hard::i#2 = (byte~) scroll_hard::$4 (byte~) scroll_hard::$9 (byte~) scroll_hard::$14 (byte~) scroll_hard::$19 (byte~) scroll_hard::$24 (byte~) scroll_hard::$29 (byte~) scroll_hard::$34 (byte~) scroll_hard::$39
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: scroll#18 scroll#10
Not aliassing across scopes: current_bit#29 current_bit#12

View File

@ -205,8 +205,8 @@ proc (void()) anim()
(signed word) ypos ← (byte/signed byte/word/signed word/dword/signed dword) 0
(signed word~) anim::$2 ← - (signed word) xvel
(signed word) xvel ← (signed word~) anim::$2
(signed word~) anim::$3 ← (signed word) yvel_init - (byte/signed byte/word/signed word/dword/signed dword) 10
(signed word) yvel_init ← (signed word~) anim::$3
(signed word/signed dword~) anim::$3 ← (signed word) yvel_init - (byte/signed byte/word/signed word/dword/signed dword) 10
(signed word) yvel_init ← (signed word/signed dword~) anim::$3
(signed word/signed dword~) anim::$4 ← - (byte/word/signed word/dword/signed dword) 200
(boolean~) anim::$5 ← (signed word) yvel_init < (signed word/signed dword~) anim::$4
(boolean~) anim::$6 ← ! (boolean~) anim::$5
@ -222,11 +222,11 @@ anim::@1:
(signed word~) anim::$9 ← (signed word) ypos + (signed word) yvel
(signed word) ypos ← (signed word~) anim::$9
(signed word~) anim::$10 ← (signed word) xpos >> (byte/signed byte/word/signed word/dword/signed dword) 7
(signed word~) anim::$11 ← (signed word~) anim::$10 + (byte/word/signed word/dword/signed dword) 160
(signed word) anim::sprite_x ← (signed word~) anim::$11
(signed word/signed dword~) anim::$11 ← (signed word~) anim::$10 + (byte/word/signed word/dword/signed dword) 160
(signed word) anim::sprite_x ← (signed word/signed dword~) anim::$11
(signed word~) anim::$12 ← (signed word) ypos >> (byte/signed byte/word/signed word/dword/signed dword) 5
(signed word~) anim::$13 ← (byte/word/signed word/dword/signed dword) 230 - (signed word~) anim::$12
(signed word) anim::sprite_y ← (signed word~) anim::$13
(signed word/signed dword~) anim::$13 ← (byte/word/signed word/dword/signed dword) 230 - (signed word~) anim::$12
(signed word) anim::sprite_y ← (signed word/signed dword~) anim::$13
(byte~) anim::$14 ← ((byte)) (signed word) anim::sprite_x
*((byte*) SPRITES_XPOS + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) anim::$14
(byte~) anim::$15 ← ((byte)) (signed word) anim::sprite_y
@ -281,14 +281,14 @@ SYMBOLS
(boolean~) anim::$0
(boolean~) anim::$1
(signed word~) anim::$10
(signed word~) anim::$11
(signed word/signed dword~) anim::$11
(signed word~) anim::$12
(signed word~) anim::$13
(signed word/signed dword~) anim::$13
(byte~) anim::$14
(byte~) anim::$15
(byte~) anim::$16
(signed word~) anim::$2
(signed word~) anim::$3
(signed word/signed dword~) anim::$3
(signed word/signed dword~) anim::$4
(boolean~) anim::$5
(boolean~) anim::$6
@ -459,11 +459,11 @@ anim::@1: scope:[anim] from anim anim::@2
(signed word~) anim::$9 ← (signed word) ypos + (signed word) yvel
(signed word) ypos ← (signed word~) anim::$9
(signed word~) anim::$10 ← (signed word) xpos >> (byte/signed byte/word/signed word/dword/signed dword) 7
(signed word~) anim::$11 ← (signed word~) anim::$10 + (byte/word/signed word/dword/signed dword) 160
(signed word) anim::sprite_x ← (signed word~) anim::$11
(signed word/signed dword~) anim::$11 ← (signed word~) anim::$10 + (byte/word/signed word/dword/signed dword) 160
(signed word) anim::sprite_x ← (signed word/signed dword~) anim::$11
(signed word~) anim::$12 ← (signed word) ypos >> (byte/signed byte/word/signed word/dword/signed dword) 5
(signed word~) anim::$13 ← (byte/word/signed word/dword/signed dword) 230 - (signed word~) anim::$12
(signed word) anim::sprite_y ← (signed word~) anim::$13
(signed word/signed dword~) anim::$13 ← (byte/word/signed word/dword/signed dword) 230 - (signed word~) anim::$12
(signed word) anim::sprite_y ← (signed word/signed dword~) anim::$13
(byte~) anim::$14 ← ((byte)) (signed word) anim::sprite_x
*((byte*) SPRITES_XPOS + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) anim::$14
(byte~) anim::$15 ← ((byte)) (signed word) anim::sprite_y
@ -476,8 +476,8 @@ anim::@3: scope:[anim] from anim
(signed word) ypos ← (byte/signed byte/word/signed word/dword/signed dword) 0
(signed word~) anim::$2 ← - (signed word) xvel
(signed word) xvel ← (signed word~) anim::$2
(signed word~) anim::$3 ← (signed word) yvel_init - (byte/signed byte/word/signed word/dword/signed dword) 10
(signed word) yvel_init ← (signed word~) anim::$3
(signed word/signed dword~) anim::$3 ← (signed word) yvel_init - (byte/signed byte/word/signed word/dword/signed dword) 10
(signed word) yvel_init ← (signed word/signed dword~) anim::$3
(signed word/signed dword~) anim::$4 ← - (byte/word/signed word/dword/signed dword) 200
(boolean~) anim::$5 ← (signed word) yvel_init < (signed word/signed dword~) anim::$4
(boolean~) anim::$6 ← ! (boolean~) anim::$5
@ -690,11 +690,11 @@ anim::@1: scope:[anim] from anim anim::@2
(signed word~) anim::$9 ← (signed word) ypos#10 + (signed word) yvel#3
(signed word) ypos#3 ← (signed word~) anim::$9
(signed word~) anim::$10 ← (signed word) xpos#3 >> (byte/signed byte/word/signed word/dword/signed dword) 7
(signed word~) anim::$11 ← (signed word~) anim::$10 + (byte/word/signed word/dword/signed dword) 160
(signed word) anim::sprite_x#0 ← (signed word~) anim::$11
(signed word/signed dword~) anim::$11 ← (signed word~) anim::$10 + (byte/word/signed word/dword/signed dword) 160
(signed word) anim::sprite_x#0 ← (signed word/signed dword~) anim::$11
(signed word~) anim::$12 ← (signed word) ypos#3 >> (byte/signed byte/word/signed word/dword/signed dword) 5
(signed word~) anim::$13 ← (byte/word/signed word/dword/signed dword) 230 - (signed word~) anim::$12
(signed word) anim::sprite_y#0 ← (signed word~) anim::$13
(signed word/signed dword~) anim::$13 ← (byte/word/signed word/dword/signed dword) 230 - (signed word~) anim::$12
(signed word) anim::sprite_y#0 ← (signed word/signed dword~) anim::$13
(byte~) anim::$14 ← ((byte)) (signed word) anim::sprite_x#0
*((byte*) SPRITES_XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) anim::$14
(byte~) anim::$15 ← ((byte)) (signed word) anim::sprite_y#0
@ -709,8 +709,8 @@ anim::@3: scope:[anim] from anim
(signed word) ypos#4 ← (byte/signed byte/word/signed word/dword/signed dword) 0
(signed word~) anim::$2 ← - (signed word) xvel#9
(signed word) xvel#3 ← (signed word~) anim::$2
(signed word~) anim::$3 ← (signed word) yvel_init#9 - (byte/signed byte/word/signed word/dword/signed dword) 10
(signed word) yvel_init#3 ← (signed word~) anim::$3
(signed word/signed dword~) anim::$3 ← (signed word) yvel_init#9 - (byte/signed byte/word/signed word/dword/signed dword) 10
(signed word) yvel_init#3 ← (signed word/signed dword~) anim::$3
(signed word/signed dword~) anim::$4 ← - (byte/word/signed word/dword/signed dword) 200
(boolean~) anim::$5 ← (signed word) yvel_init#3 < (signed word/signed dword~) anim::$4
(boolean~) anim::$6 ← ! (boolean~) anim::$5
@ -800,14 +800,14 @@ SYMBOL TABLE SSA
(boolean~) anim::$0
(boolean~) anim::$1
(signed word~) anim::$10
(signed word~) anim::$11
(signed word/signed dword~) anim::$11
(signed word~) anim::$12
(signed word~) anim::$13
(signed word/signed dword~) anim::$13
(byte~) anim::$14
(byte~) anim::$15
(byte~) anim::$16
(signed word~) anim::$2
(signed word~) anim::$3
(signed word/signed dword~) anim::$3
(signed word/signed dword~) anim::$4
(boolean~) anim::$5
(boolean~) anim::$6
@ -1006,12 +1006,12 @@ Alias (signed word) g#0 = (signed byte/signed word/signed dword~) $1
Alias (signed word) yvel#10 = (signed word) yvel#3 (signed word~) anim::$7 (signed word) yvel#5
Alias (signed word) xpos#10 = (signed word) xpos#3 (signed word~) anim::$8 (signed word) xpos#5
Alias (signed word) ypos#11 = (signed word) ypos#3 (signed word~) anim::$9 (signed word) ypos#5
Alias (signed word) anim::sprite_x#0 = (signed word~) anim::$11
Alias (signed word) anim::sprite_y#0 = (signed word~) anim::$13
Alias (signed word) anim::sprite_x#0 = (signed word/signed dword~) anim::$11
Alias (signed word) anim::sprite_y#0 = (signed word/signed dword~) anim::$13
Alias (signed word) xvel#13 = (signed word) xvel#9
Alias (signed word) yvel_init#14 = (signed word) yvel_init#9
Alias (signed word) xvel#17 = (signed word) xvel#3 (signed word~) anim::$2
Alias (signed word) yvel_init#3 = (signed word~) anim::$3
Alias (signed word) yvel_init#3 = (signed word/signed dword~) anim::$3
Alias (signed word) yvel#4 = (signed word) yvel_init#10
Alias (signed word) xpos#17 = (signed word) xpos#4
Alias (signed word) ypos#17 = (signed word) ypos#4

View File

@ -956,8 +956,8 @@ proc (void()) init()
(byte) init::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
init::@1:
*((byte*) COLS + (byte) init::i) ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) init::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) init::i
*((byte*) COLS + (byte/word~) init::$1) ← (byte/signed byte/word/signed word/dword/signed dword) 11
(byte/signed word/word/dword/signed dword~) init::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) init::i
*((byte*) COLS + (byte/signed word/word/dword/signed dword~) init::$1) ← (byte/signed byte/word/signed word/dword/signed dword) 11
(byte) init::i ← ++ (byte) init::i
(boolean~) init::$2 ← (byte) init::i != (byte/signed byte/word/signed word/dword/signed dword) 40
if((boolean~) init::$2) goto init::@1
@ -1016,8 +1016,8 @@ proc (void()) anim()
(byte) anim::j ← (byte/signed byte/word/signed word/dword/signed dword) 0
anim::@1:
(byte/signed byte/word/signed word/dword/signed dword~) anim::$0 ← ((word)) (byte/signed byte/word/signed word/dword/signed dword) 30
(byte/word~) anim::$1 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$0 + *((byte[221]) sintab_x + (byte) anim::xidx)
(word) anim::x ← (byte/word~) anim::$1
(byte/signed word/word/dword/signed dword~) anim::$1 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$0 + *((byte[221]) sintab_x + (byte) anim::xidx)
(word) anim::x ← (byte/signed word/word/dword/signed dword~) anim::$1
(byte~) anim::$2 ← (byte) anim::x_msb << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) anim::$3 ← > (word) anim::x
(byte~) anim::$4 ← (byte~) anim::$2 | (byte~) anim::$3
@ -1025,24 +1025,24 @@ anim::@1:
(byte~) anim::$5 ← < (word) anim::x
*((byte*) SPRITES_XPOS + (byte) anim::j2) ← (byte~) anim::$5
*((byte*) SPRITES_YPOS + (byte) anim::j2) ← *((byte[197]) sintab_y + (byte) anim::yidx)
(byte/word~) anim::$6 ← (byte) anim::xidx + (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) anim::xidx ← (byte/word~) anim::$6
(byte/signed word/word/dword/signed dword~) anim::$6 ← (byte) anim::xidx + (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) anim::xidx ← (byte/signed word/word/dword/signed dword~) anim::$6
(boolean~) anim::$7 ← (byte) anim::xidx >= (byte) sinlen_x
(boolean~) anim::$8 ← ! (boolean~) anim::$7
if((boolean~) anim::$8) goto anim::@2
(byte/signed byte/word/signed word/dword/signed dword~) anim::$9 ← (byte) anim::xidx - (byte) sinlen_x
(byte) anim::xidx ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$9
(byte~) anim::$9 ← (byte) anim::xidx - (byte) sinlen_x
(byte) anim::xidx ← (byte~) anim::$9
anim::@2:
(byte/word~) anim::$10 ← (byte) anim::yidx + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) anim::yidx ← (byte/word~) anim::$10
(byte/signed word/word/dword/signed dword~) anim::$10 ← (byte) anim::yidx + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) anim::yidx ← (byte/signed word/word/dword/signed dword~) anim::$10
(boolean~) anim::$11 ← (byte) anim::yidx >= (byte) sinlen_y
(boolean~) anim::$12 ← ! (boolean~) anim::$11
if((boolean~) anim::$12) goto anim::@3
(byte/signed byte/word/signed word/dword/signed dword~) anim::$13 ← (byte) anim::yidx - (byte) sinlen_y
(byte) anim::yidx ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$13
(byte~) anim::$13 ← (byte) anim::yidx - (byte) sinlen_y
(byte) anim::yidx ← (byte~) anim::$13
anim::@3:
(byte/signed byte/word/signed word/dword/signed dword~) anim::$14 ← (byte) anim::j2 - (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) anim::j2 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$14
(byte/signed word/word/dword/signed dword~) anim::$14 ← (byte) anim::j2 - (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) anim::j2 ← (byte/signed word/word/dword/signed dword~) anim::$14
(byte) anim::j ← ++ (byte) anim::j
(boolean~) anim::$15 ← (byte) anim::j != (byte/signed byte/word/signed word/dword/signed dword) 7
if((boolean~) anim::$15) goto anim::@1
@ -1082,11 +1082,11 @@ place_sprites::@1:
*((byte*) SPRITES_XPOS + (byte) place_sprites::j2) ← (byte) place_sprites::spr_x
*((byte*) SPRITES_YPOS + (byte) place_sprites::j2) ← (byte/signed byte/word/signed word/dword/signed dword) 80
*((byte*) SPRITES_COLS + (byte) place_sprites::j) ← (byte) place_sprites::col
(byte/word~) place_sprites::$3 ← (byte) place_sprites::spr_x + (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) place_sprites::spr_x ← (byte/word~) place_sprites::$3
(byte/signed word/word/dword/signed dword~) place_sprites::$3 ← (byte) place_sprites::spr_x + (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) place_sprites::spr_x ← (byte/signed word/word/dword/signed dword~) place_sprites::$3
(byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4 ← (byte/signed byte/word/signed word/dword/signed dword) 7 ^ (byte/signed byte/word/signed word/dword/signed dword) 5
(byte~) place_sprites::$5 ← (byte) place_sprites::col ^ (byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte) place_sprites::col ← (byte~) place_sprites::$5
(byte/word/dword~) place_sprites::$5 ← (byte) place_sprites::col ^ (byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte) place_sprites::col ← (byte/word/dword~) place_sprites::$5
(byte) place_sprites::j2 ← ++ (byte) place_sprites::j2
(byte) place_sprites::j2 ← ++ (byte) place_sprites::j2
(byte) place_sprites::j ← ++ (byte) place_sprites::j
@ -1250,12 +1250,12 @@ SYMBOLS
(byte*) addMEMtoFAC::mem
(void()) anim()
(byte/signed byte/word/signed word/dword/signed dword~) anim::$0
(byte/word~) anim::$1
(byte/word~) anim::$10
(byte/signed word/word/dword/signed dword~) anim::$1
(byte/signed word/word/dword/signed dword~) anim::$10
(boolean~) anim::$11
(boolean~) anim::$12
(byte/signed byte/word/signed word/dword/signed dword~) anim::$13
(byte/signed byte/word/signed word/dword/signed dword~) anim::$14
(byte~) anim::$13
(byte/signed word/word/dword/signed dword~) anim::$14
(boolean~) anim::$15
(boolean~) anim::$16
(boolean~) anim::$17
@ -1265,10 +1265,10 @@ SYMBOLS
(byte~) anim::$3
(byte~) anim::$4
(byte~) anim::$5
(byte/word~) anim::$6
(byte/signed word/word/dword/signed dword~) anim::$6
(boolean~) anim::$7
(boolean~) anim::$8
(byte/signed byte/word/signed word/dword/signed dword~) anim::$9
(byte~) anim::$9
(label) anim::@1
(label) anim::@2
(label) anim::@3
@ -1386,7 +1386,7 @@ SYMBOLS
(word) getFAC::w
(void()) init()
(void~) init::$0
(byte/word~) init::$1
(byte/signed word/word/dword/signed dword~) init::$1
(void~) init::$10
(boolean~) init::$2
(void~) init::$3
@ -1423,9 +1423,9 @@ SYMBOLS
(byte*~) place_sprites::$0
(byte*~) place_sprites::$1
(byte~) place_sprites::$2
(byte/word~) place_sprites::$3
(byte/signed word/word/dword/signed dword~) place_sprites::$3
(byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte~) place_sprites::$5
(byte/word/dword~) place_sprites::$5
(boolean~) place_sprites::$6
(label) place_sprites::@1
(label) place_sprites::@return
@ -2060,8 +2060,8 @@ init: scope:[init] from
to:init::@1
init::@1: scope:[init] from init init::@1
*((byte*) COLS + (byte) init::i) ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) init::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) init::i
*((byte*) COLS + (byte/word~) init::$1) ← (byte/signed byte/word/signed word/dword/signed dword) 11
(byte/signed word/word/dword/signed dword~) init::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) init::i
*((byte*) COLS + (byte/signed word/word/dword/signed dword~) init::$1) ← (byte/signed byte/word/signed word/dword/signed dword) 11
(byte) init::i ← ++ (byte) init::i
(boolean~) init::$2 ← (byte) init::i != (byte/signed byte/word/signed word/dword/signed dword) 40
if((boolean~) init::$2) goto init::@1
@ -2141,8 +2141,8 @@ anim: scope:[anim] from
to:anim::@1
anim::@1: scope:[anim] from anim anim::@3
(byte/signed byte/word/signed word/dword/signed dword~) anim::$0 ← ((word)) (byte/signed byte/word/signed word/dword/signed dword) 30
(byte/word~) anim::$1 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$0 + *((byte[221]) sintab_x + (byte) anim::xidx)
(word) anim::x ← (byte/word~) anim::$1
(byte/signed word/word/dword/signed dword~) anim::$1 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$0 + *((byte[221]) sintab_x + (byte) anim::xidx)
(word) anim::x ← (byte/signed word/word/dword/signed dword~) anim::$1
(byte~) anim::$2 ← (byte) anim::x_msb << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) anim::$3 ← > (word) anim::x
(byte~) anim::$4 ← (byte~) anim::$2 | (byte~) anim::$3
@ -2150,33 +2150,33 @@ anim::@1: scope:[anim] from anim anim::@3
(byte~) anim::$5 ← < (word) anim::x
*((byte*) SPRITES_XPOS + (byte) anim::j2) ← (byte~) anim::$5
*((byte*) SPRITES_YPOS + (byte) anim::j2) ← *((byte[197]) sintab_y + (byte) anim::yidx)
(byte/word~) anim::$6 ← (byte) anim::xidx + (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) anim::xidx ← (byte/word~) anim::$6
(byte/signed word/word/dword/signed dword~) anim::$6 ← (byte) anim::xidx + (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) anim::xidx ← (byte/signed word/word/dword/signed dword~) anim::$6
(boolean~) anim::$7 ← (byte) anim::xidx >= (byte) sinlen_x
(boolean~) anim::$8 ← ! (boolean~) anim::$7
if((boolean~) anim::$8) goto anim::@2
to:anim::@6
anim::@2: scope:[anim] from anim::@1 anim::@6
(byte/word~) anim::$10 ← (byte) anim::yidx + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) anim::yidx ← (byte/word~) anim::$10
(byte/signed word/word/dword/signed dword~) anim::$10 ← (byte) anim::yidx + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) anim::yidx ← (byte/signed word/word/dword/signed dword~) anim::$10
(boolean~) anim::$11 ← (byte) anim::yidx >= (byte) sinlen_y
(boolean~) anim::$12 ← ! (boolean~) anim::$11
if((boolean~) anim::$12) goto anim::@3
to:anim::@7
anim::@6: scope:[anim] from anim::@1
(byte/signed byte/word/signed word/dword/signed dword~) anim::$9 ← (byte) anim::xidx - (byte) sinlen_x
(byte) anim::xidx ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$9
(byte~) anim::$9 ← (byte) anim::xidx - (byte) sinlen_x
(byte) anim::xidx ← (byte~) anim::$9
to:anim::@2
anim::@3: scope:[anim] from anim::@2 anim::@7
(byte/signed byte/word/signed word/dword/signed dword~) anim::$14 ← (byte) anim::j2 - (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) anim::j2 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$14
(byte/signed word/word/dword/signed dword~) anim::$14 ← (byte) anim::j2 - (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) anim::j2 ← (byte/signed word/word/dword/signed dword~) anim::$14
(byte) anim::j ← ++ (byte) anim::j
(boolean~) anim::$15 ← (byte) anim::j != (byte/signed byte/word/signed word/dword/signed dword) 7
if((boolean~) anim::$15) goto anim::@1
to:anim::@8
anim::@7: scope:[anim] from anim::@2
(byte/signed byte/word/signed word/dword/signed dword~) anim::$13 ← (byte) anim::yidx - (byte) sinlen_y
(byte) anim::yidx ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$13
(byte~) anim::$13 ← (byte) anim::yidx - (byte) sinlen_y
(byte) anim::yidx ← (byte~) anim::$13
to:anim::@3
anim::@8: scope:[anim] from anim::@3
*((byte*) SPRITES_XMSB) ← (byte) anim::x_msb
@ -2225,11 +2225,11 @@ place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1
*((byte*) SPRITES_XPOS + (byte) place_sprites::j2) ← (byte) place_sprites::spr_x
*((byte*) SPRITES_YPOS + (byte) place_sprites::j2) ← (byte/signed byte/word/signed word/dword/signed dword) 80
*((byte*) SPRITES_COLS + (byte) place_sprites::j) ← (byte) place_sprites::col
(byte/word~) place_sprites::$3 ← (byte) place_sprites::spr_x + (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) place_sprites::spr_x ← (byte/word~) place_sprites::$3
(byte/signed word/word/dword/signed dword~) place_sprites::$3 ← (byte) place_sprites::spr_x + (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) place_sprites::spr_x ← (byte/signed word/word/dword/signed dword~) place_sprites::$3
(byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4 ← (byte/signed byte/word/signed word/dword/signed dword) 7 ^ (byte/signed byte/word/signed word/dword/signed dword) 5
(byte~) place_sprites::$5 ← (byte) place_sprites::col ^ (byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte) place_sprites::col ← (byte~) place_sprites::$5
(byte/word/dword~) place_sprites::$5 ← (byte) place_sprites::col ^ (byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte) place_sprites::col ← (byte/word/dword~) place_sprites::$5
(byte) place_sprites::j2 ← ++ (byte) place_sprites::j2
(byte) place_sprites::j2 ← ++ (byte) place_sprites::j2
(byte) place_sprites::j ← ++ (byte) place_sprites::j
@ -2753,8 +2753,8 @@ init::@1: scope:[init] from init::@1 init::@3
(byte*) progress_cursor#44 ← phi( init::@1/(byte*) progress_cursor#44 init::@3/(byte*) progress_cursor#46 )
(byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@3/(byte) init::i#0 )
*((byte*) COLS#0 + (byte) init::i#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) init::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) init::i#2
*((byte*) COLS#0 + (byte/word~) init::$1) ← (byte/signed byte/word/signed word/dword/signed dword) 11
(byte/signed word/word/dword/signed dword~) init::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) init::i#2
*((byte*) COLS#0 + (byte/signed word/word/dword/signed dword~) init::$1) ← (byte/signed byte/word/signed word/dword/signed dword) 11
(byte) init::i#1 ← ++ (byte) init::i#2
(boolean~) init::$2 ← (byte) init::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 40
if((boolean~) init::$2) goto init::@1
@ -2906,8 +2906,8 @@ anim::@1: scope:[anim] from anim anim::@3
(byte) anim::x_msb#2 ← phi( anim/(byte) anim::x_msb#0 anim::@3/(byte) anim::x_msb#4 )
(byte) anim::xidx#3 ← phi( anim/(byte) anim::xidx#0 anim::@3/(byte) anim::xidx#5 )
(byte/signed byte/word/signed word/dword/signed dword~) anim::$0 ← ((word)) (byte/signed byte/word/signed word/dword/signed dword) 30
(byte/word~) anim::$1 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$0 + *((byte[221]) sintab_x#0 + (byte) anim::xidx#3)
(word) anim::x#0 ← (byte/word~) anim::$1
(byte/signed word/word/dword/signed dword~) anim::$1 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$0 + *((byte[221]) sintab_x#0 + (byte) anim::xidx#3)
(word) anim::x#0 ← (byte/signed word/word/dword/signed dword~) anim::$1
(byte~) anim::$2 ← (byte) anim::x_msb#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte~) anim::$3 ← > (word) anim::x#0
(byte~) anim::$4 ← (byte~) anim::$2 | (byte~) anim::$3
@ -2915,8 +2915,8 @@ anim::@1: scope:[anim] from anim anim::@3
(byte~) anim::$5 ← < (word) anim::x#0
*((byte*) SPRITES_XPOS#0 + (byte) anim::j2#2) ← (byte~) anim::$5
*((byte*) SPRITES_YPOS#0 + (byte) anim::j2#2) ← *((byte[197]) sintab_y#0 + (byte) anim::yidx#3)
(byte/word~) anim::$6 ← (byte) anim::xidx#3 + (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) anim::xidx#1 ← (byte/word~) anim::$6
(byte/signed word/word/dword/signed dword~) anim::$6 ← (byte) anim::xidx#3 + (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) anim::xidx#1 ← (byte/signed word/word/dword/signed dword~) anim::$6
(boolean~) anim::$7 ← (byte) anim::xidx#1 >= (byte) sinlen_x#0
(boolean~) anim::$8 ← ! (boolean~) anim::$7
if((boolean~) anim::$8) goto anim::@2
@ -2929,8 +2929,8 @@ anim::@2: scope:[anim] from anim::@1 anim::@6
(byte) anim::j#3 ← phi( anim::@1/(byte) anim::j#5 anim::@6/(byte) anim::j#6 )
(byte) anim::j2#4 ← phi( anim::@1/(byte) anim::j2#2 anim::@6/(byte) anim::j2#6 )
(byte) anim::yidx#4 ← phi( anim::@1/(byte) anim::yidx#3 anim::@6/(byte) anim::yidx#7 )
(byte/word~) anim::$10 ← (byte) anim::yidx#4 + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) anim::yidx#1 ← (byte/word~) anim::$10
(byte/signed word/word/dword/signed dword~) anim::$10 ← (byte) anim::yidx#4 + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) anim::yidx#1 ← (byte/signed word/word/dword/signed dword~) anim::$10
(boolean~) anim::$11 ← (byte) anim::yidx#1 >= (byte) sinlen_y#0
(boolean~) anim::$12 ← ! (boolean~) anim::$11
if((boolean~) anim::$12) goto anim::@3
@ -2943,8 +2943,8 @@ anim::@6: scope:[anim] from anim::@1
(byte) anim::j2#6 ← phi( anim::@1/(byte) anim::j2#2 )
(byte) anim::yidx#7 ← phi( anim::@1/(byte) anim::yidx#3 )
(byte) anim::xidx#4 ← phi( anim::@1/(byte) anim::xidx#1 )
(byte/signed byte/word/signed word/dword/signed dword~) anim::$9 ← (byte) anim::xidx#4 - (byte) sinlen_x#0
(byte) anim::xidx#2 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$9
(byte~) anim::$9 ← (byte) anim::xidx#4 - (byte) sinlen_x#0
(byte) anim::xidx#2 ← (byte~) anim::$9
to:anim::@2
anim::@3: scope:[anim] from anim::@2 anim::@7
(byte) sin_idx_y#19 ← phi( anim::@2/(byte) sin_idx_y#22 anim::@7/(byte) sin_idx_y#23 )
@ -2954,8 +2954,8 @@ anim::@3: scope:[anim] from anim::@2 anim::@7
(byte) anim::xidx#5 ← phi( anim::@2/(byte) anim::xidx#6 anim::@7/(byte) anim::xidx#7 )
(byte) anim::j#2 ← phi( anim::@2/(byte) anim::j#3 anim::@7/(byte) anim::j#4 )
(byte) anim::j2#3 ← phi( anim::@2/(byte) anim::j2#4 anim::@7/(byte) anim::j2#5 )
(byte/signed byte/word/signed word/dword/signed dword~) anim::$14 ← (byte) anim::j2#3 - (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) anim::j2#1 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$14
(byte/signed word/word/dword/signed dword~) anim::$14 ← (byte) anim::j2#3 - (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) anim::j2#1 ← (byte/signed word/word/dword/signed dword~) anim::$14
(byte) anim::j#1 ← ++ (byte) anim::j#2
(boolean~) anim::$15 ← (byte) anim::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 7
if((boolean~) anim::$15) goto anim::@1
@ -2968,8 +2968,8 @@ anim::@7: scope:[anim] from anim::@2
(byte) anim::j#4 ← phi( anim::@2/(byte) anim::j#3 )
(byte) anim::j2#5 ← phi( anim::@2/(byte) anim::j2#4 )
(byte) anim::yidx#5 ← phi( anim::@2/(byte) anim::yidx#1 )
(byte/signed byte/word/signed word/dword/signed dword~) anim::$13 ← (byte) anim::yidx#5 - (byte) sinlen_y#0
(byte) anim::yidx#2 ← (byte/signed byte/word/signed word/dword/signed dword~) anim::$13
(byte~) anim::$13 ← (byte) anim::yidx#5 - (byte) sinlen_y#0
(byte) anim::yidx#2 ← (byte~) anim::$13
to:anim::@3
anim::@8: scope:[anim] from anim::@3
(byte) sin_idx_y#14 ← phi( anim::@3/(byte) sin_idx_y#19 )
@ -3035,11 +3035,11 @@ place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1
*((byte*) SPRITES_XPOS#0 + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2
*((byte*) SPRITES_YPOS#0 + (byte) place_sprites::j2#3) ← (byte/signed byte/word/signed word/dword/signed dword) 80
*((byte*) SPRITES_COLS#0 + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2
(byte/word~) place_sprites::$3 ← (byte) place_sprites::spr_x#2 + (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) place_sprites::spr_x#1 ← (byte/word~) place_sprites::$3
(byte/signed word/word/dword/signed dword~) place_sprites::$3 ← (byte) place_sprites::spr_x#2 + (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) place_sprites::spr_x#1 ← (byte/signed word/word/dword/signed dword~) place_sprites::$3
(byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4 ← (byte/signed byte/word/signed word/dword/signed dword) 7 ^ (byte/signed byte/word/signed word/dword/signed dword) 5
(byte~) place_sprites::$5 ← (byte) place_sprites::col#2 ^ (byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte) place_sprites::col#1 ← (byte~) place_sprites::$5
(byte/word/dword~) place_sprites::$5 ← (byte) place_sprites::col#2 ^ (byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte) place_sprites::col#1 ← (byte/word/dword~) place_sprites::$5
(byte) place_sprites::j2#1 ← ++ (byte) place_sprites::j2#3
(byte) place_sprites::j2#2 ← ++ (byte) place_sprites::j2#1
(byte) place_sprites::j#1 ← ++ (byte) place_sprites::j#2
@ -3509,12 +3509,12 @@ SYMBOL TABLE SSA
(byte*) addMEMtoFAC::mem#2
(void()) anim()
(byte/signed byte/word/signed word/dword/signed dword~) anim::$0
(byte/word~) anim::$1
(byte/word~) anim::$10
(byte/signed word/word/dword/signed dword~) anim::$1
(byte/signed word/word/dword/signed dword~) anim::$10
(boolean~) anim::$11
(boolean~) anim::$12
(byte/signed byte/word/signed word/dword/signed dword~) anim::$13
(byte/signed byte/word/signed word/dword/signed dword~) anim::$14
(byte~) anim::$13
(byte/signed word/word/dword/signed dword~) anim::$14
(boolean~) anim::$15
(boolean~) anim::$16
(boolean~) anim::$17
@ -3524,10 +3524,10 @@ SYMBOL TABLE SSA
(byte~) anim::$3
(byte~) anim::$4
(byte~) anim::$5
(byte/word~) anim::$6
(byte/signed word/word/dword/signed dword~) anim::$6
(boolean~) anim::$7
(boolean~) anim::$8
(byte/signed byte/word/signed word/dword/signed dword~) anim::$9
(byte~) anim::$9
(label) anim::@1
(label) anim::@10
(label) anim::@2
@ -3888,7 +3888,7 @@ SYMBOL TABLE SSA
(word) getFAC::w
(word) getFAC::w#0
(void()) init()
(byte/word~) init::$1
(byte/signed word/word/dword/signed dword~) init::$1
(boolean~) init::$2
(byte*~) init::$7
(label) init::@1
@ -3929,9 +3929,9 @@ SYMBOL TABLE SSA
(byte*~) place_sprites::$0
(byte*~) place_sprites::$1
(byte~) place_sprites::$2
(byte/word~) place_sprites::$3
(byte/signed word/word/dword/signed dword~) place_sprites::$3
(byte/signed byte/word/signed word/dword/signed dword~) place_sprites::$4
(byte~) place_sprites::$5
(byte/word/dword~) place_sprites::$5
(boolean~) place_sprites::$6
(label) place_sprites::@1
(label) place_sprites::@return
@ -4326,24 +4326,24 @@ Alias (byte*) progress_cursor#24 = (byte*) progress_cursor#33
Alias (byte) progress_idx#12 = (byte) progress_idx#26 (byte) progress_idx#25
Alias (byte*) progress_cursor#11 = (byte*) progress_cursor#25 (byte*) progress_cursor#23
Alias (byte) progress_idx#35 = (byte) progress_idx#39 (byte) progress_idx#7
Alias (word) anim::x#0 = (byte/word~) anim::$1
Alias (word) anim::x#0 = (byte/signed word/word/dword/signed dword~) anim::$1
Alias (byte) anim::x_msb#1 = (byte~) anim::$4 (byte) anim::x_msb#7
Alias (byte) anim::xidx#1 = (byte/word~) anim::$6 (byte) anim::xidx#4
Alias (byte) anim::yidx#1 = (byte/word~) anim::$10 (byte) anim::yidx#5
Alias (byte) anim::xidx#1 = (byte/signed word/word/dword/signed dword~) anim::$6 (byte) anim::xidx#4
Alias (byte) anim::yidx#1 = (byte/signed word/word/dword/signed dword~) anim::$10 (byte) anim::yidx#5
Alias (byte) anim::yidx#3 = (byte) anim::yidx#7
Alias (byte) anim::j2#2 = (byte) anim::j2#6
Alias (byte) anim::j#5 = (byte) anim::j#6
Alias (byte) sin_idx_x#24 = (byte) sin_idx_x#25
Alias (byte) sin_idx_y#25 = (byte) sin_idx_y#26
Alias (byte) anim::xidx#2 = (byte/signed byte/word/signed word/dword/signed dword~) anim::$9
Alias (byte) anim::j2#1 = (byte/signed byte/word/signed word/dword/signed dword~) anim::$14
Alias (byte) anim::xidx#2 = (byte~) anim::$9
Alias (byte) anim::j2#1 = (byte/signed word/word/dword/signed dword~) anim::$14
Alias (byte) anim::j2#4 = (byte) anim::j2#5
Alias (byte) anim::j#3 = (byte) anim::j#4
Alias (byte) anim::xidx#6 = (byte) anim::xidx#7
Alias (byte) anim::x_msb#5 = (byte) anim::x_msb#6
Alias (byte) sin_idx_x#18 = (byte) sin_idx_x#19
Alias (byte) sin_idx_y#22 = (byte) sin_idx_y#23
Alias (byte) anim::yidx#2 = (byte/signed byte/word/signed word/dword/signed dword~) anim::$13
Alias (byte) anim::yidx#2 = (byte~) anim::$13
Alias (byte) anim::x_msb#3 = (byte) anim::x_msb#4
Alias (byte) sin_idx_x#10 = (byte) sin_idx_x#14
Alias (byte) sin_idx_y#14 = (byte) sin_idx_y#19 (byte) sin_idx_y#15
@ -4352,8 +4352,8 @@ Alias (byte) sin_idx_x#11 = (byte) sin_idx_x#15 (byte) sin_idx_x#5
Alias (byte) sin_idx_y#11 = (byte) sin_idx_y#16 (byte) sin_idx_y#5
Alias (byte*) place_sprites::sprites_ptr#0 = (byte*~) place_sprites::$0
Alias (byte) place_sprites::spr_id#0 = (byte~) place_sprites::$2
Alias (byte) place_sprites::spr_x#1 = (byte/word~) place_sprites::$3
Alias (byte) place_sprites::col#1 = (byte~) place_sprites::$5
Alias (byte) place_sprites::spr_x#1 = (byte/signed word/word/dword/signed dword~) place_sprites::$3
Alias (byte) place_sprites::col#1 = (byte/word/dword~) place_sprites::$5
Alias (byte*) gen_sprites::spr#2 = (byte*) gen_sprites::spr#3
Alias (byte) gen_sprites::i#2 = (byte) gen_sprites::i#3
Alias (byte*) gen_sprites::spr#1 = (byte*~) gen_sprites::$1
@ -4766,6 +4766,7 @@ Multiple usages for variable. Not optimizing sub-constant (byte*) gen_sprites::s
Multiple usages for variable. Not optimizing sub-constant (byte*) gen_chargen_sprite::sprite#4
Fixing inline constructor with getFAC::$0 ← *(memHi#0) w= *(memLo#0)
Succesful SSA optimization Pass2FixInlineConstructors
Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) init::$1 ← (byte) init::i#2
Eliminating unused constant (const byte) progress_idx#35
Succesful SSA optimization PassNEliminateUnusedVars
Eliminating Noop Cast (byte*) prepareMEM::mem#0 ← ((byte*)) (word) setFAC::w#5
@ -4805,7 +4806,7 @@ Not aliassing across scopes: progress_cursor#34 progress_cursor#22
Not aliassing across scopes: getFAC::return#2 getFAC::return#0
Not aliassing across scopes: gen_sintab::$23 getFAC::return#2
Alias (word) getFAC::return#0 = (word~) getFAC::$0
Alias (byte) init::i#2 = (byte/word~) init::$1
Alias (byte) init::i#2 = (byte~) init::$1
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: prepareMEM::mem#5 prepareMEM::mem#2
Not aliassing across scopes: setFAC::w#5 setFAC::w#0

View File

@ -249,8 +249,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@1
[125] return [ mul16u::res#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 ] )
to:@return
mul16u::@2: scope:[mul16u] from mul16u::@1
[126] (byte~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] )
[127] if((byte~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] )
[126] (byte/word~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] )
[127] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] )
to:mul16u::@7
mul16u::@7: scope:[mul16u] from mul16u::@2
[128] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] )

View File

@ -482,8 +482,8 @@ divr8u::@1:
(boolean~) divr8u::$2 ← (byte~) divr8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) divr8u::$3 ← ! (boolean~) divr8u::$2
if((boolean~) divr8u::$3) goto divr8u::@2
(byte~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte~) divr8u::$4
(byte/word/dword~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte/word/dword~) divr8u::$4
divr8u::@2:
(byte~) divr8u::$5 ← (byte) divr8u::dividend << (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::dividend ← (byte~) divr8u::$5
@ -493,8 +493,8 @@ divr8u::@2:
(boolean~) divr8u::$8 ← ! (boolean~) divr8u::$7
if((boolean~) divr8u::$8) goto divr8u::@3
(byte) divr8u::quotient ← ++ (byte) divr8u::quotient
(byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9
(byte~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte~) divr8u::$9
divr8u::@3:
(byte) divr8u::i ← ++ (byte) divr8u::i
(boolean~) divr8u::$10 ← (byte) divr8u::i != (byte/signed byte/word/signed word/dword/signed dword) 8
@ -518,8 +518,8 @@ divr16u::@1:
(boolean~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) divr16u::$4 ← ! (boolean~) divr16u::$3
if((boolean~) divr16u::$4) goto divr16u::@2
(word~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word~) divr16u::$5
(word/dword~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word/dword~) divr16u::$5
divr16u::@2:
(word~) divr16u::$6 ← (word) divr16u::dividend << (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::dividend ← (word~) divr16u::$6
@ -587,8 +587,8 @@ div8s::@2:
(signed byte~) div8s::$7 ← - (signed byte) div8s::divisor
(byte~) div8s::$8 ← ((byte)) (signed byte~) div8s::$7
(byte) div8s::divisoru ← (byte~) div8s::$8
(byte~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte~) div8s::$9
(byte/word/dword~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte/word/dword~) div8s::$9
goto div8s::@4
div8s::@3:
(byte~) div8s::$10 ← ((byte)) (signed byte) div8s::divisor
@ -641,8 +641,8 @@ div16s::@2:
(signed word~) div16s::$7 ← - (signed word) div16s::divisor
(word~) div16s::$8 ← ((word)) (signed word~) div16s::$7
(word) div16s::divisoru ← (word~) div16s::$8
(byte~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte~) div16s::$9
(byte/word/dword~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte/word/dword~) div16s::$9
goto div16s::@4
div16s::@3:
(word~) div16s::$10 ← ((word)) (signed word) div16s::divisor
@ -710,8 +710,8 @@ proc (signed word()) mul8s((signed byte) mul8s::a , (signed byte) mul8s::b)
(byte~) mul8s::$5 ← > (word) mul8s::m
(byte~) mul8s::$6 ← > (word) mul8s::m
(byte~) mul8s::$7 ← ((byte)) (signed byte) mul8s::b
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$8 ← (byte~) mul8s::$6 - (byte~) mul8s::$7
lval((byte~) mul8s::$5) ← (byte/signed byte/word/signed word/dword/signed dword~) mul8s::$8
(byte~) mul8s::$8 ← (byte~) mul8s::$6 - (byte~) mul8s::$7
lval((byte~) mul8s::$5) ← (byte~) mul8s::$8
mul8s::@1:
(boolean~) mul8s::$9 ← (signed byte) mul8s::b < (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) mul8s::$10 ← ! (boolean~) mul8s::$9
@ -719,8 +719,8 @@ mul8s::@1:
(byte~) mul8s::$11 ← > (word) mul8s::m
(byte~) mul8s::$12 ← > (word) mul8s::m
(byte~) mul8s::$13 ← ((byte)) (signed byte) mul8s::a
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$14 ← (byte~) mul8s::$12 - (byte~) mul8s::$13
lval((byte~) mul8s::$11) ← (byte/signed byte/word/signed word/dword/signed dword~) mul8s::$14
(byte~) mul8s::$14 ← (byte~) mul8s::$12 - (byte~) mul8s::$13
lval((byte~) mul8s::$11) ← (byte~) mul8s::$14
mul8s::@2:
(signed word~) mul8s::$15 ← ((signed word)) (word) mul8s::m
(signed word) mul8s::return ← (signed word~) mul8s::$15
@ -740,8 +740,8 @@ proc (signed word()) mul8su((signed byte) mul8su::a , (byte) mul8su::b)
(byte~) mul8su::$5 ← > (word) mul8su::m
(byte~) mul8su::$6 ← > (word) mul8su::m
(byte~) mul8su::$7 ← ((byte)) (byte) mul8su::b
(byte/signed byte/word/signed word/dword/signed dword~) mul8su::$8 ← (byte~) mul8su::$6 - (byte~) mul8su::$7
lval((byte~) mul8su::$5) ← (byte/signed byte/word/signed word/dword/signed dword~) mul8su::$8
(byte~) mul8su::$8 ← (byte~) mul8su::$6 - (byte~) mul8su::$7
lval((byte~) mul8su::$5) ← (byte~) mul8su::$8
mul8su::@1:
(signed word~) mul8su::$9 ← ((signed word)) (word) mul8su::m
(signed word) mul8su::return ← (signed word~) mul8su::$9
@ -758,8 +758,8 @@ mul16u::@1:
if((boolean~) mul16u::$0) goto mul16u::@2
goto mul16u::@3
mul16u::@2:
(byte~) mul16u::$1 ← (word) mul16u::a & (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) mul16u::$2 ← (byte~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) mul16u::$1 ← (word) mul16u::a & (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) mul16u::$3 ← ! (boolean~) mul16u::$2
if((boolean~) mul16u::$3) goto mul16u::@4
(dword~) mul16u::$4 ← (dword) mul16u::res + (dword) mul16u::mb
@ -923,16 +923,16 @@ sin8s::@2:
(byte) sin8s::DIV_6 ← (byte/signed byte/word/signed word/dword/signed dword) 43
(byte~) sin8s::$10 ← call mulu8_sel (byte) sin8s::x3 (byte) sin8s::DIV_6 (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) sin8s::x3_6 ← (byte~) sin8s::$10
(byte/signed byte/word/signed word/dword/signed dword~) sin8s::$11 ← (byte) sin8s::x1 - (byte) sin8s::x3_6
(byte) sin8s::usinx ← (byte/signed byte/word/signed word/dword/signed dword~) sin8s::$11
(byte~) sin8s::$11 ← (byte) sin8s::x1 - (byte) sin8s::x3_6
(byte) sin8s::usinx ← (byte~) sin8s::$11
(byte~) sin8s::$12 ← call mulu8_sel (byte) sin8s::x3 (byte) sin8s::x1 (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) sin8s::x4 ← (byte~) sin8s::$12
(byte~) sin8s::$13 ← call mulu8_sel (byte) sin8s::x4 (byte) sin8s::x1 (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) sin8s::x5 ← (byte~) sin8s::$13
(byte~) sin8s::$14 ← (byte) sin8s::x5 >> (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) sin8s::x5_128 ← (byte~) sin8s::$14
(byte/word~) sin8s::$15 ← (byte) sin8s::usinx + (byte) sin8s::x5_128
(byte) sin8s::usinx ← (byte/word~) sin8s::$15
(byte~) sin8s::$15 ← (byte) sin8s::usinx + (byte) sin8s::x5_128
(byte) sin8s::usinx ← (byte~) sin8s::$15
(boolean~) sin8s::$16 ← (byte) sin8s::usinx >= (byte/word/signed word/dword/signed dword) 128
(boolean~) sin8s::$17 ← ! (boolean~) sin8s::$16
if((boolean~) sin8s::$17) goto sin8s::@3
@ -1100,8 +1100,8 @@ main::@2:
(void~) main::$6 ← call print_str (string) " @"
(signed word*~) main::$7 ← (signed word*) main::st1 + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*) main::st1 ← (signed word*~) main::$7
(word~) main::$8 ← (word) main::wavelength * (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*~) main::$9 ← (signed word[120]) main::sintab1 + (word~) main::$8
(word/signed dword/dword~) main::$8 ← (word) main::wavelength * (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*~) main::$9 ← (signed word[120]) main::sintab1 + (word/signed dword/dword~) main::$8
(boolean~) main::$10 ← (signed word*) main::st1 < (signed word*~) main::$9
if((boolean~) main::$10) goto main::@1
main::@return:
@ -1138,7 +1138,7 @@ SYMBOLS
(boolean~) div16s::$6
(signed word~) div16s::$7
(word~) div16s::$8
(byte~) div16s::$9
(byte/word/dword~) div16s::$9
(label) div16s::@1
(label) div16s::@2
(label) div16s::@3
@ -1191,7 +1191,7 @@ SYMBOLS
(boolean~) div8s::$6
(signed byte~) div8s::$7
(byte~) div8s::$8
(byte~) div8s::$9
(byte/word/dword~) div8s::$9
(label) div8s::@1
(label) div8s::@2
(label) div8s::@3
@ -1220,7 +1220,7 @@ SYMBOLS
(byte~) divr16u::$2
(boolean~) divr16u::$3
(boolean~) divr16u::$4
(word~) divr16u::$5
(word/dword~) divr16u::$5
(word~) divr16u::$6
(word~) divr16u::$7
(boolean~) divr16u::$8
@ -1241,12 +1241,12 @@ SYMBOLS
(boolean~) divr8u::$10
(boolean~) divr8u::$2
(boolean~) divr8u::$3
(byte~) divr8u::$4
(byte/word/dword~) divr8u::$4
(byte~) divr8u::$5
(byte~) divr8u::$6
(boolean~) divr8u::$7
(boolean~) divr8u::$8
(byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9
(byte~) divr8u::$9
(label) divr8u::@1
(label) divr8u::@2
(label) divr8u::@3
@ -1268,7 +1268,7 @@ SYMBOLS
(void~) main::$5
(void~) main::$6
(signed word*~) main::$7
(word~) main::$8
(word/signed dword/dword~) main::$8
(signed word*~) main::$9
(label) main::@1
(label) main::@2
@ -1303,7 +1303,7 @@ SYMBOLS
(signed dword) mul16s::return
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(boolean~) mul16u::$0
(byte~) mul16u::$1
(byte/word~) mul16u::$1
(boolean~) mul16u::$2
(boolean~) mul16u::$3
(dword~) mul16u::$4
@ -1326,7 +1326,7 @@ SYMBOLS
(byte~) mul8s::$11
(byte~) mul8s::$12
(byte~) mul8s::$13
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$14
(byte~) mul8s::$14
(signed word~) mul8s::$15
(word~) mul8s::$2
(boolean~) mul8s::$3
@ -1334,7 +1334,7 @@ SYMBOLS
(byte~) mul8s::$5
(byte~) mul8s::$6
(byte~) mul8s::$7
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$8
(byte~) mul8s::$8
(boolean~) mul8s::$9
(label) mul8s::@1
(label) mul8s::@2
@ -1352,7 +1352,7 @@ SYMBOLS
(byte~) mul8su::$5
(byte~) mul8su::$6
(byte~) mul8su::$7
(byte/signed byte/word/signed word/dword/signed dword~) mul8su::$8
(byte~) mul8su::$8
(signed word~) mul8su::$9
(label) mul8su::@1
(label) mul8su::@return
@ -1529,11 +1529,11 @@ SYMBOLS
(boolean~) sin8s::$0
(boolean~) sin8s::$1
(byte~) sin8s::$10
(byte/signed byte/word/signed word/dword/signed dword~) sin8s::$11
(byte~) sin8s::$11
(byte~) sin8s::$12
(byte~) sin8s::$13
(byte~) sin8s::$14
(byte/word~) sin8s::$15
(byte~) sin8s::$15
(boolean~) sin8s::$16
(boolean~) sin8s::$17
(signed byte~) sin8s::$18
@ -1626,8 +1626,8 @@ divr8u::@2: scope:[divr8u] from divr8u::@1 divr8u::@4
if((boolean~) divr8u::$8) goto divr8u::@3
to:divr8u::@5
divr8u::@4: scope:[divr8u] from divr8u::@1
(byte~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte~) divr8u::$4
(byte/word/dword~) divr8u::$4 ← (byte) divr8u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) divr8u::rem ← (byte/word/dword~) divr8u::$4
to:divr8u::@2
divr8u::@3: scope:[divr8u] from divr8u::@2 divr8u::@5
(byte) divr8u::i ← ++ (byte) divr8u::i
@ -1636,8 +1636,8 @@ divr8u::@3: scope:[divr8u] from divr8u::@2 divr8u::@5
to:divr8u::@6
divr8u::@5: scope:[divr8u] from divr8u::@2
(byte) divr8u::quotient ← ++ (byte) divr8u::quotient
(byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte/signed byte/word/signed word/dword/signed dword~) divr8u::$9
(byte~) divr8u::$9 ← (byte) divr8u::rem - (byte) divr8u::divisor
(byte) divr8u::rem ← (byte~) divr8u::$9
to:divr8u::@3
divr8u::@6: scope:[divr8u] from divr8u::@3
(byte) rem8u ← (byte) divr8u::rem
@ -1675,8 +1675,8 @@ divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4
if((boolean~) divr16u::$9) goto divr16u::@3
to:divr16u::@5
divr16u::@4: scope:[divr16u] from divr16u::@1
(word~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word~) divr16u::$5
(word/dword~) divr16u::$5 ← (word) divr16u::rem | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem ← (word/dword~) divr16u::$5
to:divr16u::@2
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
(byte) divr16u::i ← ++ (byte) divr16u::i
@ -1764,8 +1764,8 @@ div8s::@9: scope:[div8s] from div8s::@2
(signed byte~) div8s::$7 ← - (signed byte) div8s::divisor
(byte~) div8s::$8 ← ((byte)) (signed byte~) div8s::$7
(byte) div8s::divisoru ← (byte~) div8s::$8
(byte~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte~) div8s::$9
(byte/word/dword~) div8s::$9 ← (byte) div8s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div8s::neg ← (byte/word/dword~) div8s::$9
to:div8s::@4
div8s::@4: scope:[div8s] from div8s::@3 div8s::@9
(byte~) div8s::$11 ← call div8u (byte) div8s::dividendu (byte) div8s::divisoru
@ -1838,8 +1838,8 @@ div16s::@9: scope:[div16s] from div16s::@2
(signed word~) div16s::$7 ← - (signed word) div16s::divisor
(word~) div16s::$8 ← ((word)) (signed word~) div16s::$7
(word) div16s::divisoru ← (word~) div16s::$8
(byte~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte~) div16s::$9
(byte/word/dword~) div16s::$9 ← (byte) div16s::neg ^ (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) div16s::neg ← (byte/word/dword~) div16s::$9
to:div16s::@4
div16s::@4: scope:[div16s] from div16s::@3 div16s::@9
(word~) div16s::$11 ← call div16u (word) div16s::dividendu (word) div16s::divisoru
@ -1937,9 +1937,9 @@ mul8s::@3: scope:[mul8s] from mul8s
(byte~) mul8s::$5 ← > (word) mul8s::m
(byte~) mul8s::$6 ← > (word) mul8s::m
(byte~) mul8s::$7 ← ((byte)) (signed byte) mul8s::b
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$8 ← (byte~) mul8s::$6 - (byte~) mul8s::$7
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$16 ← (byte/signed byte/word/signed word/dword/signed dword~) mul8s::$8
(word) mul8s::m ← (word) mul8s::m hi= (byte/signed byte/word/signed word/dword/signed dword~) mul8s::$16
(byte~) mul8s::$8 ← (byte~) mul8s::$6 - (byte~) mul8s::$7
(byte~) mul8s::$16 ← (byte~) mul8s::$8
(word) mul8s::m ← (word) mul8s::m hi= (byte~) mul8s::$16
to:mul8s::@1
mul8s::@2: scope:[mul8s] from mul8s::@1 mul8s::@4
(signed word~) mul8s::$15 ← ((signed word)) (word) mul8s::m
@ -1949,9 +1949,9 @@ mul8s::@4: scope:[mul8s] from mul8s::@1
(byte~) mul8s::$11 ← > (word) mul8s::m
(byte~) mul8s::$12 ← > (word) mul8s::m
(byte~) mul8s::$13 ← ((byte)) (signed byte) mul8s::a
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$14 ← (byte~) mul8s::$12 - (byte~) mul8s::$13
(byte/signed byte/word/signed word/dword/signed dword~) mul8s::$17 ← (byte/signed byte/word/signed word/dword/signed dword~) mul8s::$14
(word) mul8s::m ← (word) mul8s::m hi= (byte/signed byte/word/signed word/dword/signed dword~) mul8s::$17
(byte~) mul8s::$14 ← (byte~) mul8s::$12 - (byte~) mul8s::$13
(byte~) mul8s::$17 ← (byte~) mul8s::$14
(word) mul8s::m ← (word) mul8s::m hi= (byte~) mul8s::$17
to:mul8s::@2
mul8s::@return: scope:[mul8s] from mul8s::@2 mul8s::@5
(signed word) mul8s::return ← (signed word) mul8s::return
@ -1978,9 +1978,9 @@ mul8su::@2: scope:[mul8su] from mul8su
(byte~) mul8su::$5 ← > (word) mul8su::m
(byte~) mul8su::$6 ← > (word) mul8su::m
(byte~) mul8su::$7 ← ((byte)) (byte) mul8su::b
(byte/signed byte/word/signed word/dword/signed dword~) mul8su::$8 ← (byte~) mul8su::$6 - (byte~) mul8su::$7
(byte/signed byte/word/signed word/dword/signed dword~) mul8su::$10 ← (byte/signed byte/word/signed word/dword/signed dword~) mul8su::$8
(word) mul8su::m ← (word) mul8su::m hi= (byte/signed byte/word/signed word/dword/signed dword~) mul8su::$10
(byte~) mul8su::$8 ← (byte~) mul8su::$6 - (byte~) mul8su::$7
(byte~) mul8su::$10 ← (byte~) mul8su::$8
(word) mul8su::m ← (word) mul8su::m hi= (byte~) mul8su::$10
to:mul8su::@1
mul8su::@return: scope:[mul8su] from mul8su::@1 mul8su::@3
(signed word) mul8su::return ← (signed word) mul8su::return
@ -1999,8 +1999,8 @@ mul16u::@1: scope:[mul16u] from mul16u mul16u::@4
if((boolean~) mul16u::$0) goto mul16u::@2
to:mul16u::@5
mul16u::@2: scope:[mul16u] from mul16u::@1 mul16u::@6
(byte~) mul16u::$1 ← (word) mul16u::a & (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) mul16u::$2 ← (byte~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) mul16u::$1 ← (word) mul16u::a & (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) mul16u::$3 ← ! (boolean~) mul16u::$2
if((boolean~) mul16u::$3) goto mul16u::@4
to:mul16u::@7
@ -2216,16 +2216,16 @@ sin8s::@2: scope:[sin8s] from sin8s::@1 sin8s::@6
(byte) sin8s::DIV_6 ← (byte/signed byte/word/signed word/dword/signed dword) 43
(byte~) sin8s::$10 ← call mulu8_sel (byte) sin8s::x3 (byte) sin8s::DIV_6 (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) sin8s::x3_6 ← (byte~) sin8s::$10
(byte/signed byte/word/signed word/dword/signed dword~) sin8s::$11 ← (byte) sin8s::x1 - (byte) sin8s::x3_6
(byte) sin8s::usinx ← (byte/signed byte/word/signed word/dword/signed dword~) sin8s::$11
(byte~) sin8s::$11 ← (byte) sin8s::x1 - (byte) sin8s::x3_6
(byte) sin8s::usinx ← (byte~) sin8s::$11
(byte~) sin8s::$12 ← call mulu8_sel (byte) sin8s::x3 (byte) sin8s::x1 (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) sin8s::x4 ← (byte~) sin8s::$12
(byte~) sin8s::$13 ← call mulu8_sel (byte) sin8s::x4 (byte) sin8s::x1 (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) sin8s::x5 ← (byte~) sin8s::$13
(byte~) sin8s::$14 ← (byte) sin8s::x5 >> (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) sin8s::x5_128 ← (byte~) sin8s::$14
(byte/word~) sin8s::$15 ← (byte) sin8s::usinx + (byte) sin8s::x5_128
(byte) sin8s::usinx ← (byte/word~) sin8s::$15
(byte~) sin8s::$15 ← (byte) sin8s::usinx + (byte) sin8s::x5_128
(byte) sin8s::usinx ← (byte~) sin8s::$15
(boolean~) sin8s::$16 ← (byte) sin8s::usinx >= (byte/word/signed word/dword/signed dword) 128
(boolean~) sin8s::$17 ← ! (boolean~) sin8s::$16
if((boolean~) sin8s::$17) goto sin8s::@3
@ -2468,8 +2468,8 @@ main::@2: scope:[main] from main::@1 main::@3
(void~) main::$6 ← call print_str (string) " @"
(signed word*~) main::$7 ← (signed word*) main::st1 + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*) main::st1 ← (signed word*~) main::$7
(word~) main::$8 ← (word) main::wavelength * (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*~) main::$9 ← (signed word[120]) main::sintab1 + (word~) main::$8
(word/signed dword/dword~) main::$8 ← (word) main::wavelength * (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*~) main::$9 ← (signed word[120]) main::sintab1 + (word/signed dword/dword~) main::$8
(boolean~) main::$10 ← (signed word*) main::st1 < (signed word*~) main::$9
if((boolean~) main::$10) goto main::@1
to:main::@4
@ -2631,8 +2631,8 @@ divr16u::@4: scope:[divr16u] from divr16u::@1
(word) divr16u::quotient#7 ← phi( divr16u::@1/(word) divr16u::quotient#6 )
(word) divr16u::dividend#7 ← phi( divr16u::@1/(word) divr16u::dividend#3 )
(word) divr16u::rem#7 ← phi( divr16u::@1/(word) divr16u::rem#0 )
(word~) divr16u::$5 ← (word) divr16u::rem#7 | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem#1 ← (word~) divr16u::$5
(word/dword~) divr16u::$5 ← (word) divr16u::rem#7 | (byte/signed byte/word/signed word/dword/signed dword) 1
(word) divr16u::rem#1 ← (word/dword~) divr16u::$5
to:divr16u::@2
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
(word) divr16u::divisor#7 ← phi( divr16u::@2/(word) divr16u::divisor#2 divr16u::@5/(word) divr16u::divisor#3 )
@ -2727,8 +2727,8 @@ mul16u::@2: scope:[mul16u] from mul16u::@1
(dword) mul16u::res#5 ← phi( mul16u::@1/(dword) mul16u::res#4 )
(dword) mul16u::mb#4 ← phi( mul16u::@1/(dword) mul16u::mb#5 )
(word) mul16u::a#3 ← phi( mul16u::@1/(word) mul16u::a#2 )
(byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) mul16u::$2 ← (byte~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(byte/word~) mul16u::$1 ← (word) mul16u::a#3 & (byte/signed byte/word/signed word/dword/signed dword) 1
(boolean~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) mul16u::$3 ← ! (boolean~) mul16u::$2
if((boolean~) mul16u::$3) goto mul16u::@4
to:mul16u::@7
@ -3174,8 +3174,8 @@ main::@8: scope:[main] from main::@7
(byte*) char_cursor#18 ← (byte*) char_cursor#38
(signed word*~) main::$7 ← (signed word*) main::st1#3 + (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*) main::st1#1 ← (signed word*~) main::$7
(word~) main::$8 ← (word) main::wavelength#1 * (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*~) main::$9 ← (signed word[120]) main::sintab1#0 + (word~) main::$8
(word/signed dword/dword~) main::$8 ← (word) main::wavelength#1 * (byte/signed byte/word/signed word/dword/signed dword) 2
(signed word*~) main::$9 ← (signed word[120]) main::sintab1#0 + (word/signed dword/dword~) main::$8
(boolean~) main::$10 ← (signed word*) main::st1#1 < (signed word*~) main::$9
if((boolean~) main::$10) goto main::@1
to:main::@return
@ -3332,7 +3332,7 @@ SYMBOL TABLE SSA
(byte~) divr16u::$2
(boolean~) divr16u::$3
(boolean~) divr16u::$4
(word~) divr16u::$5
(word/dword~) divr16u::$5
(word~) divr16u::$6
(word~) divr16u::$7
(boolean~) divr16u::$8
@ -3427,7 +3427,7 @@ SYMBOL TABLE SSA
(boolean~) main::$2
(boolean~) main::$3
(signed word*~) main::$7
(word~) main::$8
(word/signed dword/dword~) main::$8
(signed word*~) main::$9
(label) main::@1
(label) main::@2
@ -3468,7 +3468,7 @@ SYMBOL TABLE SSA
(word) main::wavelength#8
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(boolean~) mul16u::$0
(byte~) mul16u::$1
(byte/word~) mul16u::$1
(boolean~) mul16u::$2
(boolean~) mul16u::$3
(dword~) mul16u::$4
@ -3791,7 +3791,7 @@ SYMBOL TABLE SSA
OPTIMIZING CONTROL FLOW GRAPH
Inversing boolean not (boolean~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not (boolean~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from (boolean~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2
Inversing boolean not (boolean~) mul16u::$3 ← (byte~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) mul16u::$2 ← (byte~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not (boolean~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not (boolean~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from (boolean~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0
Inversing boolean not (boolean~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from (boolean~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0
Inversing boolean not (boolean~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0
@ -3894,7 +3894,7 @@ Alias (word) divr16u::dividend#3 = (word) divr16u::dividend#7
Alias (word) divr16u::quotient#6 = (word) divr16u::quotient#7
Alias (word) divr16u::divisor#4 = (word) divr16u::divisor#5
Alias (byte) divr16u::i#5 = (byte) divr16u::i#6
Alias (word) divr16u::rem#1 = (word~) divr16u::$5
Alias (word) divr16u::rem#1 = (word/dword~) divr16u::$5
Alias (word) divr16u::rem#6 = (word) divr16u::rem#8
Alias (word) divr16u::divisor#2 = (word) divr16u::divisor#3
Alias (byte) divr16u::i#3 = (byte) divr16u::i#4
@ -4251,7 +4251,7 @@ Simple Condition (boolean~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byt
Simple Condition (boolean~) divr16u::$9 if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3
Simple Condition (boolean~) divr16u::$11 if((byte) divr16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto divr16u::@1
Simple Condition (boolean~) mul16u::$0 if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2
Simple Condition (boolean~) mul16u::$3 if((byte~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4
Simple Condition (boolean~) mul16u::$3 if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4
Simple Condition (boolean~) sin16s_gen::$4 if((word) sin16s_gen::i#1<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@1
Simple Condition (boolean~) sin16s::$1 if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1
Simple Condition (boolean~) sin16s::$4 if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2
@ -4294,7 +4294,7 @@ Constant (const byte*) print_cls::$0 = SCREEN#0+1000
Constant (const byte*) line_cursor#1 = SCREEN#0
Constant (const signed word[120]) sin16s_gen::sintab#1 = main::sintab1#0
Constant (const word) sin16s_gen::wavelength#0 = main::wavelength#0
Constant (const word) main::$8 = main::wavelength#0*2
Constant (const word/signed dword/dword) main::$8 = main::wavelength#0*2
Succesful SSA optimization Pass2ConstantIdentification
Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0
Constant (const word) divr16u::dividend#2 = <div32u16u::dividend#0
@ -5017,8 +5017,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@1
[125] return [ mul16u::res#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 ] )
to:@return
mul16u::@2: scope:[mul16u] from mul16u::@1
[126] (byte~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] )
[127] if((byte~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] )
[126] (byte/word~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] )
[127] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] )
to:mul16u::@7
mul16u::@7: scope:[mul16u] from mul16u::@2
[128] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] )
@ -5274,7 +5274,7 @@ VARIABLE REGISTER WEIGHTS
(signed word) main::sw#0 6.6000000000000005
(word) main::wavelength
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(byte~) mul16u::$1 202.0
(byte/word~) mul16u::$1 202.0
(word) mul16u::a
(word) mul16u::a#0 101.0
(word) mul16u::a#1 1.3333333333333333
@ -6552,11 +6552,11 @@ mul16u: {
rts
//SEG251 mul16u::@2
b2:
//SEG252 [126] (byte~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) -- vbuz1=vwuz2_band_vbuc1
//SEG252 [126] (byte/word~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) -- vbuz1=vwuz2_band_vbuc1
lda a
and #1
sta _1
//SEG253 [127] if((byte~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) -- vbuz1_eq_0_then_la1
//SEG253 [127] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) -- vbuz1_eq_0_then_la1
lda _1
beq b4_from_b2
jmp b7
@ -6874,7 +6874,7 @@ Removing always clobbered register reg byte x as potential for zp ZP_BYTE:22 [ s
Statement [120] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a
Statement [122] (dword) mul16u::mb#0 ← ((dword)) (word) mul16u::b#0 [ mul16u::a#1 mul16u::mb#0 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] ) always clobbers reg byte a
Statement [124] if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) always clobbers reg byte a
Statement [126] (byte~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a
Statement [126] (byte/word~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a
Statement [128] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a
Statement [134] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:2::sin16s_gen:5::div32u16u:59 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a
Statement [135] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::sin16s_gen:5::div32u16u:59 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a
@ -6952,7 +6952,7 @@ Statement [119] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mu
Statement [120] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a
Statement [122] (dword) mul16u::mb#0 ← ((dword)) (word) mul16u::b#0 [ mul16u::a#1 mul16u::mb#0 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#1 mul16u::mb#0 ] ) always clobbers reg byte a
Statement [124] if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) always clobbers reg byte a
Statement [126] (byte~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a
Statement [126] (byte/word~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a
Statement [128] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#2 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a
Statement [134] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:2::sin16s_gen:5::div32u16u:59 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a
Statement [135] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:2::sin16s_gen:5::div32u16u:59 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a
@ -7963,10 +7963,10 @@ mul16u: {
rts
//SEG251 mul16u::@2
b2:
//SEG252 [126] (byte~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) -- vbuaa=vwuz1_band_vbuc1
//SEG252 [126] (byte/word~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) -- vbuaa=vwuz1_band_vbuc1
lda a
and #1
//SEG253 [127] if((byte~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) -- vbuaa_eq_0_then_la1
//SEG253 [127] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) -- vbuaa_eq_0_then_la1
cmp #0
beq b4_from_b2
jmp b7
@ -8478,7 +8478,7 @@ FINAL SYMBOL TABLE
(word) main::wavelength
(const word) main::wavelength#0 wavelength = (byte/signed byte/word/signed word/dword/signed dword) 120
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(byte~) mul16u::$1 reg byte a 202.0
(byte/word~) mul16u::$1 reg byte a 202.0
(label) mul16u::@1
(label) mul16u::@2
(label) mul16u::@4
@ -9391,10 +9391,10 @@ mul16u: {
rts
//SEG251 mul16u::@2
b2:
//SEG252 [126] (byte~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) -- vbuaa=vwuz1_band_vbuc1
//SEG252 [126] (byte/word~) mul16u::$1 ← (word) mul16u::a#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 mul16u::$1 ] ) -- vbuaa=vwuz1_band_vbuc1
lda a
and #1
//SEG253 [127] if((byte~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) -- vbuaa_eq_0_then_la1
//SEG253 [127] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 [ mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ( main:2::sin16s_gen:5::sin16s:64::mulu16_sel:83::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:88::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:92::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:98::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] main:2::sin16s_gen:5::sin16s:64::mulu16_sel:103::mul16u:116 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#2 mul16u::mb#2 ] ) -- vbuaa_eq_0_then_la1
cmp #0
beq b4
//SEG254 mul16u::@7

View File

@ -90,7 +90,7 @@
(word) main::wavelength
(const word) main::wavelength#0 wavelength = (byte/signed byte/word/signed word/dword/signed dword) 120
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(byte~) mul16u::$1 reg byte a 202.0
(byte/word~) mul16u::$1 reg byte a 202.0
(label) mul16u::@1
(label) mul16u::@2
(label) mul16u::@4

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