mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-17 12:08:54 +00:00
Void pointers now work. Closes #186
This commit is contained in:
parent
0a4ef77056
commit
7b2b8897a6
@ -166,7 +166,6 @@ public class Compiler {
|
||||
new PassNTypeInference(program).execute();
|
||||
new PassNTypeIdSimplification(program).execute();
|
||||
new Pass1StructTypeSizeFix(program).execute();
|
||||
new Pass1AssertProcedureCallParameters(program).execute();
|
||||
new Pass1AssertReturn(program).execute();
|
||||
new Pass1AssertUsedVars(program).execute();
|
||||
|
||||
@ -176,21 +175,19 @@ public class Compiler {
|
||||
}
|
||||
|
||||
new Pass1AddressOfVolatile(program).execute();
|
||||
|
||||
new Pass1FixLValuesLoHi(program).execute();
|
||||
new Pass1AssertNoLValueIntermediate(program).execute();
|
||||
new PassNAddTypeConversionAssignment(program).execute();
|
||||
new Pass1AssertProcedureCallParameters(program).execute();
|
||||
|
||||
new Pass1PointerSizeofFix(program).execute(); // After this point in the code all pointer math is byte-based
|
||||
new PassNSizeOfSimplification(program).execute(); // Needed to eliminate sizeof() referencing pointer value variables
|
||||
|
||||
//new PassNAddTypeConversionAssignment(program).execute();
|
||||
//new Pass1AssertProcedureCallParameters(program).execute();
|
||||
|
||||
new Pass1UnwindStructValues(program).execute();
|
||||
new PassNStructPointerRewriting(program).execute();
|
||||
|
||||
new PassNAddBooleanCasts(program).execute();
|
||||
new PassNAddTypeConversionAssignment(program).execute();
|
||||
//new Pass1AssertProcedureCallParameters(program).execute();
|
||||
|
||||
new Pass1EarlyConstantIdentification(program).execute();
|
||||
new Pass1ProcedureInline(program).execute();
|
||||
|
@ -123,6 +123,53 @@ public interface ProgramExpressionBinary extends ProgramExpression {
|
||||
}
|
||||
}
|
||||
|
||||
/** Binary expression - call parameter . */
|
||||
class ProgramExpressionBinaryCallParameter implements ProgramExpressionBinary {
|
||||
private final VariableRef parameterDef;
|
||||
private final ProgramValue parameterValue;
|
||||
|
||||
public ProgramExpressionBinaryCallParameter(VariableRef parameterDef, ProgramValue parameterValue) {
|
||||
this.parameterDef = parameterDef;
|
||||
this.parameterValue = parameterValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RValue getLeft() {
|
||||
return parameterDef;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OperatorBinary getOperator() {
|
||||
return Operators.ASSIGNMENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RValue getRight() {
|
||||
return (RValue) parameterValue.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(Value value) {
|
||||
throw new InternalError("Updating an entire call parameter is not allowed!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLeftCast(SymbolType toType, ListIterator<Statement> stmtIt, ScopeRef currentScope, ProgramScope symbols) {
|
||||
throw new InternalError("Casting parameter variable not allowed. " + parameterDef.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRightCast(SymbolType toType, ListIterator<Statement> stmtIt, ScopeRef currentScope, ProgramScope symbols) {
|
||||
Value value = parameterValue.get();
|
||||
if(value instanceof ConstantValue) {
|
||||
parameterValue.set(new ConstantCastValue(toType, (ConstantValue) value));
|
||||
} else {
|
||||
parameterValue.set(new CastValue(toType, (RValue) value));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Binary expression - assignment lvalue and the "total" rvalue. */
|
||||
class ProgramExpressionBinaryAssignmentLValue implements ProgramExpressionBinary {
|
||||
private final StatementAssignment assignment;
|
||||
|
@ -2,12 +2,15 @@ package dk.camelot64.kickc.model.iterator;
|
||||
|
||||
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.StatementConditionalJump;
|
||||
import dk.camelot64.kickc.model.statements.StatementPhiBlock;
|
||||
import dk.camelot64.kickc.model.operators.OperatorBinary;
|
||||
import dk.camelot64.kickc.model.statements.*;
|
||||
import dk.camelot64.kickc.model.symbols.Procedure;
|
||||
import dk.camelot64.kickc.model.symbols.ProgramScope;
|
||||
import dk.camelot64.kickc.model.symbols.Variable;
|
||||
import dk.camelot64.kickc.model.types.SymbolType;
|
||||
import dk.camelot64.kickc.model.values.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
/**
|
||||
@ -64,6 +67,16 @@ public class ProgramExpressionIterator {
|
||||
handler.execute(new ProgramExpressionBinary.ProgramExpressionBinaryPhiValueAssignemnt(phiVariable, value), stmt, stmtIt, block);
|
||||
}
|
||||
}
|
||||
} else if(stmt instanceof StatementCall) {
|
||||
StatementCall call = (StatementCall) stmt;
|
||||
List<RValue> paramValues = call.getParameters();
|
||||
Procedure procedure = program.getScope().getProcedure(call.getProcedure());
|
||||
List<Variable> paramDefs = procedure.getParameters();
|
||||
if(paramValues!=null && paramDefs.size()==paramValues.size()) {
|
||||
for(int i=0;i<paramDefs.size(); i++) {
|
||||
handler.execute(new ProgramExpressionBinary.ProgramExpressionBinaryCallParameter(paramDefs.get(i).getRef(), new ProgramValue.CallParameter(call, i)), stmt, stmtIt, block);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Iterate all statement values
|
||||
ProgramValueIterator.execute(stmt, programValueHandler, stmtIt, block);
|
||||
|
@ -32,7 +32,7 @@ public class PassNAddTypeConversionAssignment extends Pass2SsaOptimization {
|
||||
SymbolType rightType = SymbolTypeInference.inferType(getProgram().getScope(), right);
|
||||
if(!SymbolTypeConversion.assignmentTypeMatch(leftType, rightType) || SymbolType.VAR.equals(rightType)) {
|
||||
// Assigning a pointer from an unsigned word
|
||||
if(programExpression instanceof ProgramExpressionBinary.ProgramExpressionBinaryAssignmentLValue) {
|
||||
if(programExpression instanceof ProgramExpressionBinary.ProgramExpressionBinaryAssignmentLValue || programExpression instanceof ProgramExpressionBinary.ProgramExpressionBinaryCallParameter) {
|
||||
if((leftType instanceof SymbolTypePointer) && SymbolType.isInteger(rightType)) {
|
||||
getLog().append("Adding pointer type conversion cast (" + leftType + ") " + binary.getLeft().toString() + " in " + currentStmt.toString(getProgram(), false));
|
||||
binary.addRightCast(leftType, stmtIt, currentBlock.getScope(), getScope());
|
||||
|
@ -40,12 +40,10 @@ public class TestPrograms {
|
||||
compileAndCompare("call-parameter-autocast", log());
|
||||
}
|
||||
|
||||
/** Awaiting type system fix for void pointers
|
||||
@Test
|
||||
public void testPointerVoid2() throws IOException, URISyntaxException {
|
||||
compileAndCompare("pointer-void-2", log());
|
||||
}
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testPointerVoid1() throws IOException, URISyntaxException {
|
||||
|
@ -1,5 +1,6 @@
|
||||
Fixing pointer array-indexing *((word*) SCREEN + (byte) idx)
|
||||
Identified literal word (word) { $12, $34 } in (void~) main::$2 ← call print { (number) $12, (number) $34 }
|
||||
Adding pointer type conversion cast (word*) SCREEN in (word*) SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) SCREEN + (byte) idx)
|
||||
Identified constant variable (word) main::w
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@ -20,7 +21,7 @@ main::@1: scope:[main] from main
|
||||
main::@2: scope:[main] from main::@1
|
||||
(byte) idx#9 ← phi( main::@1/(byte) idx#6 )
|
||||
(byte) idx#1 ← (byte) idx#9
|
||||
(word) print::w#2 ← { (number) $12, (number) $34 }
|
||||
(word) print::w#2 ← (word){ (number) $12, (number) $34 }
|
||||
call print
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
@ -101,6 +102,8 @@ SYMBOL TABLE SSA
|
||||
(word) print::w#2
|
||||
(word) print::w#3
|
||||
|
||||
Fixing inline constructor with main::$3 ← (byte)$12 w= (byte)$34
|
||||
Successful SSA optimization Pass2FixInlineConstructorsNew
|
||||
Adding number conversion cast (unumber) $1234 in (word) main::w#0 ← (number) $1234
|
||||
Adding number conversion cast (unumber) $1234 in (word) print::w#0 ← (number) $1234
|
||||
Adding number conversion cast (unumber) 0 in (byte) idx#4 ← (number) 0
|
||||
@ -112,6 +115,8 @@ Inlining cast (byte) idx#4 ← (unumber)(number) 0
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant integer cast $1234
|
||||
Simplifying constant integer cast $1234
|
||||
Simplifying constant integer cast $12
|
||||
Simplifying constant integer cast $34
|
||||
Simplifying constant pointer cast (word*) 1024
|
||||
Simplifying constant integer cast 0
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
@ -119,10 +124,9 @@ Finalized unsigned number type (word) $1234
|
||||
Finalized unsigned number type (word) $1234
|
||||
Finalized unsigned number type (byte) 0
|
||||
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
||||
Identified literal word (word) { $12, $34 } in (word) print::w#2 ← { (number) $12, (number) $34 }
|
||||
Successful SSA optimization PassNAddTypeConversionAssignment
|
||||
Alias (byte) idx#0 = (byte) idx#8
|
||||
Alias (byte) idx#1 = (byte) idx#9
|
||||
Alias (word) print::w#2 = (word~) main::$3
|
||||
Alias (byte) idx#10 = (byte) idx#2 (byte) idx#11 (byte) idx#3
|
||||
Alias (byte) idx#13 = (byte) idx#5 (byte) idx#6
|
||||
Alias (byte) idx#16 = (byte) idx#4
|
||||
@ -134,6 +138,8 @@ Identical Phi Values (byte) idx#1 (byte) idx#13
|
||||
Identical Phi Values (byte) idx#10 (byte) idx#13
|
||||
Identical Phi Values (byte) idx#14 (byte) idx#10
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Constant right-side identified [10] (word) print::w#2 ← (byte) $12 w= (byte) $34
|
||||
Successful SSA optimization Pass2ConstantRValueConsolidation
|
||||
Constant (const word) main::w#0 = $1234
|
||||
Constant (const word) print::w#0 = $1234
|
||||
Constant (const word*) SCREEN#0 = (word*) 1024
|
||||
@ -141,15 +147,6 @@ Constant (const byte) idx#16 = 0
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Constant (const word) print::w#1 = main::w#0
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Fixing inline constructor with main::$3 ← (byte)$12 w= (byte)$34
|
||||
Successful SSA optimization Pass2FixInlineConstructorsNew
|
||||
Simplifying constant integer cast $12
|
||||
Simplifying constant integer cast $34
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
Alias (word) print::w#2 = (word~) main::$3
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Constant right-side identified [2] (word) print::w#2 ← (byte) $12 w= (byte) $34
|
||||
Successful SSA optimization Pass2ConstantRValueConsolidation
|
||||
Adding number conversion cast (unumber) $12*$100+$34 in (word) print::w#2 ← (byte) $12*(number) $100+(byte) $34
|
||||
Adding number conversion cast (unumber) $12*$100 in (word) print::w#2 ← ((unumber)) (byte) $12*(number) $100+(byte) $34
|
||||
Adding number conversion cast (unumber) $100 in (word) print::w#2 ← ((unumber)) (unumber)(byte) $12*(number) $100+(byte) $34
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((byte*[]) screens + (byte) getScreen::id)
|
||||
Adding pointer type conversion cast (byte*) main::DSP in (byte*) main::DSP ← (number) $400
|
||||
Fixing pointer array-indexing *((byte*[]) screens + (byte) getScreen::id)
|
||||
Identified constant variable (byte*) main::DSP
|
||||
Inlined call (byte*~) main::$0 ← call getScreen (number) 0
|
||||
Inlined call (byte~) main::$1 ← call spritePtr (byte*~) main::$0
|
||||
|
@ -4,6 +4,54 @@ Resolved forward reference SQUARES_X to (word[$28]) SQUARES_X
|
||||
Resolved forward reference SQUARES_Y to (word[$19]) SQUARES_Y
|
||||
Resolved forward reference RASTER_IRQ_MIDDLE to (byte) RASTER_IRQ_MIDDLE
|
||||
Resolved forward reference irqBottom to interrupt(HARDWARE_ALL)(void()) irqBottom()
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
Adding pointer type conversion cast (byte*) SPRITES_XPOS in (byte*) SPRITES_XPOS ← (number) $d000
|
||||
Adding pointer type conversion cast (byte*) SPRITES_YPOS in (byte*) SPRITES_YPOS ← (number) $d001
|
||||
Adding pointer type conversion cast (byte*) SPRITES_XMSB in (byte*) SPRITES_XMSB ← (number) $d010
|
||||
Adding pointer type conversion cast (byte*) RASTER in (byte*) RASTER ← (number) $d012
|
||||
Adding pointer type conversion cast (byte*) SPRITES_ENABLE in (byte*) SPRITES_ENABLE ← (number) $d015
|
||||
Adding pointer type conversion cast (byte*) SPRITES_EXPAND_Y in (byte*) SPRITES_EXPAND_Y ← (number) $d017
|
||||
Adding pointer type conversion cast (byte*) SPRITES_PRIORITY in (byte*) SPRITES_PRIORITY ← (number) $d01b
|
||||
Adding pointer type conversion cast (byte*) SPRITES_MC in (byte*) SPRITES_MC ← (number) $d01c
|
||||
Adding pointer type conversion cast (byte*) SPRITES_EXPAND_X in (byte*) SPRITES_EXPAND_X ← (number) $d01d
|
||||
Adding pointer type conversion cast (byte*) BORDERCOL in (byte*) BORDERCOL ← (number) $d020
|
||||
Adding pointer type conversion cast (byte*) BGCOL in (byte*) BGCOL ← (number) $d021
|
||||
Adding pointer type conversion cast (byte*) BGCOL1 in (byte*) BGCOL1 ← (number) $d021
|
||||
Adding pointer type conversion cast (byte*) BGCOL2 in (byte*) BGCOL2 ← (number) $d022
|
||||
Adding pointer type conversion cast (byte*) BGCOL3 in (byte*) BGCOL3 ← (number) $d023
|
||||
Adding pointer type conversion cast (byte*) BGCOL4 in (byte*) BGCOL4 ← (number) $d024
|
||||
Adding pointer type conversion cast (byte*) SPRITES_MC1 in (byte*) SPRITES_MC1 ← (number) $d025
|
||||
Adding pointer type conversion cast (byte*) SPRITES_MC2 in (byte*) SPRITES_MC2 ← (number) $d026
|
||||
Adding pointer type conversion cast (byte*) SPRITES_COLS in (byte*) SPRITES_COLS ← (number) $d027
|
||||
Adding pointer type conversion cast (byte*) VIC_CONTROL in (byte*) VIC_CONTROL ← (number) $d011
|
||||
Adding pointer type conversion cast (byte*) D011 in (byte*) D011 ← (number) $d011
|
||||
Adding pointer type conversion cast (byte*) VIC_CONTROL2 in (byte*) VIC_CONTROL2 ← (number) $d016
|
||||
Adding pointer type conversion cast (byte*) D016 in (byte*) D016 ← (number) $d016
|
||||
Adding pointer type conversion cast (byte*) D018 in (byte*) D018 ← (number) $d018
|
||||
Adding pointer type conversion cast (byte*) VIC_MEMORY in (byte*) VIC_MEMORY ← (number) $d018
|
||||
Adding pointer type conversion cast (byte*) LIGHTPEN_X in (byte*) LIGHTPEN_X ← (number) $d013
|
||||
Adding pointer type conversion cast (byte*) LIGHTPEN_Y in (byte*) LIGHTPEN_Y ← (number) $d014
|
||||
Adding pointer type conversion cast (byte*) IRQ_STATUS in (byte*) IRQ_STATUS ← (number) $d019
|
||||
Adding pointer type conversion cast (byte*) IRQ_ENABLE in (byte*) IRQ_ENABLE ← (number) $d01a
|
||||
Adding pointer type conversion cast (byte*) COLS in (byte*) COLS ← (number) $d800
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_A in (byte*) CIA1_PORT_A ← (number) $dc00
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_B in (byte*) CIA1_PORT_B ← (number) $dc01
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_A_DDR in (byte*) CIA1_PORT_A_DDR ← (number) $dc02
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_B_DDR in (byte*) CIA1_PORT_B_DDR ← (number) $dc03
|
||||
Adding pointer type conversion cast (byte*) CIA1_INTERRUPT in (byte*) CIA1_INTERRUPT ← (number) $dc0d
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_A in (byte*) CIA2_PORT_A ← (number) $dd00
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_B in (byte*) CIA2_PORT_B ← (number) $dd01
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_A_DDR in (byte*) CIA2_PORT_A_DDR ← (number) $dd02
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_B_DDR in (byte*) CIA2_PORT_B_DDR ← (number) $dd03
|
||||
Adding pointer type conversion cast (byte*) CIA2_INTERRUPT in (byte*) CIA2_INTERRUPT ← (number) $dd0d
|
||||
Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_IRQ ← (number) $314
|
||||
Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) SPRITE_DATA in (byte*) SPRITE_DATA ← (number) $2000
|
||||
Adding pointer type conversion cast (word*) VXSIN in (word*) VXSIN ← (number) $2200
|
||||
Adding pointer type conversion cast (word*) VYSIN in (word*) VYSIN ← (number) $2280
|
||||
Fixing pointer addition (struct ProcessingSprite*~) processChars::$2 ← (struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte) processChars::i
|
||||
Fixing pointer array-indexing *((struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[$28]) SQUARES_X + (byte) getCharToProcess::x)
|
||||
@ -108,54 +156,6 @@ Rewriting struct pointer member access *((struct ProcessingSprite*) processChars
|
||||
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).vy
|
||||
Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y
|
||||
Warning! Adding boolean cast to non-boolean condition (byte~) processChars::$11
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
Adding pointer type conversion cast (byte*) SPRITES_XPOS in (byte*) SPRITES_XPOS ← (number) $d000
|
||||
Adding pointer type conversion cast (byte*) SPRITES_YPOS in (byte*) SPRITES_YPOS ← (number) $d001
|
||||
Adding pointer type conversion cast (byte*) SPRITES_XMSB in (byte*) SPRITES_XMSB ← (number) $d010
|
||||
Adding pointer type conversion cast (byte*) RASTER in (byte*) RASTER ← (number) $d012
|
||||
Adding pointer type conversion cast (byte*) SPRITES_ENABLE in (byte*) SPRITES_ENABLE ← (number) $d015
|
||||
Adding pointer type conversion cast (byte*) SPRITES_EXPAND_Y in (byte*) SPRITES_EXPAND_Y ← (number) $d017
|
||||
Adding pointer type conversion cast (byte*) SPRITES_PRIORITY in (byte*) SPRITES_PRIORITY ← (number) $d01b
|
||||
Adding pointer type conversion cast (byte*) SPRITES_MC in (byte*) SPRITES_MC ← (number) $d01c
|
||||
Adding pointer type conversion cast (byte*) SPRITES_EXPAND_X in (byte*) SPRITES_EXPAND_X ← (number) $d01d
|
||||
Adding pointer type conversion cast (byte*) BORDERCOL in (byte*) BORDERCOL ← (number) $d020
|
||||
Adding pointer type conversion cast (byte*) BGCOL in (byte*) BGCOL ← (number) $d021
|
||||
Adding pointer type conversion cast (byte*) BGCOL1 in (byte*) BGCOL1 ← (number) $d021
|
||||
Adding pointer type conversion cast (byte*) BGCOL2 in (byte*) BGCOL2 ← (number) $d022
|
||||
Adding pointer type conversion cast (byte*) BGCOL3 in (byte*) BGCOL3 ← (number) $d023
|
||||
Adding pointer type conversion cast (byte*) BGCOL4 in (byte*) BGCOL4 ← (number) $d024
|
||||
Adding pointer type conversion cast (byte*) SPRITES_MC1 in (byte*) SPRITES_MC1 ← (number) $d025
|
||||
Adding pointer type conversion cast (byte*) SPRITES_MC2 in (byte*) SPRITES_MC2 ← (number) $d026
|
||||
Adding pointer type conversion cast (byte*) SPRITES_COLS in (byte*) SPRITES_COLS ← (number) $d027
|
||||
Adding pointer type conversion cast (byte*) VIC_CONTROL in (byte*) VIC_CONTROL ← (number) $d011
|
||||
Adding pointer type conversion cast (byte*) D011 in (byte*) D011 ← (number) $d011
|
||||
Adding pointer type conversion cast (byte*) VIC_CONTROL2 in (byte*) VIC_CONTROL2 ← (number) $d016
|
||||
Adding pointer type conversion cast (byte*) D016 in (byte*) D016 ← (number) $d016
|
||||
Adding pointer type conversion cast (byte*) D018 in (byte*) D018 ← (number) $d018
|
||||
Adding pointer type conversion cast (byte*) VIC_MEMORY in (byte*) VIC_MEMORY ← (number) $d018
|
||||
Adding pointer type conversion cast (byte*) LIGHTPEN_X in (byte*) LIGHTPEN_X ← (number) $d013
|
||||
Adding pointer type conversion cast (byte*) LIGHTPEN_Y in (byte*) LIGHTPEN_Y ← (number) $d014
|
||||
Adding pointer type conversion cast (byte*) IRQ_STATUS in (byte*) IRQ_STATUS ← (number) $d019
|
||||
Adding pointer type conversion cast (byte*) IRQ_ENABLE in (byte*) IRQ_ENABLE ← (number) $d01a
|
||||
Adding pointer type conversion cast (byte*) COLS in (byte*) COLS ← (number) $d800
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_A in (byte*) CIA1_PORT_A ← (number) $dc00
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_B in (byte*) CIA1_PORT_B ← (number) $dc01
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_A_DDR in (byte*) CIA1_PORT_A_DDR ← (number) $dc02
|
||||
Adding pointer type conversion cast (byte*) CIA1_PORT_B_DDR in (byte*) CIA1_PORT_B_DDR ← (number) $dc03
|
||||
Adding pointer type conversion cast (byte*) CIA1_INTERRUPT in (byte*) CIA1_INTERRUPT ← (number) $dc0d
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_A in (byte*) CIA2_PORT_A ← (number) $dd00
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_B in (byte*) CIA2_PORT_B ← (number) $dd01
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_A_DDR in (byte*) CIA2_PORT_A_DDR ← (number) $dd02
|
||||
Adding pointer type conversion cast (byte*) CIA2_PORT_B_DDR in (byte*) CIA2_PORT_B_DDR ← (number) $dd03
|
||||
Adding pointer type conversion cast (byte*) CIA2_INTERRUPT in (byte*) CIA2_INTERRUPT ← (number) $dd0d
|
||||
Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_IRQ ← (number) $314
|
||||
Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) SPRITE_DATA in (byte*) SPRITE_DATA ← (number) $2000
|
||||
Adding pointer type conversion cast (word*) VXSIN in (word*) VXSIN ← (number) $2200
|
||||
Adding pointer type conversion cast (word*) VYSIN in (word*) VYSIN ← (number) $2280
|
||||
Adding pointer type conversion cast (byte*) *(main::$25 + main::$16) in *((byte**) main::$25 + (byte~) main::$16) ← (number) 0
|
||||
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
||||
Culled Empty Block (label) @1
|
||||
|
@ -1,4 +1,3 @@
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -46,6 +45,7 @@ Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWA
|
||||
Adding pointer type conversion cast (byte*) MEDUSA_SCREEN in (byte*) MEDUSA_SCREEN ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) MEDUSA_COLORS in (byte*) MEDUSA_COLORS ← (number) $1400
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
|
||||
Identified constant variable (byte*) MEDUSA_SCREEN
|
||||
Identified constant variable (byte*) MEDUSA_COLORS
|
||||
Identified constant variable (byte*) SCREEN
|
||||
|
@ -8,21 +8,6 @@ Resolved forward reference COLLISION_NONE to (byte) COLLISION_NONE
|
||||
Resolved forward reference COLLISION_NONE to (byte) COLLISION_NONE
|
||||
Resolved forward reference COLLISION_NONE to (byte) COLLISION_NONE
|
||||
Setting inferred volatile on symbol affected by address-of (dword*~) render_score::$1 ← & (dword) score_bcd
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_1 + (byte) render_init::i)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_2 + (byte) render_init::i)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_1 + (byte~) render_playfield::$2)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_1 + (byte~) render_moving::$1)
|
||||
Fixing pointer array-indexing *((word[]) PIECES + (byte) next_piece_idx)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) playfield_lines + (byte) play_init::j)
|
||||
Fixing pointer array-indexing *((dword[]) SCORE_BASE_BCD + (byte) play_init::b)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_init::b)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) playfield_lines + (byte) play_collision::yp)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) playfield_lines + (byte) play_lock_current::yp)
|
||||
Fixing pointer array-indexing *((word[]) PIECES + (byte) play_spawn_current::current_piece_idx)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_update_score::removed)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_increase_level::b)
|
||||
Fixing pointer array-indexing *((dword[]) SCORE_BASE_BCD + (byte) play_increase_level::b)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_increase_level::b)
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -78,9 +63,24 @@ Adding pointer type conversion cast (byte*) PLAYFIELD_SCREEN_ORIGINAL in (byte*)
|
||||
Adding pointer type conversion cast (byte*) PLAYFIELD_COLORS_ORIGINAL in (byte*) PLAYFIELD_COLORS_ORIGINAL ← (number) $1c00
|
||||
Adding pointer type conversion cast (byte*) PLAYFIELD_SPRITES in (byte*) PLAYFIELD_SPRITES ← (number) $2000
|
||||
Adding pointer type conversion cast (byte*) PLAYFIELD_CHARSET in (byte*) PLAYFIELD_CHARSET ← (number) $2800
|
||||
Adding pointer type conversion cast (byte*) render_next::next_piece_gfx in (byte*) render_next::next_piece_gfx ← *((word[]) PIECES + (byte~) render_next::$6)
|
||||
Adding pointer type conversion cast (byte*) render_next::next_piece_gfx in (byte*) render_next::next_piece_gfx ← *((word[]) PIECES + (byte) next_piece_idx)
|
||||
Adding pointer type conversion cast (byte*) current_piece in (byte*) current_piece ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) current_piece in (byte*) current_piece ← *((word[]) PIECES + (byte~) play_spawn_current::$7)
|
||||
Adding pointer type conversion cast (byte*) current_piece in (byte*) current_piece ← *((word[]) PIECES + (byte) play_spawn_current::current_piece_idx)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_1 + (byte) render_init::i)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_2 + (byte) render_init::i)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_1 + (byte~) render_playfield::$2)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) screen_lines_1 + (byte~) render_moving::$1)
|
||||
Fixing pointer array-indexing *((word[]) PIECES + (byte) next_piece_idx)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) playfield_lines + (byte) play_init::j)
|
||||
Fixing pointer array-indexing *((dword[]) SCORE_BASE_BCD + (byte) play_init::b)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_init::b)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) playfield_lines + (byte) play_collision::yp)
|
||||
Fixing pointer array-indexing *((byte*[PLAYFIELD_LINES]) playfield_lines + (byte) play_lock_current::yp)
|
||||
Fixing pointer array-indexing *((word[]) PIECES + (byte) play_spawn_current::current_piece_idx)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_update_score::removed)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_increase_level::b)
|
||||
Fixing pointer array-indexing *((dword[]) SCORE_BASE_BCD + (byte) play_increase_level::b)
|
||||
Fixing pointer array-indexing *((dword[5]) score_add_bcd + (byte) play_increase_level::b)
|
||||
Identified constant variable (word) render_score::score_offset
|
||||
Identified constant variable (word) render_score::lines_offset
|
||||
Identified constant variable (word) render_score::level_offset
|
||||
|
@ -1,8 +1,8 @@
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (number) 0
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (number) $3e7
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (byte) main::i
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (word) main::i1
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@12
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,8 +1,8 @@
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (number) 0
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (number) $3e7
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (byte) main::i
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (word) main::i1
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@12
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,7 +1,7 @@
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean condition (byte) main::i
|
||||
Warning! Adding boolean cast to non-boolean condition (byte) main::j
|
||||
Warning! Adding boolean cast to non-boolean condition (byte) main::k
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@6
|
||||
Culled Empty Block (label) main::@7
|
||||
Culled Empty Block (label) main::@8
|
||||
|
@ -1,5 +1,5 @@
|
||||
Warning! Adding boolean cast to non-boolean condition (signed byte) main::i
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean condition (signed byte) main::i
|
||||
Culled Empty Block (label) main::@5
|
||||
Culled Empty Block (label) main::@6
|
||||
Culled Empty Block (label) main::@7
|
||||
|
@ -1,6 +1,6 @@
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (number~) main::$0
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (number~) main::$3
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@10
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,5 +1,5 @@
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (byte) main::b
|
||||
Adding pointer type conversion cast (byte*) main::screen in (byte*) main::screen ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (byte) main::b
|
||||
Identified constant variable (byte) main::b
|
||||
Identified constant variable (byte*) main::screen
|
||||
Culled Empty Block (label) main::@1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Adding pointer type conversion cast (signed word*) main::screen in (signed word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((signed word[3]) world + (byte) main::i)
|
||||
Fixing pointer array-indexing *((signed word[3]) world + (number) 0)
|
||||
Adding pointer type conversion cast (signed word*) main::screen in (signed word*) main::screen ← (number) $400
|
||||
Identified constant variable (signed word*) main::screen
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((word*) SCREEN + (byte) screen_idx)
|
||||
Adding pointer type conversion cast (word*) SCREEN in (word*) SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) SCREEN + (byte) screen_idx)
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::button_color
|
||||
Created struct value member variable (byte) main::button_size
|
||||
Converted struct value to member variables (struct Button) main::button
|
||||
@ -5,7 +6,6 @@ Adding struct value list initializer (byte) main::button_color ← (const byte)
|
||||
Adding struct value list initializer (byte) main::button_size ← (number) $18
|
||||
Replacing struct member reference (struct Button) main::button.color with member variable reference (byte) main::button_color
|
||||
Replacing struct member reference (struct Button) main::button.size with member variable reference (byte) main::button_size
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (byte) main::button_color
|
||||
Identified constant variable (byte) main::button_size
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::button_color
|
||||
Created struct value member variable (byte) main::button_size
|
||||
Converted struct value to member variables (struct Button) main::button
|
||||
@ -5,7 +6,6 @@ Adding struct value list initializer (byte) main::button_color ← (const byte)
|
||||
Adding struct value list initializer (byte) main::button_size ← (number) $18
|
||||
Replacing struct member reference (struct Button) main::button.color with member variable reference (byte) main::button_color
|
||||
Replacing struct member reference (struct Button) main::button.size with member variable reference (byte) main::button_size
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (byte) main::button_color
|
||||
Identified constant variable (byte) main::button_size
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) init::sx)
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -49,6 +46,9 @@ Adding pointer type conversion cast (byte*) PLEX_SCREEN_PTR in (byte*) PLEX_SCRE
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) SPRITE in (byte*) SPRITE ← (number) $2000
|
||||
Adding pointer type conversion cast (byte*) YSIN in (byte*) YSIN ← (number) $2100
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) init::sx)
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Identified constant variable (byte*) SPRITE
|
||||
Identified constant variable (byte*) YSIN
|
||||
|
@ -1,6 +1,3 @@
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Fixing pointer addition (signed word*~) loop::$1 ← (signed word[XSIN_SIZE]) xsin + (word) xsin_idx
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -48,6 +45,9 @@ Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWA
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) LOGO in (byte*) LOGO ← (number) $2000
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Fixing pointer addition (signed word*~) loop::$1 ← (signed word[XSIN_SIZE]) xsin + (word) xsin_idx
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Identified constant variable (byte*) LOGO
|
||||
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
||||
|
@ -1,7 +1,3 @@
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Fixing pointer addition (signed word*~) render_sine::$0 ← (signed word[$200]) sin + (word) render_sine::sin_idx
|
||||
Fixing pointer addition (signed word*~) render_sine::$3 ← (signed word*) sin2 + (word) render_sine::sin_idx
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -50,6 +46,10 @@ Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) BITMAP in (byte*) BITMAP ← (number) $2000
|
||||
Adding pointer type conversion cast (signed word*) sin2 in (signed word*) sin2 ← (number) $1400
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Fixing pointer addition (signed word*~) render_sine::$0 ← (signed word[$200]) sin + (word) render_sine::sin_idx
|
||||
Fixing pointer addition (signed word*~) render_sine::$3 ← (signed word*) sin2 + (word) render_sine::sin_idx
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Identified constant variable (byte*) BITMAP
|
||||
Identified constant variable (signed word*) sin2
|
||||
|
@ -1,6 +1,6 @@
|
||||
Adding pointer type conversion cast (dword*) main::screen in (dword*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((dword*) main::screen + (number) 0)
|
||||
Fixing pointer array-indexing *((dword*) main::screen + (number) 1)
|
||||
Adding pointer type conversion cast (dword*) main::screen in (dword*) main::screen ← (number) $400
|
||||
Identified constant variable (dword*) main::screen
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) mul16u::@1
|
||||
|
@ -1,8 +1,8 @@
|
||||
Resolved forward reference fn1 to (void()) fn1()
|
||||
Resolved forward reference fn2 to (void()) fn2()
|
||||
Fixing pointer array-indexing *((void()*[2]) fns + (number~) main::$0)
|
||||
Adding pointer type conversion cast (byte*) fn1::BORDERCOL in (byte*) fn1::BORDERCOL ← (number) $d020
|
||||
Adding pointer type conversion cast (byte*) fn2::BGCOL in (byte*) fn2::BGCOL ← (number) $d021
|
||||
Fixing pointer array-indexing *((void()*[2]) fns + (number~) main::$0)
|
||||
Culled Empty Block (label) main::@4
|
||||
Culled Empty Block (label) main::@3
|
||||
Culled Empty Block (label) main::@5
|
||||
|
@ -2,13 +2,13 @@ Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$2
|
||||
Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$6 ← & (byte*) utoa16w::dst
|
||||
Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$10 ← & (byte*) utoa16w::dst
|
||||
Setting inferred volatile on symbol affected by address-of (byte**~) utoa16w::$14 ← & (byte*) utoa16w::dst
|
||||
Fixing pointer array-indexing *((word[]) UTOA10_SUB + (byte) utoa10w::i)
|
||||
Fixing pointer array-indexing *((word[]) UTOA10_SUB + (byte) utoa10w::i)
|
||||
Adding pointer type conversion cast (byte*) control in (byte*) control ← (number) $d011
|
||||
Adding pointer type conversion cast (byte*) raster in (byte*) raster ← (number) $d012
|
||||
Adding pointer type conversion cast (byte*) bordercol in (byte*) bordercol ← (number) $d020
|
||||
Adding pointer type conversion cast (byte*) main::screen in (byte*) main::screen ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) cls::screen in (byte*) cls::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word[]) UTOA10_SUB + (byte) utoa10w::i)
|
||||
Fixing pointer array-indexing *((word[]) UTOA10_SUB + (byte) utoa10w::i)
|
||||
Identified constant variable (byte*) cls::screen
|
||||
Culled Empty Block (label) main::@2
|
||||
Culled Empty Block (label) main::@9
|
||||
|
@ -1,6 +1,6 @@
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Identified literal word (word) { 2, 1 } in (word) main::w ← { (byte) 2, (byte) 1 }
|
||||
Adding pointer type conversion cast (word*) main::screen in (word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Identified constant variable (word*) main::screen
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,6 +1,6 @@
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Identified literal word (word) { 1, 2 } in (word) main::w ← { (number) 1, (number) 2 }
|
||||
Adding pointer type conversion cast (word*) main::screen in (word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Identified constant variable (word*) main::screen
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,6 +1,6 @@
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Identified literal word (word) { 1, 2 } in (word) main::w ← { (number) 1, (byte) 2 }
|
||||
Adding pointer type conversion cast (word*) main::screen in (word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Identified constant variable (word*) main::screen
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,9 +1,3 @@
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_end + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_cur + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) y_cur + (byte) point_init::point_idx)
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -51,6 +45,12 @@ Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWA
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) BITMAP in (byte*) BITMAP ← (number) $a000
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $8800
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_end + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_start + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) x_cur + (byte) point_init::point_idx)
|
||||
Fixing pointer array-indexing *((word[SIZE]) y_cur + (byte) point_init::point_idx)
|
||||
Identified constant variable (byte*) BITMAP
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
||||
|
@ -1,11 +1,11 @@
|
||||
Fixing pointer increment (word*) lin16u_gen::lintab ← ++ (word*) lin16u_gen::lintab
|
||||
Fixing pointer array-indexing *((word[$14]) main::lintab1 + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[$14]) main::lintab2 + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[$14]) main::lintab3 + (byte) main::i)
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Identified literal word (dword) { lin16u_gen::stepi, lin16u_gen::stepf } in (dword) lin16u_gen::step ← { (word) lin16u_gen::stepi, (word) lin16u_gen::stepf }
|
||||
Identified literal word (dword) { lin16u_gen::min, 0 } in (dword) lin16u_gen::val ← { (word) lin16u_gen::min, (number) 0 }
|
||||
Fixing pointer increment (word*) lin16u_gen::lintab ← ++ (word*) lin16u_gen::lintab
|
||||
Fixing pointer array-indexing *((word[$14]) main::lintab1 + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[$14]) main::lintab2 + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[$14]) main::lintab3 + (byte) main::i)
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) divr16u::@7
|
||||
Culled Empty Block (label) @3
|
||||
|
@ -1,6 +1,6 @@
|
||||
Adding pointer type conversion cast (word*) main::SCREEN in (word*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) main::SCREEN + (number) 0)
|
||||
Fixing pointer array-indexing *((word*) main::SCREEN + (number) 2)
|
||||
Adding pointer type conversion cast (word*) main::SCREEN in (word*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (word*) main::SCREEN
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((word*) main::screen + (byte) main::i)
|
||||
Adding pointer type conversion cast (word*) main::screen in (word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) main::screen + (byte) main::i)
|
||||
Culled Empty Block (label) mul8u::@5
|
||||
Culled Empty Block (label) mul8u::@6
|
||||
Culled Empty Block (label) mul8u::@8
|
||||
|
@ -1,7 +1,4 @@
|
||||
Resolved forward reference plex_irq to interrupt(KERNEL_MIN)(void()) plex_irq()
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) init::sx)
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -50,6 +47,9 @@ Adding pointer type conversion cast (byte*) PLEX_SCREEN_PTR in (byte*) PLEX_SCRE
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) SPRITE in (byte*) SPRITE ← (number) $2000
|
||||
Adding pointer type conversion cast (byte*) YSIN in (byte*) YSIN ← (number) $2100
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) plexShowSprite::xpos_idx)
|
||||
Fixing pointer array-indexing *((word[PLEX_COUNT]) PLEX_XPOS + (byte) init::sx)
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Identified constant variable (byte*) SPRITE
|
||||
Identified constant variable (byte*) YSIN
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((signed word*) main::screen + (byte) main::i)
|
||||
Adding pointer type conversion cast (signed word*) main::screen in (signed word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((signed word*) main::screen + (byte) main::i)
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,7 +1,7 @@
|
||||
Fixing pointer array-indexing *((word[]) charset_spec_row + (byte) main::c)
|
||||
Adding pointer type conversion cast (byte*) VIC_MEMORY in (byte*) VIC_MEMORY ← (number) $d018
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) CHARSET in (byte*) CHARSET ← (number) $3000
|
||||
Fixing pointer array-indexing *((word[]) charset_spec_row + (byte) main::c)
|
||||
Identified constant variable (byte*) VIC_MEMORY
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Identified constant variable (byte*) CHARSET
|
||||
|
@ -1,6 +1,6 @@
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Adding pointer type conversion cast (word*) main::screen in (word*) main::screen ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) main::bgcol in (byte*) main::bgcol ← (number) $d020
|
||||
Fixing pointer array-indexing *((word*) main::screen + (number) 0)
|
||||
Identified constant variable (byte) main::b1
|
||||
Culled Empty Block (label) main::@1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((word*) main::wscreen + (byte) main::i)
|
||||
Adding pointer type conversion cast (byte*) main::bscreen in (byte*) main::bscreen ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) main::wscreen + (byte) main::i)
|
||||
Identified constant variable (byte*) main::bscreen
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
Adding pointer type conversion cast (byte*) ub_screen in (byte*) ub_screen ← (number) $400
|
||||
Adding pointer type conversion cast (signed byte*) sb_screen in (signed byte*) sb_screen ← (number) $428
|
||||
Adding pointer type conversion cast (word*) uw_screen in (word*) uw_screen ← (number) $450
|
||||
Adding pointer type conversion cast (signed word*) sw_screen in (signed word*) sw_screen ← (number) $478
|
||||
Fixing pointer addition (word*~) main::$4 ← (word*~) main::$3 + (number) 1
|
||||
Fixing pointer addition (signed word*~) main::$6 ← (signed word*~) main::$5 + (number) 2
|
||||
Fixing pointer addition (word*~) main::$11 ← (word*~) main::$10 + (number) 1
|
||||
@ -6,10 +10,6 @@ Fixing pointer addition (word*~) main::$18 ← (word*~) main::$17 + (number) 1
|
||||
Fixing pointer addition (signed word*~) main::$20 ← (signed word*~) main::$19 + (number) 2
|
||||
Fixing pointer addition (word*~) main::$25 ← (word*~) main::$24 + (number) 1
|
||||
Fixing pointer addition (signed word*~) main::$27 ← (signed word*~) main::$26 + (number) 2
|
||||
Adding pointer type conversion cast (byte*) ub_screen in (byte*) ub_screen ← (number) $400
|
||||
Adding pointer type conversion cast (signed byte*) sb_screen in (signed byte*) sb_screen ← (number) $428
|
||||
Adding pointer type conversion cast (word*) uw_screen in (word*) uw_screen ← (number) $450
|
||||
Adding pointer type conversion cast (signed word*) sw_screen in (signed word*) sw_screen ← (number) $478
|
||||
Identified constant variable (byte*) ub_screen
|
||||
Identified constant variable (signed byte*) sb_screen
|
||||
Identified constant variable (word*) uw_screen
|
||||
|
50
src/test/ref/pointer-void-2.asm
Normal file
50
src/test/ref/pointer-void-2.asm
Normal file
@ -0,0 +1,50 @@
|
||||
// Test simple void pointer - void pointer function
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
.label d = 4
|
||||
.label w = 8
|
||||
.label b = $a
|
||||
lda #<$12345678
|
||||
sta d
|
||||
lda #>$12345678
|
||||
sta d+1
|
||||
lda #<$12345678>>$10
|
||||
sta d+2
|
||||
lda #>$12345678>>$10
|
||||
sta d+3
|
||||
lda #<$1234
|
||||
sta w
|
||||
lda #>$1234
|
||||
sta w+1
|
||||
lda #$12
|
||||
sta b
|
||||
ldx #0
|
||||
lda #<b
|
||||
sta print.ptr
|
||||
lda #>b
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
lda #<w
|
||||
sta print.ptr
|
||||
lda #>w
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
lda #<d
|
||||
sta print.ptr
|
||||
lda #>d
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
rts
|
||||
}
|
||||
// print(void* zeropage(2) ptr)
|
||||
print: {
|
||||
.label ptr = 2
|
||||
ldy #0
|
||||
lda (ptr),y
|
||||
sta SCREEN,x
|
||||
inx
|
||||
rts
|
||||
}
|
35
src/test/ref/pointer-void-2.cfg
Normal file
35
src/test/ref/pointer-void-2.cfg
Normal file
@ -0,0 +1,35 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] (dword) main::d#0 ← (dword) $12345678
|
||||
[5] (word) main::w#0 ← (word) $1234
|
||||
[6] (byte) main::b#0 ← (byte) $12
|
||||
[7] call print
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[8] phi()
|
||||
[9] call print
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[10] phi()
|
||||
[11] call print
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
[12] return
|
||||
to:@return
|
||||
print: scope:[print] from main main::@1 main::@2
|
||||
[13] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 )
|
||||
[13] (void*) print::ptr#3 ← phi( main/(void*)&(byte) main::b#0 main::@1/(void*)&(word) main::w#0 main::@2/(void*)&(dword) main::d#0 )
|
||||
[14] *((const byte*) SCREEN#0 + (byte) idx#12) ← *((byte*)(void*) print::ptr#3)
|
||||
[15] (byte) idx#13 ← ++ (byte) idx#12
|
||||
to:print::@return
|
||||
print::@return: scope:[print] from print
|
||||
[16] return
|
||||
to:@return
|
689
src/test/ref/pointer-void-2.log
Normal file
689
src/test/ref/pointer-void-2.log
Normal file
@ -0,0 +1,689 @@
|
||||
Setting inferred volatile on symbol affected by address-of (byte*~) main::$0 ← & (byte) main::b
|
||||
Setting inferred volatile on symbol affected by address-of (word*~) main::$2 ← & (word) main::w
|
||||
Setting inferred volatile on symbol affected by address-of (dword*~) main::$4 ← & (dword) main::d
|
||||
Adding void pointer type conversion cast (void*) main::$0 in (void~) main::$1 ← call print (byte*~) main::$0
|
||||
Adding void pointer type conversion cast (void*) main::$2 in (void~) main::$3 ← call print (word*~) main::$2
|
||||
Adding void pointer type conversion cast (void*) main::$4 in (void~) main::$5 ← call print (dword*~) main::$4
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
main: scope:[main] from @2
|
||||
(byte) idx#15 ← phi( @2/(byte) idx#16 )
|
||||
(dword) main::d#0 ← (number) $12345678
|
||||
(word) main::w#0 ← (number) $1234
|
||||
(byte) main::b#0 ← (number) $12
|
||||
(byte*~) main::$0 ← & (byte) main::b#0
|
||||
(void*) print::ptr#0 ← (void*)(byte*~) main::$0
|
||||
call print
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
(dword) main::d#2 ← phi( main/(dword) main::d#0 )
|
||||
(word) main::w#1 ← phi( main/(word) main::w#0 )
|
||||
(byte) idx#8 ← phi( main/(byte) idx#6 )
|
||||
(byte) idx#0 ← (byte) idx#8
|
||||
(word*~) main::$2 ← & (word) main::w#1
|
||||
(void*) print::ptr#1 ← (void*)(word*~) main::$2
|
||||
call print
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
(dword) main::d#1 ← phi( main::@1/(dword) main::d#2 )
|
||||
(byte) idx#9 ← phi( main::@1/(byte) idx#6 )
|
||||
(byte) idx#1 ← (byte) idx#9
|
||||
(dword*~) main::$4 ← & (dword) main::d#1
|
||||
(void*) print::ptr#2 ← (void*)(dword*~) main::$4
|
||||
call print
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
(byte) idx#10 ← phi( main::@2/(byte) idx#6 )
|
||||
(byte) idx#2 ← (byte) idx#10
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
(byte) idx#11 ← phi( main::@3/(byte) idx#2 )
|
||||
(byte) idx#3 ← (byte) idx#11
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
(byte*) SCREEN#0 ← ((byte*)) (number) $400
|
||||
(byte) idx#4 ← (number) 0
|
||||
to:@2
|
||||
print: scope:[print] from main main::@1 main::@2
|
||||
(byte) idx#12 ← phi( main/(byte) idx#15 main::@1/(byte) idx#0 main::@2/(byte) idx#1 )
|
||||
(void*) print::ptr#3 ← phi( main/(void*) print::ptr#0 main::@1/(void*) print::ptr#1 main::@2/(void*) print::ptr#2 )
|
||||
(byte*~) print::$0 ← ((byte*)) (void*) print::ptr#3
|
||||
*((byte*) SCREEN#0 + (byte) idx#12) ← *((byte*~) print::$0)
|
||||
(byte) idx#5 ← ++ (byte) idx#12
|
||||
to:print::@return
|
||||
print::@return: scope:[print] from print
|
||||
(byte) idx#13 ← phi( print/(byte) idx#5 )
|
||||
(byte) idx#6 ← (byte) idx#13
|
||||
return
|
||||
to:@return
|
||||
@2: scope:[] from @1
|
||||
(byte) idx#16 ← phi( @1/(byte) idx#4 )
|
||||
call main
|
||||
to:@3
|
||||
@3: scope:[] from @2
|
||||
(byte) idx#14 ← phi( @2/(byte) idx#3 )
|
||||
(byte) idx#7 ← (byte) idx#14
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(byte*) SCREEN#0
|
||||
(byte) idx
|
||||
(byte) idx#0
|
||||
(byte) idx#1
|
||||
(byte) idx#10
|
||||
(byte) idx#11
|
||||
(byte) idx#12
|
||||
(byte) idx#13
|
||||
(byte) idx#14
|
||||
(byte) idx#15
|
||||
(byte) idx#16
|
||||
(byte) idx#2
|
||||
(byte) idx#3
|
||||
(byte) idx#4
|
||||
(byte) idx#5
|
||||
(byte) idx#6
|
||||
(byte) idx#7
|
||||
(byte) idx#8
|
||||
(byte) idx#9
|
||||
(void()) main()
|
||||
(byte*~) main::$0
|
||||
(word*~) main::$2
|
||||
(dword*~) main::$4
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@return
|
||||
(byte) main::b
|
||||
(byte) main::b#0
|
||||
(dword) main::d
|
||||
(dword) main::d#0
|
||||
(dword) main::d#1
|
||||
(dword) main::d#2
|
||||
(word) main::w
|
||||
(word) main::w#0
|
||||
(word) main::w#1
|
||||
(void()) print((void*) print::ptr)
|
||||
(byte*~) print::$0
|
||||
(label) print::@return
|
||||
(void*) print::ptr
|
||||
(void*) print::ptr#0
|
||||
(void*) print::ptr#1
|
||||
(void*) print::ptr#2
|
||||
(void*) print::ptr#3
|
||||
|
||||
Adding number conversion cast (unumber) $12345678 in (dword) main::d#0 ← (number) $12345678
|
||||
Adding number conversion cast (unumber) $1234 in (word) main::w#0 ← (number) $1234
|
||||
Adding number conversion cast (unumber) $12 in (byte) main::b#0 ← (number) $12
|
||||
Adding number conversion cast (unumber) 0 in (byte) idx#4 ← (number) 0
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Inlining cast (dword) main::d#0 ← (unumber)(number) $12345678
|
||||
Inlining cast (word) main::w#0 ← (unumber)(number) $1234
|
||||
Inlining cast (byte) main::b#0 ← (unumber)(number) $12
|
||||
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
|
||||
Inlining cast (byte) idx#4 ← (unumber)(number) 0
|
||||
Inlining cast (byte*~) print::$0 ← (byte*)(void*) print::ptr#3
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant integer cast $12345678
|
||||
Simplifying constant integer cast $1234
|
||||
Simplifying constant integer cast $12
|
||||
Simplifying constant pointer cast (byte*) 1024
|
||||
Simplifying constant integer cast 0
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
Finalized unsigned number type (dword) $12345678
|
||||
Finalized unsigned number type (word) $1234
|
||||
Finalized unsigned number type (byte) $12
|
||||
Finalized unsigned number type (byte) 0
|
||||
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
||||
Alias (word) main::w#0 = (word) main::w#1
|
||||
Alias (dword) main::d#0 = (dword) main::d#2 (dword) main::d#1
|
||||
Alias (byte) idx#0 = (byte) idx#8
|
||||
Alias (byte) idx#1 = (byte) idx#9
|
||||
Alias (byte) idx#10 = (byte) idx#2 (byte) idx#11 (byte) idx#3
|
||||
Alias (byte) idx#13 = (byte) idx#5 (byte) idx#6
|
||||
Alias (byte) idx#16 = (byte) idx#4
|
||||
Alias (byte) idx#14 = (byte) idx#7
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Identical Phi Values (byte) idx#15 (byte) idx#16
|
||||
Identical Phi Values (byte) idx#0 (byte) idx#13
|
||||
Identical Phi Values (byte) idx#1 (byte) idx#13
|
||||
Identical Phi Values (byte) idx#10 (byte) idx#13
|
||||
Identical Phi Values (byte) idx#14 (byte) idx#10
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Constant right-side identified [4] (byte*~) main::$0 ← & (byte) main::b#0
|
||||
Constant right-side identified [9] (word*~) main::$2 ← & (word) main::w#0
|
||||
Constant right-side identified [14] (dword*~) main::$4 ← & (dword) main::d#0
|
||||
Successful SSA optimization Pass2ConstantRValueConsolidation
|
||||
Constant (const byte*) main::$0 = &main::b#0
|
||||
Constant (const word*) main::$2 = &main::w#0
|
||||
Constant (const dword*) main::$4 = &main::d#0
|
||||
Constant (const byte*) SCREEN#0 = (byte*) 1024
|
||||
Constant (const byte) idx#16 = 0
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Constant value identified (void*)main::$0 in [5] (void*) print::ptr#0 ← (void*)(const byte*) main::$0
|
||||
Constant value identified (void*)main::$2 in [10] (void*) print::ptr#1 ← (void*)(const word*) main::$2
|
||||
Constant value identified (void*)main::$4 in [15] (void*) print::ptr#2 ← (void*)(const dword*) main::$4
|
||||
Successful SSA optimization Pass2ConstantValues
|
||||
Constant (const void*) print::ptr#0 = (void*)main::$0
|
||||
Constant (const void*) print::ptr#1 = (void*)main::$2
|
||||
Constant (const void*) print::ptr#2 = (void*)main::$4
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Inlining Noop Cast [8] (byte*~) print::$0 ← (byte*)(void*) print::ptr#3 keeping print::ptr#3
|
||||
Successful SSA optimization Pass2NopCastInlining
|
||||
Inlining constant with var siblings (const void*) print::ptr#0
|
||||
Inlining constant with var siblings (const void*) print::ptr#1
|
||||
Inlining constant with var siblings (const void*) print::ptr#2
|
||||
Inlining constant with var siblings (const byte) idx#16
|
||||
Constant inlined print::ptr#2 = (void*)&(dword) main::d#0
|
||||
Constant inlined main::$2 = &(word) main::w#0
|
||||
Constant inlined main::$0 = &(byte) main::b#0
|
||||
Constant inlined main::$4 = &(dword) main::d#0
|
||||
Constant inlined print::ptr#0 = (void*)&(byte) main::b#0
|
||||
Constant inlined print::ptr#1 = (void*)&(word) main::w#0
|
||||
Constant inlined idx#16 = (byte) 0
|
||||
Successful SSA optimization Pass2ConstantInlining
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @3
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main::@3
|
||||
CALL GRAPH
|
||||
Calls in [] to main:3
|
||||
Calls in [main] to print:9 print:11 print:13
|
||||
|
||||
Created 2 initial phi equivalence classes
|
||||
Coalesced [10] idx#17 ← idx#13
|
||||
Coalesced (already) [12] idx#18 ← idx#13
|
||||
Coalesced down to 2 phi equivalence classes
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @3
|
||||
Culled Empty Block (label) main::@3
|
||||
Renumbering block @2 to @1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main::@1
|
||||
Adding NOP phi() at start of main::@2
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] (dword) main::d#0 ← (dword) $12345678
|
||||
[5] (word) main::w#0 ← (word) $1234
|
||||
[6] (byte) main::b#0 ← (byte) $12
|
||||
[7] call print
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[8] phi()
|
||||
[9] call print
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[10] phi()
|
||||
[11] call print
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
[12] return
|
||||
to:@return
|
||||
print: scope:[print] from main main::@1 main::@2
|
||||
[13] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 )
|
||||
[13] (void*) print::ptr#3 ← phi( main/(void*)&(byte) main::b#0 main::@1/(void*)&(word) main::w#0 main::@2/(void*)&(dword) main::d#0 )
|
||||
[14] *((const byte*) SCREEN#0 + (byte) idx#12) ← *((byte*)(void*) print::ptr#3)
|
||||
[15] (byte) idx#13 ← ++ (byte) idx#12
|
||||
to:print::@return
|
||||
print::@return: scope:[print] from print
|
||||
[16] return
|
||||
to:@return
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
(byte*) SCREEN
|
||||
(byte) idx
|
||||
(byte) idx#12 4.0
|
||||
(byte) idx#13 1.0
|
||||
(void()) main()
|
||||
(byte) main::b
|
||||
(byte) main::b#0 20.0
|
||||
(dword) main::d
|
||||
(dword) main::d#0 20.0
|
||||
(word) main::w
|
||||
(word) main::w#0 20.0
|
||||
(void()) print((void*) print::ptr)
|
||||
(void*) print::ptr
|
||||
(void*) print::ptr#3
|
||||
|
||||
Initial phi equivalence classes
|
||||
[ print::ptr#3 ]
|
||||
[ idx#12 idx#13 ]
|
||||
Complete equivalence classes
|
||||
[ print::ptr#3 ]
|
||||
[ idx#12 idx#13 ]
|
||||
[ main::d#0 ]
|
||||
[ main::w#0 ]
|
||||
[ main::b#0 ]
|
||||
Allocated zp ZP_WORD:2 [ print::ptr#3 ]
|
||||
Allocated zp ZP_BYTE:4 [ idx#12 idx#13 ]
|
||||
Allocated zp ZP_DWORD:5 [ main::d#0 ]
|
||||
Allocated zp ZP_WORD:9 [ main::w#0 ]
|
||||
Allocated zp ZP_BYTE:11 [ main::b#0 ]
|
||||
|
||||
INITIAL ASM
|
||||
//SEG0 File Comments
|
||||
// Test simple void pointer - void pointer function
|
||||
//SEG1 Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
//SEG2 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
.label idx = 4
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
//SEG9 main
|
||||
main: {
|
||||
.label d = 5
|
||||
.label w = 9
|
||||
.label b = $b
|
||||
//SEG10 [4] (dword) main::d#0 ← (dword) $12345678 -- vduz1=vduc1
|
||||
lda #<$12345678
|
||||
sta d
|
||||
lda #>$12345678
|
||||
sta d+1
|
||||
lda #<$12345678>>$10
|
||||
sta d+2
|
||||
lda #>$12345678>>$10
|
||||
sta d+3
|
||||
//SEG11 [5] (word) main::w#0 ← (word) $1234 -- vwuz1=vwuc1
|
||||
lda #<$1234
|
||||
sta w
|
||||
lda #>$1234
|
||||
sta w+1
|
||||
//SEG12 [6] (byte) main::b#0 ← (byte) $12 -- vbuz1=vbuc1
|
||||
lda #$12
|
||||
sta b
|
||||
//SEG13 [7] call print
|
||||
//SEG14 [13] phi from main to print [phi:main->print]
|
||||
print_from_main:
|
||||
//SEG15 [13] phi (byte) idx#12 = (byte) 0 [phi:main->print#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta idx
|
||||
//SEG16 [13] phi (void*) print::ptr#3 = (void*)&(byte) main::b#0 [phi:main->print#1] -- pvoz1=pvoc1
|
||||
lda #<b
|
||||
sta print.ptr
|
||||
lda #>b
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
//SEG17 [8] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
jmp b1
|
||||
//SEG18 main::@1
|
||||
b1:
|
||||
//SEG19 [9] call print
|
||||
//SEG20 [13] phi from main::@1 to print [phi:main::@1->print]
|
||||
print_from_b1:
|
||||
//SEG21 [13] phi (byte) idx#12 = (byte) idx#13 [phi:main::@1->print#0] -- register_copy
|
||||
//SEG22 [13] phi (void*) print::ptr#3 = (void*)&(word) main::w#0 [phi:main::@1->print#1] -- pvoz1=pvoc1
|
||||
lda #<w
|
||||
sta print.ptr
|
||||
lda #>w
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
//SEG23 [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
|
||||
b2_from_b1:
|
||||
jmp b2
|
||||
//SEG24 main::@2
|
||||
b2:
|
||||
//SEG25 [11] call print
|
||||
//SEG26 [13] phi from main::@2 to print [phi:main::@2->print]
|
||||
print_from_b2:
|
||||
//SEG27 [13] phi (byte) idx#12 = (byte) idx#13 [phi:main::@2->print#0] -- register_copy
|
||||
//SEG28 [13] phi (void*) print::ptr#3 = (void*)&(dword) main::d#0 [phi:main::@2->print#1] -- pvoz1=pvoc1
|
||||
lda #<d
|
||||
sta print.ptr
|
||||
lda #>d
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
jmp breturn
|
||||
//SEG29 main::@return
|
||||
breturn:
|
||||
//SEG30 [12] return
|
||||
rts
|
||||
}
|
||||
//SEG31 print
|
||||
// print(void* zeropage(2) ptr)
|
||||
print: {
|
||||
.label ptr = 2
|
||||
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) idx#12) ← *((byte*)(void*) print::ptr#3) -- pbuc1_derefidx_vbuz1=_deref_pbuz2
|
||||
ldx idx
|
||||
ldy #0
|
||||
lda (ptr),y
|
||||
sta SCREEN,x
|
||||
//SEG33 [15] (byte) idx#13 ← ++ (byte) idx#12 -- vbuz1=_inc_vbuz1
|
||||
inc idx
|
||||
jmp breturn
|
||||
//SEG34 print::@return
|
||||
breturn:
|
||||
//SEG35 [16] return
|
||||
rts
|
||||
}
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [4] (dword) main::d#0 ← (dword) $12345678 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [5] (word) main::w#0 ← (word) $1234 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [6] (byte) main::b#0 ← (byte) $12 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [14] *((const byte*) SCREEN#0 + (byte) idx#12) ← *((byte*)(void*) print::ptr#3) [ idx#12 ] ( main:2::print:7 [ idx#12 ] main:2::print:9 [ idx#12 ] main:2::print:11 [ idx#12 ] ) always clobbers reg byte a reg byte y
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ idx#12 idx#13 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ idx#12 idx#13 ]
|
||||
Statement [4] (dword) main::d#0 ← (dword) $12345678 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [5] (word) main::w#0 ← (word) $1234 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [6] (byte) main::b#0 ← (byte) $12 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [14] *((const byte*) SCREEN#0 + (byte) idx#12) ← *((byte*)(void*) print::ptr#3) [ idx#12 ] ( main:2::print:7 [ idx#12 ] main:2::print:9 [ idx#12 ] main:2::print:11 [ idx#12 ] ) always clobbers reg byte a reg byte y
|
||||
Potential registers zp ZP_WORD:2 [ print::ptr#3 ] : zp ZP_WORD:2 ,
|
||||
Potential registers zp ZP_BYTE:4 [ idx#12 idx#13 ] : zp ZP_BYTE:4 , reg byte x ,
|
||||
Potential registers zp ZP_DWORD:5 [ main::d#0 ] : zp ZP_DWORD:5 ,
|
||||
Potential registers zp ZP_WORD:9 [ main::w#0 ] : zp ZP_WORD:9 ,
|
||||
Potential registers zp ZP_BYTE:11 [ main::b#0 ] : zp ZP_BYTE:11 ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [main] 20: zp ZP_DWORD:5 [ main::d#0 ] 20: zp ZP_WORD:9 [ main::w#0 ] 20: zp ZP_BYTE:11 [ main::b#0 ]
|
||||
Uplift Scope [] 5: zp ZP_BYTE:4 [ idx#12 idx#13 ]
|
||||
Uplift Scope [print] 0: zp ZP_WORD:2 [ print::ptr#3 ]
|
||||
|
||||
Uplifting [main] best 144 combination zp ZP_DWORD:5 [ main::d#0 ] zp ZP_WORD:9 [ main::w#0 ] zp ZP_BYTE:11 [ main::b#0 ]
|
||||
Uplifting [] best 135 combination reg byte x [ idx#12 idx#13 ]
|
||||
Uplifting [print] best 135 combination zp ZP_WORD:2 [ print::ptr#3 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:11 [ main::b#0 ]
|
||||
Uplifting [main] best 135 combination zp ZP_BYTE:11 [ main::b#0 ]
|
||||
Allocated (was zp ZP_DWORD:5) zp ZP_DWORD:4 [ main::d#0 ]
|
||||
Allocated (was zp ZP_WORD:9) zp ZP_WORD:8 [ main::w#0 ]
|
||||
Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:10 [ main::b#0 ]
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG0 File Comments
|
||||
// Test simple void pointer - void pointer function
|
||||
//SEG1 Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
//SEG2 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
//SEG9 main
|
||||
main: {
|
||||
.label d = 4
|
||||
.label w = 8
|
||||
.label b = $a
|
||||
//SEG10 [4] (dword) main::d#0 ← (dword) $12345678 -- vduz1=vduc1
|
||||
lda #<$12345678
|
||||
sta d
|
||||
lda #>$12345678
|
||||
sta d+1
|
||||
lda #<$12345678>>$10
|
||||
sta d+2
|
||||
lda #>$12345678>>$10
|
||||
sta d+3
|
||||
//SEG11 [5] (word) main::w#0 ← (word) $1234 -- vwuz1=vwuc1
|
||||
lda #<$1234
|
||||
sta w
|
||||
lda #>$1234
|
||||
sta w+1
|
||||
//SEG12 [6] (byte) main::b#0 ← (byte) $12 -- vbuz1=vbuc1
|
||||
lda #$12
|
||||
sta b
|
||||
//SEG13 [7] call print
|
||||
//SEG14 [13] phi from main to print [phi:main->print]
|
||||
print_from_main:
|
||||
//SEG15 [13] phi (byte) idx#12 = (byte) 0 [phi:main->print#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG16 [13] phi (void*) print::ptr#3 = (void*)&(byte) main::b#0 [phi:main->print#1] -- pvoz1=pvoc1
|
||||
lda #<b
|
||||
sta print.ptr
|
||||
lda #>b
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
//SEG17 [8] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
jmp b1
|
||||
//SEG18 main::@1
|
||||
b1:
|
||||
//SEG19 [9] call print
|
||||
//SEG20 [13] phi from main::@1 to print [phi:main::@1->print]
|
||||
print_from_b1:
|
||||
//SEG21 [13] phi (byte) idx#12 = (byte) idx#13 [phi:main::@1->print#0] -- register_copy
|
||||
//SEG22 [13] phi (void*) print::ptr#3 = (void*)&(word) main::w#0 [phi:main::@1->print#1] -- pvoz1=pvoc1
|
||||
lda #<w
|
||||
sta print.ptr
|
||||
lda #>w
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
//SEG23 [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
|
||||
b2_from_b1:
|
||||
jmp b2
|
||||
//SEG24 main::@2
|
||||
b2:
|
||||
//SEG25 [11] call print
|
||||
//SEG26 [13] phi from main::@2 to print [phi:main::@2->print]
|
||||
print_from_b2:
|
||||
//SEG27 [13] phi (byte) idx#12 = (byte) idx#13 [phi:main::@2->print#0] -- register_copy
|
||||
//SEG28 [13] phi (void*) print::ptr#3 = (void*)&(dword) main::d#0 [phi:main::@2->print#1] -- pvoz1=pvoc1
|
||||
lda #<d
|
||||
sta print.ptr
|
||||
lda #>d
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
jmp breturn
|
||||
//SEG29 main::@return
|
||||
breturn:
|
||||
//SEG30 [12] return
|
||||
rts
|
||||
}
|
||||
//SEG31 print
|
||||
// print(void* zeropage(2) ptr)
|
||||
print: {
|
||||
.label ptr = 2
|
||||
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) idx#12) ← *((byte*)(void*) print::ptr#3) -- pbuc1_derefidx_vbuxx=_deref_pbuz1
|
||||
ldy #0
|
||||
lda (ptr),y
|
||||
sta SCREEN,x
|
||||
//SEG33 [15] (byte) idx#13 ← ++ (byte) idx#12 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
jmp breturn
|
||||
//SEG34 print::@return
|
||||
breturn:
|
||||
//SEG35 [16] return
|
||||
rts
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction print_from_b1:
|
||||
Removing instruction b2_from_b1:
|
||||
Removing instruction print_from_b2:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction print_from_main:
|
||||
Removing instruction b1:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
||||
(byte) idx
|
||||
(byte) idx#12 reg byte x 4.0
|
||||
(byte) idx#13 reg byte x 1.0
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@return
|
||||
(byte) main::b
|
||||
(byte) main::b#0 b zp ZP_BYTE:10 20.0
|
||||
(dword) main::d
|
||||
(dword) main::d#0 d zp ZP_DWORD:4 20.0
|
||||
(word) main::w
|
||||
(word) main::w#0 w zp ZP_WORD:8 20.0
|
||||
(void()) print((void*) print::ptr)
|
||||
(label) print::@return
|
||||
(void*) print::ptr
|
||||
(void*) print::ptr#3 ptr zp ZP_WORD:2
|
||||
|
||||
zp ZP_WORD:2 [ print::ptr#3 ]
|
||||
reg byte x [ idx#12 idx#13 ]
|
||||
zp ZP_DWORD:4 [ main::d#0 ]
|
||||
zp ZP_WORD:8 [ main::w#0 ]
|
||||
zp ZP_BYTE:10 [ main::b#0 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 111
|
||||
|
||||
//SEG0 File Comments
|
||||
// Test simple void pointer - void pointer function
|
||||
//SEG1 Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
//SEG2 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
.label d = 4
|
||||
.label w = 8
|
||||
.label b = $a
|
||||
//SEG10 [4] (dword) main::d#0 ← (dword) $12345678 -- vduz1=vduc1
|
||||
lda #<$12345678
|
||||
sta d
|
||||
lda #>$12345678
|
||||
sta d+1
|
||||
lda #<$12345678>>$10
|
||||
sta d+2
|
||||
lda #>$12345678>>$10
|
||||
sta d+3
|
||||
//SEG11 [5] (word) main::w#0 ← (word) $1234 -- vwuz1=vwuc1
|
||||
lda #<$1234
|
||||
sta w
|
||||
lda #>$1234
|
||||
sta w+1
|
||||
//SEG12 [6] (byte) main::b#0 ← (byte) $12 -- vbuz1=vbuc1
|
||||
lda #$12
|
||||
sta b
|
||||
//SEG13 [7] call print
|
||||
//SEG14 [13] phi from main to print [phi:main->print]
|
||||
//SEG15 [13] phi (byte) idx#12 = (byte) 0 [phi:main->print#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG16 [13] phi (void*) print::ptr#3 = (void*)&(byte) main::b#0 [phi:main->print#1] -- pvoz1=pvoc1
|
||||
lda #<b
|
||||
sta print.ptr
|
||||
lda #>b
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
//SEG17 [8] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG18 main::@1
|
||||
//SEG19 [9] call print
|
||||
//SEG20 [13] phi from main::@1 to print [phi:main::@1->print]
|
||||
//SEG21 [13] phi (byte) idx#12 = (byte) idx#13 [phi:main::@1->print#0] -- register_copy
|
||||
//SEG22 [13] phi (void*) print::ptr#3 = (void*)&(word) main::w#0 [phi:main::@1->print#1] -- pvoz1=pvoc1
|
||||
lda #<w
|
||||
sta print.ptr
|
||||
lda #>w
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
//SEG23 [10] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
|
||||
//SEG24 main::@2
|
||||
//SEG25 [11] call print
|
||||
//SEG26 [13] phi from main::@2 to print [phi:main::@2->print]
|
||||
//SEG27 [13] phi (byte) idx#12 = (byte) idx#13 [phi:main::@2->print#0] -- register_copy
|
||||
//SEG28 [13] phi (void*) print::ptr#3 = (void*)&(dword) main::d#0 [phi:main::@2->print#1] -- pvoz1=pvoc1
|
||||
lda #<d
|
||||
sta print.ptr
|
||||
lda #>d
|
||||
sta print.ptr+1
|
||||
jsr print
|
||||
//SEG29 main::@return
|
||||
//SEG30 [12] return
|
||||
rts
|
||||
}
|
||||
//SEG31 print
|
||||
// print(void* zeropage(2) ptr)
|
||||
print: {
|
||||
.label ptr = 2
|
||||
//SEG32 [14] *((const byte*) SCREEN#0 + (byte) idx#12) ← *((byte*)(void*) print::ptr#3) -- pbuc1_derefidx_vbuxx=_deref_pbuz1
|
||||
ldy #0
|
||||
lda (ptr),y
|
||||
sta SCREEN,x
|
||||
//SEG33 [15] (byte) idx#13 ← ++ (byte) idx#12 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG34 print::@return
|
||||
//SEG35 [16] return
|
||||
rts
|
||||
}
|
||||
|
28
src/test/ref/pointer-void-2.sym
Normal file
28
src/test/ref/pointer-void-2.sym
Normal file
@ -0,0 +1,28 @@
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
||||
(byte) idx
|
||||
(byte) idx#12 reg byte x 4.0
|
||||
(byte) idx#13 reg byte x 1.0
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@return
|
||||
(byte) main::b
|
||||
(byte) main::b#0 b zp ZP_BYTE:10 20.0
|
||||
(dword) main::d
|
||||
(dword) main::d#0 d zp ZP_DWORD:4 20.0
|
||||
(word) main::w
|
||||
(word) main::w#0 w zp ZP_WORD:8 20.0
|
||||
(void()) print((void*) print::ptr)
|
||||
(label) print::@return
|
||||
(void*) print::ptr
|
||||
(void*) print::ptr#3 ptr zp ZP_WORD:2
|
||||
|
||||
zp ZP_WORD:2 [ print::ptr#3 ]
|
||||
reg byte x [ idx#12 idx#13 ]
|
||||
zp ZP_DWORD:4 [ main::d#0 ]
|
||||
zp ZP_WORD:8 [ main::w#0 ]
|
||||
zp ZP_BYTE:10 [ main::b#0 ]
|
@ -1,6 +1,6 @@
|
||||
Fixing pointer increment (word*) main::screen ← ++ (word*) main::screen
|
||||
Fixing pointer increment (word*) main::screen ← ++ (word*) main::screen
|
||||
Adding pointer type conversion cast (word*) main::screen in (word*) main::screen ← (number) $400
|
||||
Fixing pointer increment (word*) main::screen ← ++ (word*) main::screen
|
||||
Fixing pointer increment (word*) main::screen ← ++ (word*) main::screen
|
||||
Culled Empty Block (label) mul8u::@5
|
||||
Culled Empty Block (label) mul8u::@6
|
||||
Culled Empty Block (label) mul8u::@8
|
||||
|
@ -1,7 +1,7 @@
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer array-indexing *((signed word[]) words + (byte) main::j)
|
||||
Fixing pointer array-indexing *((signed word[]) words + (byte) sub::idx)
|
||||
Fixing pointer array-indexing *((signed word[]) words + (byte) sub::idx)
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
Culled Empty Block (label) @3
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((signed word*) main::screen + (byte) main::i)
|
||||
Adding pointer type conversion cast (signed word*) main::screen in (signed word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((signed word*) main::screen + (byte) main::i)
|
||||
Identified constant variable (signed word*) main::screen
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Fixing pointer increment (signed word*) main::st1 ← ++ (signed word*) main::st1
|
||||
Fixing pointer addition (signed word*~) main::$7 ← (signed word[$78]) main::sintab1 + (word) main::wavelength
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Identified constant variable (word) main::wavelength
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) divr16u::@7
|
||||
|
@ -1,10 +1,10 @@
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_genb::sintab ← ++ (signed word*) sin16s_genb::sintab
|
||||
Fixing pointer increment (signed word*) main::st1 ← ++ (signed word*) main::st1
|
||||
Fixing pointer increment (signed word*) main::st2 ← ++ (signed word*) main::st2
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Identified constant variable (word) main::wavelength
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) divr16u::@7
|
||||
|
@ -1,7 +1,7 @@
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Identified constant variable (word) main::wavelength
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
|
@ -1,8 +1,8 @@
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Fixing pointer addition (signed word*~) main::$4 ← (signed word[$c0]) main::sintabw + (word~) main::$3
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Identified constant variable (word) main::wavelength
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) divr16u::@7
|
||||
|
@ -1,7 +1,7 @@
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
|
||||
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab
|
||||
Identified constant variable (word) main::tabsize
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
|
@ -1,12 +1,12 @@
|
||||
Setting inferred volatile on symbol affected by address-of (word*~) main::$0 ← & (word) main::w
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) main::bp in (byte*) main::bp ← (number) $1000
|
||||
Resolving sizeof() (byte~) main::$3 ← sizeof (byte) main::idx
|
||||
Resolving sizeof() (byte~) main::$5 ← sizeof (byte) main::b
|
||||
Resolving sizeof() (byte~) main::$8 ← sizeof (number~) main::$7
|
||||
Resolving sizeof() (byte~) main::$12 ← sizeof (word) main::w
|
||||
Resolving sizeof() (byte~) main::$14 ← sizeof (byte*) main::bp
|
||||
Resolving sizeof() (byte~) main::$16 ← sizeof (word*) main::wp
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) main::bp in (byte*) main::bp ← (number) $1000
|
||||
Identified constant variable (byte*) main::bp
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Resolving sizeof() (byte~) main::$0 ← sizeof (struct Point) main::p
|
||||
Resolving sizeof() (byte~) main::$2 ← sizeof (struct Circle) main::c
|
||||
Created struct value member variable (byte) main::p_x
|
||||
@ -15,7 +16,6 @@ Created struct value member variable (byte) main::c_center_y
|
||||
Converted struct value to member variables (struct Point) main::c_center
|
||||
Adding struct value member variable default initializer (byte) main::c_center_x ← (byte) 0
|
||||
Adding struct value member variable default initializer (byte) main::c_center_y ← (byte) 0
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Identified constant variable (byte) main::p_x
|
||||
Identified constant variable (byte) main::p_y
|
||||
Identified constant variable (byte) main::c_radius
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) point_x
|
||||
Created struct value member variable (byte) point_y
|
||||
Converted struct value to member variables (struct Point) point
|
||||
@ -7,7 +8,6 @@ Replacing struct member reference (struct Point) point.x with member variable re
|
||||
Replacing struct member reference (struct Point) point.y with member variable reference (byte) point_y
|
||||
Replacing struct member reference (struct Point) point.x with member variable reference (byte) point_x
|
||||
Replacing struct member reference (struct Point) point.y with member variable reference (byte) point_y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) point1_x
|
||||
Created struct value member variable (byte) point1_y
|
||||
Converted struct value to member variables (struct Point) point1
|
||||
@ -16,7 +17,6 @@ Replacing struct member reference (struct Point) point1.x with member variable r
|
||||
Replacing struct member reference (struct Point) point2.y with member variable reference (byte) point2_y
|
||||
Replacing struct member reference (struct Point) point2.x with member variable reference (byte) point2_x
|
||||
Replacing struct member reference (struct Point) point2.y with member variable reference (byte) point2_y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) point1_x
|
||||
Created struct value member variable (byte) point1_y
|
||||
Converted struct value to member variables (struct Point) point1
|
||||
@ -17,7 +18,6 @@ Replacing struct member reference (struct Point) point1.x with member variable r
|
||||
Replacing struct member reference (struct Point) point1.y with member variable reference (byte) point1_y
|
||||
Replacing struct member reference (struct Point) point2.x with member variable reference (byte) point2_x
|
||||
Replacing struct member reference (struct Point) point2.y with member variable reference (byte) point2_y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::p1_x
|
||||
Created struct value member variable (byte) main::p1_y
|
||||
Converted struct value to member variables (struct Point) main::p1
|
||||
@ -14,7 +15,6 @@ Replacing struct member reference (struct Point) main::p1.y with member variable
|
||||
Replacing struct member reference (struct Point) main::p1.x with member variable reference (byte) main::p1_x
|
||||
Replacing struct member reference (struct Point) print::p.x with member variable reference (byte) print::p_x
|
||||
Replacing struct member reference (struct Point) print::p.y with member variable reference (byte) print::p_y
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::p_x
|
||||
Created struct value member variable (byte) main::p_y
|
||||
Converted struct value to member variables (struct Point) main::p
|
||||
@ -5,7 +6,6 @@ Adding struct value list initializer (byte) main::p_x ← (byte) main::x
|
||||
Adding struct value list initializer (byte) main::p_y ← (number~) main::$0
|
||||
Replacing struct member reference (struct Point) main::p.x with member variable reference (byte) main::p_x
|
||||
Replacing struct member reference (struct Point) main::p.y with member variable reference (byte) main::p_y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (byte) main::x
|
||||
Identified constant variable (byte) main::y
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::q_x
|
||||
Created struct value member variable (byte) main::q_y
|
||||
Converted struct value to member variables (struct Point) main::q
|
||||
@ -24,7 +25,6 @@ Adding struct value member variable copy (byte) point::return_y ← (byte) point
|
||||
Converted procedure struct return value to member variables return { (byte) point::return_x, (byte) point::return_y }
|
||||
Replacing struct member reference (struct Point) main::q.x with member variable reference (byte) main::q_x
|
||||
Replacing struct member reference (struct Point) main::q.y with member variable reference (byte) main::q_y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (byte) point::p_x
|
||||
Identified constant variable (byte) point::p_y
|
||||
Culled Empty Block (label) @1
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::p_x
|
||||
Created struct value member variable (byte) main::p_y
|
||||
Converted struct value to member variables (struct Point) main::p
|
||||
@ -18,7 +19,6 @@ Adding struct value member variable copy (byte) main::c_center_x ← (byte) main
|
||||
Adding struct value member variable copy (byte) main::c_center_y ← (byte) main::p_y
|
||||
Replacing struct member reference (struct Point) main::c_center.x with member variable reference (byte) main::c_center_x
|
||||
Replacing struct member reference (struct Point) main::c_center.y with member variable reference (byte) main::c_center_y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (byte) main::p_x
|
||||
Identified constant variable (byte) main::p_y
|
||||
Identified constant variable (byte) main::c_radius
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (struct Circle) main::t_c1
|
||||
Created struct value member variable (struct Circle) main::t_c2
|
||||
Converted struct value to member variables (struct TwoCircles) main::t
|
||||
@ -39,7 +40,6 @@ Replacing struct member reference (struct Point) main::t_c1_center.x with member
|
||||
Replacing struct member reference (struct Point) main::t_c1_center.y with member variable reference (byte) main::t_c1_center_y
|
||||
Replacing struct member reference (struct Point) main::t_c2_center.x with member variable reference (byte) main::t_c2_center_x
|
||||
Replacing struct member reference (struct Point) main::t_c2_center.y with member variable reference (byte) main::t_c2_center_y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (byte) main::t_c1_radius
|
||||
Identified constant variable (byte) main::t_c2_radius
|
||||
Identified constant variable (byte) main::t_c1_center_x
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((struct Point[4]) points + (byte) main::i)
|
||||
Fixing pointer array-indexing *((struct Point[4]) points + (byte) main::i)
|
||||
Fixing pointer array-indexing *((struct Point[4]) points + (byte) main::i1)
|
||||
@ -6,7 +7,6 @@ Rewriting struct pointer member access *((struct Point[4]) points + (byte~) main
|
||||
Rewriting struct pointer member access *((struct Point[4]) points + (byte~) main::$5).y
|
||||
Rewriting struct pointer member access *((struct Point[4]) points + (byte~) main::$6).x
|
||||
Rewriting struct pointer member access *((struct Point[4]) points + (byte~) main::$7).y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@4
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (struct Point*) main::SCREEN in (struct Point*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((struct Point[$1f4]) points + (word) main::i)
|
||||
Fixing pointer array-indexing *((struct Point[$1f4]) points + (word) main::i1)
|
||||
Fixing pointer array-indexing *((struct Point*) main::SCREEN + (word) main::i1)
|
||||
@ -5,7 +6,6 @@ Adding struct value list initializer *((byte*) main::$5 + (word~) main::$3) ←
|
||||
Adding struct value list initializer *((byte*) main::$6 + (word~) main::$3) ← (byte~) main::$0
|
||||
Adding struct value member variable copy *((byte*) main::$7 + (word~) main::$4) ← *((byte*) main::$8 + (word~) main::$4)
|
||||
Adding struct value member variable copy *((byte*) main::$9 + (word~) main::$4) ← *((byte*) main::$10 + (word~) main::$4)
|
||||
Adding pointer type conversion cast (struct Point*) main::SCREEN in (struct Point*) main::SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@4
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (struct Point*) main::SCREEN in (struct Point*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((struct Point[4]) points + (byte) main::i)
|
||||
Fixing pointer array-indexing *((struct Point[4]) points + (byte) main::i1)
|
||||
Fixing pointer array-indexing *((struct Point*) main::SCREEN + (byte) main::i1)
|
||||
@ -7,7 +8,6 @@ Adding struct value list initializer *((signed byte*) main::$10 + (byte~) main::
|
||||
Adding struct value member variable copy *((signed byte*) main::$11 + (byte~) main::$7) ← *((signed byte*) main::$12 + (byte~) main::$7)
|
||||
Adding struct value member variable copy *((signed byte*) main::$13 + (byte~) main::$7) ← *((signed byte*) main::$14 + (byte~) main::$7)
|
||||
Adding struct value member variable copy *((signed byte*) main::$15 + (byte~) main::$7) ← *((signed byte*) main::$16 + (byte~) main::$7)
|
||||
Adding pointer type conversion cast (struct Point*) main::SCREEN in (struct Point*) main::SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@4
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,4 +1,5 @@
|
||||
Setting inferred volatile on symbol affected by address-of (struct Point*~) main::$0 ← & (struct Point) main::p
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::p_x
|
||||
Created struct value member variable (byte) main::p_y
|
||||
Converted struct value to member variables (struct Point) main::p
|
||||
@ -6,7 +7,6 @@ Adding struct value list initializer (byte) main::p_x ← (number) 2
|
||||
Adding struct value list initializer (byte) main::p_y ← (number) 3
|
||||
Rewriting struct pointer member access *((struct Point*) main::q).x
|
||||
Rewriting struct pointer member access *((struct Point*) main::q).y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Adding versioned struct unwinding for (struct Point) main::p#0
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,11 +1,11 @@
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Adding pointer type conversion cast (struct Point*) points in (struct Point*) points ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Identified constant variable (struct Point*) points
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,4 +1,5 @@
|
||||
Setting inferred volatile on symbol affected by address-of (struct Point*~) main::$0 ← & (struct Point) main::p
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::p_x
|
||||
Created struct value member variable (byte) main::p_y
|
||||
Converted struct value to member variables (struct Point) main::p
|
||||
@ -8,7 +9,6 @@ Rewriting struct pointer member access *((struct Point*) main::q).x
|
||||
Rewriting struct pointer member access *((struct Point*) main::q).y
|
||||
Rewriting struct pointer member access *((struct Point*) set::ptr).x
|
||||
Rewriting struct pointer member access *((struct Point*) set::ptr).y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Culled Empty Block (label) @1
|
||||
Adding versioned struct unwinding for (struct Point) main::p#0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer addition (struct Point*~) main::$0 ← (struct Point[4]) points + (byte) main::i
|
||||
Fixing pointer addition (struct Point*~) main::$7 ← (struct Point[4]) points + (byte) main::i1
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@4
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,10 +1,10 @@
|
||||
Adding pointer type conversion cast (struct Point*) points in (struct Point*) points ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer increment (struct Point*) points ← ++ (struct Point*) points
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Adding pointer type conversion cast (struct Point*) points in (struct Point*) points ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,11 +1,11 @@
|
||||
Fixing pointer increment (struct Point*) main::points ← ++ (struct Point*) main::points
|
||||
Fixing pointer increment (struct Point*) main::points ← ++ (struct Point*) main::points
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).x
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).y
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).x
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).y
|
||||
Adding pointer type conversion cast (struct Point*) POINTS in (struct Point*) POINTS ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer increment (struct Point*) main::points ← ++ (struct Point*) main::points
|
||||
Fixing pointer increment (struct Point*) main::points ← ++ (struct Point*) main::points
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).x
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).y
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).x
|
||||
Rewriting struct pointer member access *((struct Point*) main::points).y
|
||||
Identified constant variable (struct Point*) POINTS
|
||||
Culled Empty Block (label) main::@4
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
Fixing struct type size struct Entry to 3
|
||||
Adding pointer type conversion cast (struct Entry*) ENTRIES in (struct Entry*) ENTRIES ← (number) $1000
|
||||
Adding pointer type conversion cast (struct Entry*) *(main::entry1).next in *((struct Entry*) main::entry1).next ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer addition (struct Entry*~) main::$0 ← (struct Entry*) ENTRIES + (number) 1
|
||||
Fixing pointer addition (struct Entry*~) main::$1 ← (struct Entry*) ENTRIES + (number) 2
|
||||
Rewriting struct pointer member access *((struct Entry*) main::entry0).next
|
||||
@ -12,9 +15,6 @@ Rewriting struct pointer member access *((struct Entry*) main::entry).next
|
||||
Rewriting struct pointer member access *((struct Entry*) main::entry).next
|
||||
Rewriting struct pointer member access *((struct Entry*) main::entry).next
|
||||
Warning! Adding boolean cast to non-boolean condition (struct Entry*) main::entry
|
||||
Adding pointer type conversion cast (struct Entry*) ENTRIES in (struct Entry*) ENTRIES ← (number) $1000
|
||||
Adding pointer type conversion cast (struct Entry*) *(main::$11) in *((struct Entry**) main::$11) ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (struct Entry*) ENTRIES
|
||||
Culled Empty Block (label) main::@4
|
||||
Culled Empty Block (label) main::@3
|
||||
|
@ -1,10 +1,10 @@
|
||||
Adding pointer type conversion cast (struct Point*) points in (struct Point*) points ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer increment (struct Point*) points ← ++ (struct Point*) points
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Rewriting struct pointer member access *((struct Point*) points).x
|
||||
Rewriting struct pointer member access *((struct Point*) points).y
|
||||
Adding pointer type conversion cast (struct Point*) points in (struct Point*) points ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (number) 0)
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (number) 0)
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (number) 1)
|
||||
@ -14,7 +15,6 @@ Rewriting struct pointer member access *((struct Point[2]) points + (number~) ma
|
||||
Rewriting struct pointer member access *((struct Point[2]) points + (number~) main::$5).y
|
||||
Rewriting struct pointer member access *((struct Point[2]) points + (number~) main::$6).x
|
||||
Rewriting struct pointer member access *((struct Point[2]) points + (number~) main::$7).y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (byte) main::i)
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (byte) main::i)
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (byte) main::i1)
|
||||
@ -6,7 +7,6 @@ Rewriting struct pointer member access *((struct Point[2]) points + (byte~) main
|
||||
Rewriting struct pointer member access *((struct Point[2]) points + (byte~) main::$5).y
|
||||
Rewriting struct pointer member access *((struct Point[2]) points + (byte~) main::$6).x
|
||||
Rewriting struct pointer member access *((struct Point[2]) points + (byte~) main::$7).y
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@4
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (struct Point*) main::SCREEN in (struct Point*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (byte) main::i)
|
||||
Fixing pointer array-indexing *((struct Point[2]) points + (byte) main::i1)
|
||||
Fixing pointer array-indexing *((struct Point*) main::SCREEN + (byte) main::i1)
|
||||
@ -5,7 +6,6 @@ Adding struct value list initializer *((byte*) main::$4 + (byte~) main::$2) ←
|
||||
Adding struct value list initializer *((byte*) main::$5 + (byte~) main::$2) ← (byte) main::i
|
||||
Adding struct value member variable copy *((byte*) main::$6 + (byte~) main::$3) ← *((byte*) main::$7 + (byte~) main::$3)
|
||||
Adding struct value member variable copy *((byte*) main::$8 + (byte~) main::$3) ← *((byte*) main::$9 + (byte~) main::$3)
|
||||
Adding pointer type conversion cast (struct Point*) main::SCREEN in (struct Point*) main::SCREEN ← (number) $400
|
||||
Culled Empty Block (label) main::@4
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,6 +1,6 @@
|
||||
Adding pointer type conversion cast (byte*) main::screen in (byte*) main::screen ← (number) $400
|
||||
Warning! Adding boolean cast to non-boolean condition (number~) main::$0
|
||||
Warning! Adding boolean cast to non-boolean condition (number~) main::$6
|
||||
Adding pointer type conversion cast (byte*) main::screen in (byte*) main::screen ← (number) $400
|
||||
Culled Empty Block (label) main::@8
|
||||
Culled Empty Block (label) main::@9
|
||||
Culled Empty Block (label) main::@10
|
||||
|
@ -1,5 +1,3 @@
|
||||
Fixing pointer array-indexing *((signed word[]) swords + (byte) main::i)
|
||||
Fixing pointer array-indexing *((signed word[]) swords + (byte) main::j)
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -45,6 +43,8 @@ Adding pointer type conversion cast (byte*) CIA2_INTERRUPT in (byte*) CIA2_INTER
|
||||
Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_IRQ ← (number) $314
|
||||
Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer array-indexing *((signed word[]) swords + (byte) main::i)
|
||||
Fixing pointer array-indexing *((signed word[]) swords + (byte) main::j)
|
||||
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
|
@ -1,5 +1,3 @@
|
||||
Fixing pointer array-indexing *((word[]) words + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[]) words + (byte) main::j)
|
||||
Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0
|
||||
Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1
|
||||
Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000
|
||||
@ -45,6 +43,8 @@ Adding pointer type conversion cast (byte*) CIA2_INTERRUPT in (byte*) CIA2_INTER
|
||||
Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_IRQ ← (number) $314
|
||||
Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word[]) words + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[]) words + (byte) main::j)
|
||||
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Fixing pointer array-indexing *((word[]) test_16u::dividends + (byte) test_16u::i)
|
||||
Fixing pointer array-indexing *((word[]) test_16u::divisors + (byte) test_16u::i)
|
||||
Fixing pointer array-indexing *((signed word[]) test_16s::dividends + (byte) test_16s::i)
|
||||
Fixing pointer array-indexing *((signed word[]) test_16s::divisors + (byte) test_16s::i)
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo }
|
||||
Identified constant variable (byte) test_8u::rem
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((word*) main::screen + (byte) main::b)
|
||||
Adding pointer type conversion cast (word*) main::screen in (word*) main::screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word*) main::screen + (byte) main::b)
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,3 +1,4 @@
|
||||
Adding pointer type conversion cast (struct PointDef*) main::SCREEN in (struct PointDef*) main::SCREEN ← (number) $400
|
||||
Created struct value member variable (byte) main::p_x
|
||||
Created struct value member variable (byte) main::p_y
|
||||
Converted struct value to member variables (struct PointDef) main::p
|
||||
@ -5,7 +6,6 @@ Adding struct value list initializer (byte) main::p_x ← (number) 4
|
||||
Adding struct value list initializer (byte) main::p_y ← (number) 7
|
||||
Adding struct value member variable copy *((byte*) main::$0) ← (byte) main::p_x
|
||||
Adding struct value member variable copy *((byte*) main::$1) ← (byte) main::p_y
|
||||
Adding pointer type conversion cast (struct PointDef*) main::SCREEN in (struct PointDef*) main::SCREEN ← (number) $400
|
||||
Identified constant variable (struct PointDef*) main::SCREEN
|
||||
Identified constant variable (byte) main::p_x
|
||||
Identified constant variable (byte) main::p_y
|
||||
|
@ -1,6 +1,6 @@
|
||||
Fixing pointer array-indexing *((word[MAX_OBJECTS]) OBJ_WORLD_X + (byte) move_enemy::obj_slot)
|
||||
Fixing pointer array-indexing *((word[MAX_OBJECTS]) OBJ_WORLD_X + (byte) move_enemy::obj_slot)
|
||||
Adding pointer type conversion cast (byte*) print_screen in (byte*) print_screen ← (number) $400
|
||||
Fixing pointer array-indexing *((word[MAX_OBJECTS]) OBJ_WORLD_X + (byte) move_enemy::obj_slot)
|
||||
Fixing pointer array-indexing *((word[MAX_OBJECTS]) OBJ_WORLD_X + (byte) move_enemy::obj_slot)
|
||||
Culled Empty Block (label) @1
|
||||
Culled Empty Block (label) @2
|
||||
Culled Empty Block (label) @3
|
||||
|
@ -1,7 +1,7 @@
|
||||
Fixing pointer array-indexing *((word[3]) main::words + (number) 1)
|
||||
Fixing pointer array-indexing *((word[3]) main::words + (number) 2)
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400+(number) 6*(number) $28
|
||||
Adding pointer type conversion cast (word[3]) main::words in (word[3]) main::words ← (number) $400
|
||||
Fixing pointer array-indexing *((word[3]) main::words + (number) 1)
|
||||
Fixing pointer array-indexing *((word[3]) main::words + (number) 2)
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer array-indexing *((word[]) main::words + (byte) main::i)
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((word[]) main::words + (byte) main::i)
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,7 +1,7 @@
|
||||
Adding pointer type conversion cast (word*) main::SCREEN in (word*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((word[$100]) words + (word~) main::$1)
|
||||
Fixing pointer array-indexing *((word[$100]) words + (word~) main::$0)
|
||||
Fixing pointer array-indexing *((word*) main::SCREEN + (number) 0)
|
||||
Adding pointer type conversion cast (word*) main::SCREEN in (word*) main::SCREEN ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,12 +1,12 @@
|
||||
Fixing pointer array-indexing *((word[]) main::words + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 0)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 0)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 1)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 1)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 2)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 2)
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer array-indexing *((word[]) main::words + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (byte) main::i)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 0)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 0)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 1)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 1)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 2)
|
||||
Fixing pointer array-indexing *((word[]) main::words + (number) 2)
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,8 +1,8 @@
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400+(number) $28*(number) 6
|
||||
Adding pointer type conversion cast (word*) main::wp in (word*) main::wp ← (number) $400
|
||||
Fixing pointer increment (word*) main::wp ← ++ (word*) main::wp
|
||||
Fixing pointer increment (word*) main::wp ← ++ (word*) main::wp
|
||||
Fixing pointer decrement (word*) main::wp ← -- (word*) main::wp
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400+(number) $28*(number) 6
|
||||
Adding pointer type conversion cast (word*) main::wp in (word*) main::wp ← (number) $400
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer increment (word*) main::wp ← ++ (word*) main::wp
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer increment (word*) main::wp ← ++ (word*) main::wp
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,7 +1,7 @@
|
||||
Fixing pointer addition (word*~) main::$0 ← (word*) main::words + (number) 1
|
||||
Fixing pointer addition (word*~) main::$3 ← (word*) main::words + (number) 2
|
||||
Adding pointer type conversion cast (word*) main::words in (word*) main::words ← (number) $400
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400+(number) 6*(number) $28
|
||||
Fixing pointer addition (word*~) main::$0 ← (word*) main::words + (number) 1
|
||||
Fixing pointer addition (word*~) main::$3 ← (word*) main::words + (number) 2
|
||||
Identified constant variable (word*) main::words
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
@ -1,5 +1,5 @@
|
||||
Fixing pointer addition (word*~) main::$0 ← (word[]) main::words + (byte) main::i
|
||||
Adding pointer type conversion cast (byte*) main::SCREEN in (byte*) main::SCREEN ← (number) $400
|
||||
Fixing pointer addition (word*~) main::$0 ← (word[]) main::words + (byte) main::i
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
|
Loading…
Reference in New Issue
Block a user