mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-22 18:37:29 +00:00
Added spline sample. Added many fragments. Fixed error in line where from&to are the same. Fixed cast to dword/sdword. Fixed unwinding of members that are themselves structs. Closes #222
This commit is contained in:
parent
dd8ccaf186
commit
eba674bd44
src
main
fragment
vbuaa=_lo_pwsc1_derefidx_vbuxx.asmvbuaa=_lo_pwsc1_derefidx_vbuyy.asmvdsz1=vdsz1_rol_5.asmvdsz1=vdsz1_rol_6.asmvdsz1=vdsz2_rol_3.asmvdsz1=vdsz2_rol_5.asmvdsz1=vdsz2_rol_6.asmvduz1=vduz2_band_vduc1.asmvwsz1=vwsz1_rol_3.asmvwsz1=vwsz1_rol_6.asmvwsz1=vwsz1_ror_5.asmvwsz1=vwsz1_ror_6.asmvwsz1=vwsz2_plus_vbsc1.asmvwsz1=vwsz2_rol_3.asmvwsz1=vwsz2_rol_6.asmvwsz1=vwsz2_ror_5.asmvwsz1=vwsz2_ror_6.asmvwuz1=pwuc1_derefidx_vbuxx_band_vwuc2.asmvwuz1=pwuc1_derefidx_vbuxx_minus_vwuc2.asmvwuz1=pwuc1_derefidx_vbuyy_band_vwuc2.asmvwuz1=pwuc1_derefidx_vbuyy_minus_vwuc2.asm
java/dk/camelot64/kickc
kc/stdlib
test
java/dk/camelot64/kickc/test
kc
ref
1
src/main/fragment/vbuaa=_lo_pwsc1_derefidx_vbuxx.asm
Normal file
1
src/main/fragment/vbuaa=_lo_pwsc1_derefidx_vbuxx.asm
Normal file
@ -0,0 +1 @@
|
||||
lda {c1},x
|
1
src/main/fragment/vbuaa=_lo_pwsc1_derefidx_vbuyy.asm
Normal file
1
src/main/fragment/vbuaa=_lo_pwsc1_derefidx_vbuyy.asm
Normal file
@ -0,0 +1 @@
|
||||
lda {c1},y
|
20
src/main/fragment/vdsz1=vdsz1_rol_5.asm
Normal file
20
src/main/fragment/vdsz1=vdsz1_rol_5.asm
Normal file
@ -0,0 +1,20 @@
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
24
src/main/fragment/vdsz1=vdsz1_rol_6.asm
Normal file
24
src/main/fragment/vdsz1=vdsz1_rol_6.asm
Normal file
@ -0,0 +1,24 @@
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
20
src/main/fragment/vdsz1=vdsz2_rol_3.asm
Normal file
20
src/main/fragment/vdsz1=vdsz2_rol_3.asm
Normal file
@ -0,0 +1,20 @@
|
||||
lda {z2}
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
sta {z1}+1
|
||||
lda {z2}+2
|
||||
sta {z1}+2
|
||||
lda {z2}+3
|
||||
sta {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
28
src/main/fragment/vdsz1=vdsz2_rol_5.asm
Normal file
28
src/main/fragment/vdsz1=vdsz2_rol_5.asm
Normal file
@ -0,0 +1,28 @@
|
||||
lda {z2}
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
sta {z1}+1
|
||||
lda {z2}+2
|
||||
sta {z1}+2
|
||||
lda {z2}+3
|
||||
sta {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
32
src/main/fragment/vdsz1=vdsz2_rol_6.asm
Normal file
32
src/main/fragment/vdsz1=vdsz2_rol_6.asm
Normal file
@ -0,0 +1,32 @@
|
||||
lda {z2}
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
sta {z1}+1
|
||||
lda {z2}+2
|
||||
sta {z1}+2
|
||||
lda {z2}+3
|
||||
sta {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+2
|
||||
rol {z1}+3
|
12
src/main/fragment/vduz1=vduz2_band_vduc1.asm
Normal file
12
src/main/fragment/vduz1=vduz2_band_vduc1.asm
Normal file
@ -0,0 +1,12 @@
|
||||
lda {z2}
|
||||
and #<{c1}
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
and #>{c1}
|
||||
sta {z1}+1
|
||||
lda {z2}+2
|
||||
and #<{c1}>>$10
|
||||
sta {z1}+2
|
||||
lda {z2}+3
|
||||
and #>{c1}>>$10
|
||||
sta {z1}+3
|
6
src/main/fragment/vwsz1=vwsz1_rol_3.asm
Normal file
6
src/main/fragment/vwsz1=vwsz1_rol_3.asm
Normal file
@ -0,0 +1,6 @@
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
12
src/main/fragment/vwsz1=vwsz1_rol_6.asm
Normal file
12
src/main/fragment/vwsz1=vwsz1_rol_6.asm
Normal file
@ -0,0 +1,12 @@
|
||||
lda {z1}+1
|
||||
sta $ff
|
||||
lda {z1}
|
||||
sta {z1}+1
|
||||
lda #0
|
||||
sta {z1}
|
||||
lsr $ff
|
||||
ror {z1}+1
|
||||
ror {z1}
|
||||
lsr $ff
|
||||
ror {z1}+1
|
||||
ror {z1}
|
@ -1,21 +1,19 @@
|
||||
lda {z1}
|
||||
sta $ff
|
||||
lda {z1}+1
|
||||
cmp #$80
|
||||
ror {z1}+1
|
||||
ror {z1}
|
||||
lda {z1}+1
|
||||
cmp #$80
|
||||
ror {z1}+1
|
||||
ror {z1}
|
||||
lda {z1}+1
|
||||
cmp #$80
|
||||
ror {z1}+1
|
||||
ror {z1}
|
||||
lda {z1}+1
|
||||
cmp #$80
|
||||
ror {z1}+1
|
||||
ror {z1}
|
||||
lda {z1}+1
|
||||
cmp #$80
|
||||
ror {z1}+1
|
||||
ror {z1}
|
||||
|
||||
sta {z1}
|
||||
lda #0
|
||||
bit {z1}+1
|
||||
bpl !+
|
||||
lda #$ff
|
||||
!:
|
||||
sta {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
16
src/main/fragment/vwsz1=vwsz1_ror_6.asm
Normal file
16
src/main/fragment/vwsz1=vwsz1_ror_6.asm
Normal file
@ -0,0 +1,16 @@
|
||||
lda {z1}
|
||||
sta $ff
|
||||
lda {z1}+1
|
||||
sta {z1}
|
||||
lda #0
|
||||
bit {z1}+1
|
||||
bpl !+
|
||||
lda #$ff
|
||||
!:
|
||||
sta {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
7
src/main/fragment/vwsz1=vwsz2_plus_vbsc1.asm
Normal file
7
src/main/fragment/vwsz1=vwsz2_plus_vbsc1.asm
Normal file
@ -0,0 +1,7 @@
|
||||
lda {z2}
|
||||
clc
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
adc #>{c1}
|
||||
sta {z1}+1
|
10
src/main/fragment/vwsz1=vwsz2_rol_3.asm
Normal file
10
src/main/fragment/vwsz1=vwsz2_rol_3.asm
Normal file
@ -0,0 +1,10 @@
|
||||
lda {z2}
|
||||
asl
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
rol
|
||||
sta {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
35
src/main/fragment/vwsz1=vwsz2_rol_6.asm
Normal file
35
src/main/fragment/vwsz1=vwsz2_rol_6.asm
Normal file
@ -0,0 +1,35 @@
|
||||
// ROL twice instead of RORing 6 times
|
||||
lda {z1}
|
||||
sta $ff
|
||||
lda {z1}+1
|
||||
sta {z1}
|
||||
lda #0
|
||||
bit {z1}+1
|
||||
bpl !+
|
||||
lda #$ff
|
||||
!:
|
||||
sta {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1 // 64
|
||||
|
||||
|
||||
lda {z2}
|
||||
asl
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
rol
|
||||
sta {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1
|
||||
asl {z1}
|
||||
rol {z1}+1 // 66
|
@ -1,15 +1,13 @@
|
||||
// ROL thrice instead of RORing 5 times
|
||||
lda {z2} // {z2} low byte to tmp $ff
|
||||
lda {z2}
|
||||
sta $ff
|
||||
lda {z2}+1 // {z2} high byte to {z1} low byte
|
||||
lda {z2}+1
|
||||
sta {z1}
|
||||
lda #0
|
||||
bit {z2}+1
|
||||
bpl !+ // {z2} high byte positive?
|
||||
bpl !+
|
||||
lda #$ff
|
||||
!:
|
||||
sta {z1}+1 // sign extended {z2} into {z1} high byte
|
||||
// ROL thrice
|
||||
sta {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
||||
@ -18,4 +16,4 @@ rol {z1}
|
||||
rol {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
||||
rol {z1}+1
|
16
src/main/fragment/vwsz1=vwsz2_ror_6.asm
Normal file
16
src/main/fragment/vwsz1=vwsz2_ror_6.asm
Normal file
@ -0,0 +1,16 @@
|
||||
lda {z2}
|
||||
sta $ff
|
||||
lda {z2}+1
|
||||
sta {z1}
|
||||
lda #0
|
||||
bit {z2}+1
|
||||
bpl !+
|
||||
lda #$ff
|
||||
!:
|
||||
sta {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
||||
rol $ff
|
||||
rol {z1}
|
||||
rol {z1}+1
|
@ -0,0 +1,6 @@
|
||||
lda {c1},x
|
||||
and #<{c2}
|
||||
sta {z1}
|
||||
lda {c1}+1,x
|
||||
and #>{c2}
|
||||
sta {z1}+1
|
@ -1,7 +1,7 @@
|
||||
sec
|
||||
lda {c1},x
|
||||
sbc {c2}
|
||||
sbc #<{c2}
|
||||
sta {z1}
|
||||
lda {c1}+1,x
|
||||
sbc {c2}+1
|
||||
sbc #>{c2}
|
||||
sta {z1}+1
|
@ -0,0 +1,6 @@
|
||||
lda {c1},y
|
||||
and #<{c2}
|
||||
sta {z1}
|
||||
lda {c1}+1,y
|
||||
and #>{c2}
|
||||
sta {z1}+1
|
@ -1,7 +1,7 @@
|
||||
sec
|
||||
lda {c1},y
|
||||
sbc {c2}
|
||||
sbc #<{c2}
|
||||
sta {z1}
|
||||
lda {c1}+1,y
|
||||
sbc {c2}+1
|
||||
sbc #>{c2}
|
||||
sta {z1}+1
|
@ -286,6 +286,8 @@ public class AsmFragmentInstanceSpecFactory {
|
||||
val = new ConstantBinary(new ConstantInteger(0xffL, SymbolType.BYTE), Operators.BOOL_AND, val);
|
||||
} else if(toType.getSizeBytes() == 2) {
|
||||
val = new ConstantBinary(new ConstantInteger(0xffffL, SymbolType.WORD), Operators.BOOL_AND, val);
|
||||
} else if(toType.getSizeBytes() == 4) {
|
||||
val = new ConstantBinary(new ConstantInteger(0xffffffffL, SymbolType.DWORD), Operators.BOOL_AND, val);
|
||||
} else {
|
||||
throw new InternalError("Not implemented " + toType);
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
/** Convert all struct values that are not used as pointers (address-of used or declared volatile) into variables representing each member */
|
||||
public class Pass1UnwindStructValues extends Pass1Base {
|
||||
|
||||
|
||||
public Pass1UnwindStructValues(Program program) {
|
||||
super(program);
|
||||
}
|
||||
@ -271,6 +272,10 @@ public class Pass1UnwindStructValues extends Pass1Base {
|
||||
boolean modified = false;
|
||||
|
||||
StructUnwinding.StructMemberUnwinding memberUnwinding = getStructMemberUnwinding(assignment.getlValue(), structType, structUnwinding, assignment, stmtIt, currentBlock);
|
||||
if(memberUnwinding==POSTPONE_UNWINDING) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(memberUnwinding == null) {
|
||||
throw new CompileError("Cannot unwind struct assignment " + assignment.toString(getProgram(), false), assignment);
|
||||
}
|
||||
@ -324,7 +329,9 @@ public class Pass1UnwindStructValues extends Pass1Base {
|
||||
if(sourceType.equals(structType)) {
|
||||
// Copying a struct - unwind to assigning each member!
|
||||
StructUnwinding.StructMemberUnwinding sourceMemberUnwinding = getStructMemberUnwinding((LValue) assignment.getrValue2(), structType, structUnwinding, assignment, stmtIt, currentBlock);
|
||||
if(sourceMemberUnwinding != null) {
|
||||
if(sourceMemberUnwinding==POSTPONE_UNWINDING)
|
||||
modified = true;
|
||||
if(sourceMemberUnwinding != null && sourceMemberUnwinding!=POSTPONE_UNWINDING) {
|
||||
List<RValue> membersUnwound = new ArrayList<>();
|
||||
stmtIt.previous();
|
||||
for(String memberName : memberUnwinding.getMemberNames()) {
|
||||
@ -355,6 +362,8 @@ public class Pass1UnwindStructValues extends Pass1Base {
|
||||
private StructUnwinding.StructMemberUnwinding getStructMemberUnwinding(LValue lValue, SymbolTypeStruct lValueType, StructUnwinding structUnwinding, Statement currentStmt, ListIterator<Statement> stmtIt, ControlFlowBlock currentBlock) {
|
||||
if(lValue instanceof VariableRef) {
|
||||
return structUnwinding.getVariableUnwinding((VariableRef) lValue);
|
||||
} else if(lValue instanceof StructMemberRef && ((StructMemberRef) lValue).getStruct() instanceof VariableRef) {
|
||||
return POSTPONE_UNWINDING;
|
||||
} else if(lValue instanceof PointerDereferenceSimple) {
|
||||
return new StructMemberUnwindingPointerDerefSimple((PointerDereferenceSimple) lValue, lValueType.getStructDefinition(getScope()), stmtIt, currentBlock, currentStmt);
|
||||
} else if(lValue instanceof PointerDereferenceIndexed) {
|
||||
@ -364,6 +373,18 @@ public class Pass1UnwindStructValues extends Pass1Base {
|
||||
}
|
||||
}
|
||||
|
||||
/** Singleton signalling that unwinding should be postponed. */
|
||||
public static final StructUnwinding.StructMemberUnwinding POSTPONE_UNWINDING = new StructUnwinding.StructMemberUnwinding() {
|
||||
@Override
|
||||
public List<String> getMemberNames() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LValue getMemberUnwinding(String memberName) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
/** Unwinding for a simple pointer deref to a struct. */
|
||||
private class StructMemberUnwindingPointerDerefSimple implements StructUnwinding.StructMemberUnwinding {
|
||||
|
@ -55,6 +55,10 @@ void bitmap_line(word x1, word y1, word x2, word y2) {
|
||||
word y = y1;
|
||||
word dx = abs_u16(x2-x1);
|
||||
word dy = abs_u16(y2-y1);
|
||||
if(dx==0 && dy==0) {
|
||||
bitmap_plot(x,(byte)y);
|
||||
return;
|
||||
}
|
||||
word sx = sgn_u16(x2-x1);
|
||||
word sy = sgn_u16(y2-y1);
|
||||
if(dx > dy) {
|
||||
|
@ -44,7 +44,7 @@ public class TestPrograms {
|
||||
|
||||
@Test
|
||||
public void testSplines() throws IOException, URISyntaxException {
|
||||
compileAndCompare("complex/splines/splines");
|
||||
compileAndCompare("complex/splines/simple-splines");
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -410,6 +410,16 @@ public class TestPrograms {
|
||||
assertError("struct-err-0", "Unknown struct type");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStruct9() throws IOException, URISyntaxException {
|
||||
compileAndCompare("struct-9");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStruct8() throws IOException, URISyntaxException {
|
||||
compileAndCompare("struct-8");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStruct7() throws IOException, URISyntaxException {
|
||||
compileAndCompare("struct-7");
|
||||
|
91
src/test/kc/complex/splines/simple-splines.kc
Normal file
91
src/test/kc/complex/splines/simple-splines.kc
Normal file
@ -0,0 +1,91 @@
|
||||
// Show a few simple splines using the splines library
|
||||
|
||||
import "splines"
|
||||
import "bitmap2"
|
||||
import "time"
|
||||
import "print"
|
||||
import "c64"
|
||||
|
||||
const char* PRINT_SCREEN = 0x0400;
|
||||
const char* BITMAP_SCREEN = 0x5c00;
|
||||
const char* BITMAP_GRAPHICS = 0x6000;
|
||||
|
||||
enum SegmentType { MOVE_TO, SPLINE_TO, LINE_TO};
|
||||
|
||||
struct Segment {
|
||||
enum SegmentType type;
|
||||
struct SplineVector16 to;
|
||||
struct SplineVector16 via;
|
||||
};
|
||||
|
||||
// True type letter a
|
||||
struct Segment[21] letter_c;
|
||||
|
||||
void main() {
|
||||
letter_c[0] = { MOVE_TO, {108,146}, {0,0} };
|
||||
letter_c[1] = { SPLINE_TO, {89,182}, {103,169} };
|
||||
letter_c[2] = { SPLINE_TO, {59,195}, {75,195} };
|
||||
letter_c[3] = { SPLINE_TO, {23,178}, {38,195} };
|
||||
letter_c[4] = { SPLINE_TO, {9,132}, {9,161} };
|
||||
letter_c[5] = { SPLINE_TO, {25,87}, {9,104} };
|
||||
letter_c[6] = { SPLINE_TO, {65,69}, {42,69} };
|
||||
letter_c[7] = { SPLINE_TO, {93,79}, {82,69} };
|
||||
letter_c[8] = { SPLINE_TO, {105,98}, {105,88} };
|
||||
letter_c[9] = { SPLINE_TO, {102,106}, {105,103} };
|
||||
letter_c[10] = { SPLINE_TO, {93,109}, {98,109} };
|
||||
letter_c[11] = { SPLINE_TO, {81,104}, {85,109} };
|
||||
letter_c[12] = { SPLINE_TO, {78,93}, {79,101} };
|
||||
letter_c[13] = { SPLINE_TO, {73,82}, {78,86} };
|
||||
letter_c[14] = { SPLINE_TO, {61,78}, {69,78} };
|
||||
letter_c[15] = { SPLINE_TO, {40,88}, {48,78} };
|
||||
letter_c[16] = { SPLINE_TO, {29,121}, {29,100} };
|
||||
letter_c[17] = { SPLINE_TO, {40,158}, {29,142} };
|
||||
letter_c[18] = { SPLINE_TO, {68,174}, {50,174} };
|
||||
letter_c[19] = { SPLINE_TO, {91,166}, {80,174} };
|
||||
letter_c[20] = { SPLINE_TO, {104,144}, {98,160} };
|
||||
letter_c[21] = { LINE_TO, {108,146}, {0,0} };
|
||||
|
||||
bitmap_init(BITMAP_GRAPHICS, BITMAP_SCREEN);
|
||||
bitmap_clear(BLACK, WHITE);
|
||||
vicSelectGfxBank(BITMAP_SCREEN);
|
||||
*D018 = toD018(BITMAP_SCREEN, BITMAP_GRAPHICS);
|
||||
*D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3;
|
||||
|
||||
struct SplineVector16 current = {0,0};
|
||||
for( byte i: 0..sizeof(letter_c)/sizeof(struct Segment)) {
|
||||
//for( byte i: 0..7) {
|
||||
struct Segment segment = letter_c[i];
|
||||
if(segment.type==MOVE_TO) {
|
||||
current = segment.to;
|
||||
} else if(segment.type==SPLINE_TO) {
|
||||
struct SplineVector16 to = segment.to;
|
||||
struct SplineVector16 via = segment.via;
|
||||
spline_8segB(current, via, to);
|
||||
bitmap_plot_spline_8seg();
|
||||
current = to;
|
||||
} else {
|
||||
struct SplineVector16 to = segment.to;
|
||||
bitmap_line((unsigned int)current.x, (unsigned int)current.y, (unsigned int)to.x, (unsigned int)to.y);
|
||||
current = to;
|
||||
}
|
||||
}
|
||||
|
||||
while(true) { (*(PRINT_SCREEN+999))++; }
|
||||
}
|
||||
|
||||
// Plot the spline in the SPLINE_8SEG array
|
||||
void bitmap_plot_spline_8seg() {
|
||||
struct SplineVector16 current = SPLINE_8SEG[0];
|
||||
for(char n:1..8) {
|
||||
struct SplineVector16 to = SPLINE_8SEG[n];
|
||||
bitmap_line((unsigned int)current.x, (unsigned int)current.y, (unsigned int)to.x, (unsigned int)to.y);
|
||||
//bitmap_plot((unsigned int)current.x, (unsigned char)current.y);
|
||||
current = to;
|
||||
}
|
||||
}
|
||||
|
||||
void bitmap_plot_spline_16seg() {
|
||||
for( char n:0..16) {
|
||||
bitmap_plot((unsigned int)SPLINE_16SEG[n].x, <SPLINE_16SEG[n].y);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
// Quadratic Spline Library for the C64
|
||||
// Quadratic Spline Library
|
||||
// Implements an iterative algorithm using only addition for calculating quadratic splines
|
||||
//
|
||||
// A quadratic spline is a curve defined by 3 points: P0, P1 and P2.
|
||||
@ -25,16 +25,10 @@
|
||||
// plot(P)
|
||||
// P = P + I
|
||||
// I = I + J
|
||||
// When N=16 then Dt[0.16] = $0.1000 Dt^2[0.16] = $0.0100
|
||||
// When N=8 then Dt[0.16] = $0.2000 Dt^2[0.16] = $0.0400
|
||||
|
||||
// NOTE: When N=16 then Dt[0.16] = $0.1000 Dt^2[0.16] = $0.0100
|
||||
// NOTE: When N=8 then Dt[0.16] = $0.2000 Dt^2[0.16] = $0.0400
|
||||
|
||||
import "time"
|
||||
import "print"
|
||||
import "bitmap2"
|
||||
import "c64"
|
||||
|
||||
// Vector that is part of a spline
|
||||
// Vector with 16-coordinates that is part of a spline
|
||||
struct SplineVector16 {
|
||||
// x-position s[16.0]
|
||||
signed int x;
|
||||
@ -42,7 +36,7 @@ struct SplineVector16 {
|
||||
signed int y;
|
||||
};
|
||||
|
||||
// Vector that is part of a spline
|
||||
// Vector with 32-bit coordinates that is part of a spline
|
||||
struct SplineVector32 {
|
||||
// x-position s[16.16]
|
||||
signed long x;
|
||||
@ -50,83 +44,93 @@ struct SplineVector32 {
|
||||
signed long y;
|
||||
};
|
||||
|
||||
const char* SCREEN = 0x0400;
|
||||
const char* BITMAP_SCREEN = 0x5c00;
|
||||
const char* BITMAP_GRAPHICS = 0x6000;
|
||||
|
||||
void main() {
|
||||
|
||||
bitmap_init(BITMAP_GRAPHICS, BITMAP_SCREEN);
|
||||
bitmap_clear(BLACK, WHITE);
|
||||
vicSelectGfxBank(BITMAP_SCREEN);
|
||||
*D018 = toD018(BITMAP_SCREEN, BITMAP_GRAPHICS);
|
||||
*D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3;
|
||||
|
||||
struct SplineVector16 p0 = { 50, 50 };
|
||||
struct SplineVector16 p1a = { 100, 50 };
|
||||
struct SplineVector16 p1b = { 50, 100};
|
||||
struct SplineVector16 p2 = { 100, 100 };
|
||||
struct SplineVector16 p3a = { 150, 100 };
|
||||
struct SplineVector16 p3b = { 100, 150 };
|
||||
struct SplineVector16 p4 = { 150, 150 };
|
||||
|
||||
clock_start();
|
||||
|
||||
splinePlot(p0, p1a, p2);
|
||||
splinePlot(p2, p3a, p4);
|
||||
splinePlot(p2, p1b, p0);
|
||||
splinePlot(p4, p3b, p2);
|
||||
|
||||
clock_t cyclecount = clock()-CLOCKS_PER_INIT;
|
||||
|
||||
print_dword_at(cyclecount, SCREEN);
|
||||
|
||||
//vicSelectGfxBank(SCREEN);
|
||||
//*D018 = toD018(SCREEN, 0x1000);
|
||||
//*D011 = VIC_DEN|VIC_RSEL|3;
|
||||
|
||||
}
|
||||
|
||||
void splinePlot(struct SplineVector16 p0, struct SplineVector16 p1, struct SplineVector16 p2) {
|
||||
|
||||
// Array filled with spline segment points by splinePlot_16()
|
||||
struct SplineVector16[17] SPLINE_16SEG;
|
||||
|
||||
// Generate a 16-segment quadratic spline using 32-bit fixed point 1/$10000-format math 16 decimal bits).
|
||||
// This function can handle all signed int values in the points.
|
||||
// The resulting spline segment points are returned in SPLINE_16SEG[]
|
||||
// A quadratic spline is a curve defined by 3 points: P0, P1 and P2.
|
||||
// The curve connects P0 to P2 through a smooth curve that moves towards P1, but does usually not touch it.
|
||||
void spline_16seg(struct SplineVector16 p0, struct SplineVector16 p1, struct SplineVector16 p2) {
|
||||
// A = P2 - 2*P1 + P0
|
||||
struct SplineVector16 a = { p2.x - p1.x*2 + p0.x, p2.y - p1.y*2 + p0.y};
|
||||
// B = 2*P1 - 2*P0
|
||||
struct SplineVector16 b = { p1.x*2 - p0.x*2, p1.y*2 - p0.y*2 };
|
||||
|
||||
// I = A*Dt*Dt + B*Dt
|
||||
struct SplineVector16 b = { (p1.x - p0.x)*2, (p1.y - p0.y)*2 };
|
||||
// I = A*Dt*Dt + B*Dt - Fixed point s[16.16]
|
||||
// Dt = 1/16 and Dt*Dt=1/256 - we can multiply using only bitshifts
|
||||
struct SplineVector32 i = { (signed long)a.x*0x100 + (signed long)b.x*0x100*0x10, (signed long)a.y*0x100 + (signed long)b.y*0x100*0x10 };
|
||||
// J = 2*A*Dt*Dt
|
||||
struct SplineVector32 j = { (signed long)a.x*0x100*2, (signed long)a.y*0x100*2 };
|
||||
// J = 2*A*Dt*Dt - Fixed point s[16.16]
|
||||
// Dt = 1/16 and Dt*Dt=1/256 - we can multiply using only bitshifts
|
||||
struct SplineVector32 j = { (signed long)a.x*0x100*2, (signed long)a.y*0x100*2 };
|
||||
// P = P0 - Fixed point s[16.16]
|
||||
struct SplineVector32 p = { (signed long)p0.x*0x10000, (signed long)p0.y*0x10000 };
|
||||
|
||||
for( char n: 0..16) {
|
||||
bitmap_plot( > p.x, < > p.y);
|
||||
// p = p + i;
|
||||
for( char n: 0..15) {
|
||||
SPLINE_16SEG[n] = { (signed word)>(p.x+0x8000), (signed word)>(p.y+0x8000) };
|
||||
// P = P + I;
|
||||
p = { p.x+i.x, p.y+i.y };
|
||||
// i = i + j;
|
||||
// I = I + J;
|
||||
i = { i.x+j.x, i.y+j.y };
|
||||
}
|
||||
|
||||
SPLINE_16SEG[16] = { (signed word)>(p.x+0x8000), (signed word)>(p.y+0x8000) };
|
||||
}
|
||||
|
||||
// Array filled with spline segment points by splinePlot_8()
|
||||
struct SplineVector16[9] SPLINE_8SEG;
|
||||
|
||||
|
||||
// Print a spline vector
|
||||
void print_spline16(struct SplineVector16 p) {
|
||||
print_char('(');
|
||||
print_sword(p.x);
|
||||
print_char(',');
|
||||
print_sword(p.y);
|
||||
print_char(')');
|
||||
// Generate a 8-segment quadratic spline using 32-bit fixed point 1/$10000-format math 16 decimal bits).
|
||||
// The resulting spline segment points are returned in SPLINE_8SEG[]
|
||||
// This function can handle all signed int values in the points.
|
||||
// A quadratic spline is a curve defined by 3 points: P0, P1 and P2.
|
||||
// The curve connects P0 to P2 through a smooth curve that moves towards P1, but does usually not touch it.
|
||||
void spline_8seg(struct SplineVector16 p0, struct SplineVector16 p1, struct SplineVector16 p2) {
|
||||
// A = P2 - 2*P1 + P0
|
||||
struct SplineVector16 a = { p2.x - p1.x*2 + p0.x, p2.y - p1.y*2 + p0.y};
|
||||
// B = 2*P1 - 2*P0
|
||||
struct SplineVector16 b = { (p1.x - p0.x)*2, (p1.y - p0.y)*2 };
|
||||
// I = A*Dt*Dt + B*Dt - Fixed point s[16.16]
|
||||
// Dt = 1/8 and Dt*Dt=1/64 - we can multiply using only bitshifts
|
||||
struct SplineVector32 i = { (signed long)a.x*0x100*0x4 + (signed long)b.x*0x100*0x20, (signed long)a.y*0x100*0x4 + (signed long)b.y*0x100*0x20 };
|
||||
// J = 2*A*Dt*Dt - Fixed point s[16.16]
|
||||
// Dt = 1/8 and Dt*Dt=1/64 - we can multiply using only bitshifts
|
||||
struct SplineVector32 j = { (signed long)a.x*0x100*0x8, (signed long)a.y*0x100*0x8 };
|
||||
// P = P0 - Fixed point s[16.16]
|
||||
struct SplineVector32 p = { (signed long)p0.x*0x10000, (signed long)p0.y*0x10000 };
|
||||
for( char n: 0..7) {
|
||||
SPLINE_8SEG[n] = { (signed word)>(p.x+0x8000), (signed word)>(p.y+0x8000) };
|
||||
// P = P + I;
|
||||
p = { p.x+i.x, p.y+i.y };
|
||||
// I = I + J;
|
||||
i = { i.x+j.x, i.y+j.y };
|
||||
}
|
||||
SPLINE_8SEG[8] = { (signed word)>(p.x+0x8000), (signed word)>(p.y+0x8000) };
|
||||
}
|
||||
|
||||
// Print a spline vector
|
||||
void print_spline32(struct SplineVector32 p) {
|
||||
print_char('(');
|
||||
print_sdword(p.x);
|
||||
print_char(',');
|
||||
print_sdword(p.y);
|
||||
print_char(')');
|
||||
// Generate a 8-segment quadratic spline using 16-bit fixed point 1/64-format math (6 decimal bits).
|
||||
// The resulting spline segment points are returned in SPLINE_8SEG[]
|
||||
// Point values must be within [-200 ; 1ff] for the calculation to not overflow.
|
||||
// A quadratic spline is a curve defined by 3 points: P0, P1 and P2.
|
||||
// The curve connects P0 to P2 through a smooth curve that moves towards P1, but does usually not touch it.
|
||||
void spline_8segB(struct SplineVector16 p0, struct SplineVector16 p1, struct SplineVector16 p2) {
|
||||
// A = P2 - 2*P1 + P0
|
||||
struct SplineVector16 a = { p2.x - p1.x*2 + p0.x, p2.y - p1.y*2 + p0.y};
|
||||
// B = 2*P1 - 2*P0
|
||||
struct SplineVector16 b = { (p1.x - p0.x)*2, (p1.y - p0.y)*2 };
|
||||
// I = A*Dt*Dt + B*Dt - I is in fixed point 1/64-format (6 decimal bits) [-200 ; 1ff]
|
||||
// Dt = 1/8 and Dt*Dt=1/64 - we can multiply using only bitshifts. Dt*Dt is exactly==1 in the fixed point format.
|
||||
struct SplineVector16 i = { a.x + b.x*8, a.y + b.y*8};
|
||||
// J = 2*A*Dt*Dt - J is in fixed point 1/64-format (6 decimal bits) [-200 ; 1ff]
|
||||
// Dt = 1/8 and Dt*Dt=1/64 - we can multiply using only bitshifts. Dt*Dt is exactly==1 in the fixed point format.
|
||||
struct SplineVector16 j = { a.x*2, a.y*2 };
|
||||
// P = P0 - P is in fixed point 1/64-format (6 decimal bits) [-200 ; 1ff]
|
||||
struct SplineVector16 p = { p0.x*0x40, p0.y*0x40 };
|
||||
for( char n: 0..7) {
|
||||
// Get the rounded result
|
||||
SPLINE_8SEG[n] = { (p.x+0x20)/0x40, (p.y+0x20)/0x40 };
|
||||
// P = P + I;
|
||||
p = { p.x+i.x, p.y+i.y };
|
||||
// I = I + J;
|
||||
i = { i.x+j.x, i.y+j.y };
|
||||
}
|
||||
SPLINE_8SEG[8] = { (p.x+0x20)/0x40, (p.y+0x20)/0x40 };
|
||||
}
|
||||
|
21
src/test/kc/struct-8.kc
Normal file
21
src/test/kc/struct-8.kc
Normal file
@ -0,0 +1,21 @@
|
||||
// Minimal struct - nested struct where a sub-struct is assigned out
|
||||
|
||||
struct Point {
|
||||
byte x;
|
||||
byte y;
|
||||
};
|
||||
|
||||
struct Circle {
|
||||
struct Point center;
|
||||
byte radius;
|
||||
};
|
||||
|
||||
void main() {
|
||||
struct Point p = { 10, 10 };
|
||||
struct Circle c = { p, 5 };
|
||||
struct Point point = c.center;
|
||||
const byte* SCREEN = 0x0400;
|
||||
SCREEN[0] = point.x;
|
||||
SCREEN[1] = point.y;
|
||||
SCREEN[1] = c.radius;
|
||||
}
|
22
src/test/kc/struct-9.kc
Normal file
22
src/test/kc/struct-9.kc
Normal file
@ -0,0 +1,22 @@
|
||||
// Minimal struct - nesting structs
|
||||
|
||||
struct Point {
|
||||
byte x;
|
||||
byte y;
|
||||
};
|
||||
|
||||
struct Circle {
|
||||
struct Point center;
|
||||
byte radius;
|
||||
};
|
||||
|
||||
void main() {
|
||||
struct Point p = { 10, 10 };
|
||||
struct Circle c;
|
||||
c.center = p;
|
||||
c.radius = 12;
|
||||
const byte* SCREEN = 0x0400;
|
||||
SCREEN[0] = c.center.x;
|
||||
SCREEN[1] = c.center.y;
|
||||
SCREEN[2] = c.radius;
|
||||
}
|
@ -165,19 +165,12 @@ main: {
|
||||
cmp #$80
|
||||
ror _17+1
|
||||
ror _17
|
||||
lda #$64
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda y
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$64
|
||||
sta y
|
||||
lda y+1
|
||||
adc $ff
|
||||
adc #>$64
|
||||
sta y+1
|
||||
lda y
|
||||
tax
|
||||
|
@ -4602,19 +4602,12 @@ main: {
|
||||
ror _17+1
|
||||
ror _17
|
||||
// [37] (signed word) main::y#0 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz2
|
||||
lda #$64
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda _17
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$64
|
||||
sta y
|
||||
lda _17+1
|
||||
adc $ff
|
||||
adc #>$64
|
||||
sta y+1
|
||||
// [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word) main::y#0 -- vbuz1=_byte_vwuz2
|
||||
lda y
|
||||
@ -6598,34 +6591,34 @@ Uplift Scope [bitmap_clear]
|
||||
Uplift Scope [init_irq]
|
||||
Uplift Scope [irq]
|
||||
|
||||
Uplifting [mul16u] best 27259 combination zp ZP_DWORD:23 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:27 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:21 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:17 [ mul16u::b#0 ] zp ZP_WORD:19 [ mul16u::b#1 ] zp ZP_DWORD:121 [ mul16u::return#2 ] zp ZP_DWORD:196 [ mul16u::return#3 ]
|
||||
Uplifting [main] best 27259 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] zp ZP_WORD:71 [ main::$32 ] zp ZP_WORD:73 [ main::$34 ] zp ZP_DWORD:81 [ main::xpos#0 ] zp ZP_WORD:87 [ main::$11 ] zp ZP_WORD:91 [ main::$33 ] zp ZP_WORD:93 [ main::$35 ] zp ZP_DWORD:101 [ main::ypos#0 ] zp ZP_WORD:107 [ main::$17 ] zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:75 [ main::cos_x#0 ] zp ZP_WORD:85 [ main::$10 ] zp ZP_WORD:95 [ main::sin_y#0 ] zp ZP_WORD:105 [ main::$16 ] zp ZP_WORD:109 [ main::y#0 ] zp ZP_WORD:4 [ main::r#10 main::r#1 ] zp ZP_WORD:89 [ main::x#0 ]
|
||||
Uplifting [divr16u] best 27049 combination zp ZP_WORD:63 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:67 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:65 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:210 [ divr16u::return#2 ] zp ZP_WORD:214 [ divr16u::return#3 ]
|
||||
Uplifting [mul16s] best 27049 combination zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] zp ZP_DWORD:77 [ mul16s::return#3 ] zp ZP_DWORD:97 [ mul16s::return#4 ] zp ZP_DWORD:154 [ mul16s::return#2 ] zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:133 [ mul16s::return#0 ] zp ZP_WORD:125 [ mul16s::$9 ] zp ZP_WORD:127 [ mul16s::$16 ] zp ZP_WORD:129 [ mul16s::$13 ] zp ZP_WORD:131 [ mul16s::$17 ]
|
||||
Uplifting [bitmap_init] best 26539 combination zp ZP_WORD:41 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:142 [ bitmap_init::$5 ] zp ZP_BYTE:143 [ bitmap_init::$6 ] zp ZP_BYTE:140 [ bitmap_init::$7 ]
|
||||
Uplifting [mul16u] best 27094 combination zp ZP_DWORD:23 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:27 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:21 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:17 [ mul16u::b#0 ] zp ZP_WORD:19 [ mul16u::b#1 ] zp ZP_DWORD:121 [ mul16u::return#2 ] zp ZP_DWORD:196 [ mul16u::return#3 ]
|
||||
Uplifting [main] best 27094 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] zp ZP_WORD:71 [ main::$32 ] zp ZP_WORD:73 [ main::$34 ] zp ZP_DWORD:81 [ main::xpos#0 ] zp ZP_WORD:87 [ main::$11 ] zp ZP_WORD:91 [ main::$33 ] zp ZP_WORD:93 [ main::$35 ] zp ZP_DWORD:101 [ main::ypos#0 ] zp ZP_WORD:107 [ main::$17 ] zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:75 [ main::cos_x#0 ] zp ZP_WORD:85 [ main::$10 ] zp ZP_WORD:95 [ main::sin_y#0 ] zp ZP_WORD:105 [ main::$16 ] zp ZP_WORD:109 [ main::y#0 ] zp ZP_WORD:4 [ main::r#10 main::r#1 ] zp ZP_WORD:89 [ main::x#0 ]
|
||||
Uplifting [divr16u] best 26884 combination zp ZP_WORD:63 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:67 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:65 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:210 [ divr16u::return#2 ] zp ZP_WORD:214 [ divr16u::return#3 ]
|
||||
Uplifting [mul16s] best 26884 combination zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] zp ZP_DWORD:77 [ mul16s::return#3 ] zp ZP_DWORD:97 [ mul16s::return#4 ] zp ZP_DWORD:154 [ mul16s::return#2 ] zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:133 [ mul16s::return#0 ] zp ZP_WORD:125 [ mul16s::$9 ] zp ZP_WORD:127 [ mul16s::$16 ] zp ZP_WORD:129 [ mul16s::$13 ] zp ZP_WORD:131 [ mul16s::$17 ]
|
||||
Uplifting [bitmap_init] best 26374 combination zp ZP_WORD:41 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:142 [ bitmap_init::$5 ] zp ZP_BYTE:143 [ bitmap_init::$6 ] zp ZP_BYTE:140 [ bitmap_init::$7 ]
|
||||
Limited combination testing to 100 combinations of 15360 possible.
|
||||
Uplifting [sin16s] best 26539 combination zp ZP_DWORD:52 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:152 [ sin16s::return#0 ] zp ZP_WORD:56 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:164 [ sin16s::$4 ] zp ZP_WORD:172 [ sin16s::x2#0 ] zp ZP_WORD:180 [ sin16s::x3_6#0 ] zp ZP_WORD:186 [ sin16s::x4#0 ] zp ZP_WORD:190 [ sin16s::x5#0 ] zp ZP_WORD:192 [ sin16s::x5_128#0 ] zp ZP_WORD:176 [ sin16s::x3#0 ] zp ZP_WORD:194 [ sin16s::usinx#1 ] zp ZP_WORD:168 [ sin16s::x1#0 ] zp ZP_WORD:182 [ sin16s::usinx#0 ] zp ZP_BYTE:51 [ sin16s::isUpper#2 ]
|
||||
Uplifting [mulu16_sel] best 26523 combination zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:60 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:170 [ mulu16_sel::return#0 ] zp ZP_WORD:174 [ mulu16_sel::return#1 ] zp ZP_WORD:178 [ mulu16_sel::return#2 ] zp ZP_WORD:184 [ mulu16_sel::return#10 ] zp ZP_WORD:188 [ mulu16_sel::return#11 ] zp ZP_DWORD:200 [ mulu16_sel::$0 ] zp ZP_DWORD:204 [ mulu16_sel::$1 ] zp ZP_WORD:208 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ]
|
||||
Uplifting [sin16s_gen2] best 26523 combination zp ZP_DWORD:158 [ sin16s_gen2::$5 ] zp ZP_WORD:49 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:162 [ sin16s_gen2::$8 ] zp ZP_DWORD:43 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:47 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:148 [ sin16s_gen2::step#0 ]
|
||||
Uplifting [] best 26523 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:224 [ rem16u#1 ]
|
||||
Uplifting [memset] best 26507 combination zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:138 [ memset::end#0 ] zp ZP_WORD:31 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:33 [ memset::str#3 ]
|
||||
Uplifting [bitmap_plot] best 26490 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:116 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:112 [ bitmap_plot::x#0 ] zp ZP_WORD:118 [ bitmap_plot::plotter#1 ] zp ZP_WORD:114 [ bitmap_plot::plotter#0 ]
|
||||
Uplifting [div32u16u] best 26490 combination zp ZP_DWORD:144 [ div32u16u::return#2 ] zp ZP_WORD:216 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:218 [ div32u16u::return#0 ] zp ZP_WORD:212 [ div32u16u::quotient_hi#0 ]
|
||||
Uplifting [bitmap_clear] best 26490 combination
|
||||
Uplifting [init_irq] best 26490 combination
|
||||
Uplifting [irq] best 26490 combination
|
||||
Uplifting [sin16s] best 26374 combination zp ZP_DWORD:52 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:152 [ sin16s::return#0 ] zp ZP_WORD:56 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:164 [ sin16s::$4 ] zp ZP_WORD:172 [ sin16s::x2#0 ] zp ZP_WORD:180 [ sin16s::x3_6#0 ] zp ZP_WORD:186 [ sin16s::x4#0 ] zp ZP_WORD:190 [ sin16s::x5#0 ] zp ZP_WORD:192 [ sin16s::x5_128#0 ] zp ZP_WORD:176 [ sin16s::x3#0 ] zp ZP_WORD:194 [ sin16s::usinx#1 ] zp ZP_WORD:168 [ sin16s::x1#0 ] zp ZP_WORD:182 [ sin16s::usinx#0 ] zp ZP_BYTE:51 [ sin16s::isUpper#2 ]
|
||||
Uplifting [mulu16_sel] best 26358 combination zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:60 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:170 [ mulu16_sel::return#0 ] zp ZP_WORD:174 [ mulu16_sel::return#1 ] zp ZP_WORD:178 [ mulu16_sel::return#2 ] zp ZP_WORD:184 [ mulu16_sel::return#10 ] zp ZP_WORD:188 [ mulu16_sel::return#11 ] zp ZP_DWORD:200 [ mulu16_sel::$0 ] zp ZP_DWORD:204 [ mulu16_sel::$1 ] zp ZP_WORD:208 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ]
|
||||
Uplifting [sin16s_gen2] best 26358 combination zp ZP_DWORD:158 [ sin16s_gen2::$5 ] zp ZP_WORD:49 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:162 [ sin16s_gen2::$8 ] zp ZP_DWORD:43 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:47 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:148 [ sin16s_gen2::step#0 ]
|
||||
Uplifting [] best 26358 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:224 [ rem16u#1 ]
|
||||
Uplifting [memset] best 26342 combination zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:138 [ memset::end#0 ] zp ZP_WORD:31 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:33 [ memset::str#3 ]
|
||||
Uplifting [bitmap_plot] best 26325 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:116 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:112 [ bitmap_plot::x#0 ] zp ZP_WORD:118 [ bitmap_plot::plotter#1 ] zp ZP_WORD:114 [ bitmap_plot::plotter#0 ]
|
||||
Uplifting [div32u16u] best 26325 combination zp ZP_DWORD:144 [ div32u16u::return#2 ] zp ZP_WORD:216 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:218 [ div32u16u::return#0 ] zp ZP_WORD:212 [ div32u16u::quotient_hi#0 ]
|
||||
Uplifting [bitmap_clear] best 26325 combination
|
||||
Uplifting [init_irq] best 26325 combination
|
||||
Uplifting [irq] best 26325 combination
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ]
|
||||
Uplifting [] best 26490 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ]
|
||||
Uplifting [] best 26325 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ]
|
||||
Uplifting [main] best 26490 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ]
|
||||
Uplifting [main] best 26325 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:142 [ bitmap_init::$5 ]
|
||||
Uplifting [bitmap_init] best 26430 combination reg byte a [ bitmap_init::$5 ]
|
||||
Uplifting [bitmap_init] best 26265 combination reg byte a [ bitmap_init::$5 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:143 [ bitmap_init::$6 ]
|
||||
Uplifting [bitmap_init] best 26370 combination reg byte a [ bitmap_init::$6 ]
|
||||
Uplifting [bitmap_init] best 26205 combination reg byte a [ bitmap_init::$6 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:140 [ bitmap_init::$7 ]
|
||||
Uplifting [bitmap_init] best 26370 combination zp ZP_BYTE:140 [ bitmap_init::$7 ]
|
||||
Uplifting [bitmap_init] best 26205 combination zp ZP_BYTE:140 [ bitmap_init::$7 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:51 [ sin16s::isUpper#2 ]
|
||||
Uplifting [sin16s] best 26370 combination zp ZP_BYTE:51 [ sin16s::isUpper#2 ]
|
||||
Uplifting [sin16s] best 26205 combination zp ZP_BYTE:51 [ sin16s::isUpper#2 ]
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 ] ] with [ zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] - score: 2
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:194 [ sin16s::usinx#1 ] ] - score: 2
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:176 [ sin16s::x3#0 ] ] - score: 2
|
||||
@ -6989,19 +6982,12 @@ main: {
|
||||
ror _17+1
|
||||
ror _17
|
||||
// [37] (signed word) main::y#0 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1
|
||||
lda #$64
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda y
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$64
|
||||
sta y
|
||||
lda y+1
|
||||
adc $ff
|
||||
adc #>$64
|
||||
sta y+1
|
||||
// [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word) main::y#0 -- vbuxx=_byte_vwuz1
|
||||
lda y
|
||||
@ -9083,7 +9069,7 @@ reg byte a [ divr16u::$2 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 20601
|
||||
Score: 20436
|
||||
|
||||
// File Comments
|
||||
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
|
||||
@ -9340,19 +9326,12 @@ main: {
|
||||
ror _17
|
||||
// 100 + ((signed word)>ypos)>>2
|
||||
// [37] (signed word) main::y#0 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1
|
||||
lda #$64
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda y
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$64
|
||||
sta y
|
||||
lda y+1
|
||||
adc $ff
|
||||
adc #>$64
|
||||
sta y+1
|
||||
// bitmap_plot(x, (byte)y)
|
||||
// [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word) main::y#0 -- vbuxx=_byte_vwuz1
|
||||
|
@ -108,6 +108,18 @@ bitmap_line: {
|
||||
sbc y1+1
|
||||
sta abs_u16.w+1
|
||||
jsr abs_u16
|
||||
lda dx
|
||||
bne b1
|
||||
lda dx+1
|
||||
bne b1
|
||||
lda dy
|
||||
bne !+
|
||||
lda dy+1
|
||||
bne !b4+
|
||||
jmp b4
|
||||
!b4:
|
||||
!:
|
||||
b1:
|
||||
lda x2
|
||||
sec
|
||||
sbc x1
|
||||
@ -130,11 +142,11 @@ bitmap_line: {
|
||||
jsr sgn_u16
|
||||
lda dy+1
|
||||
cmp dx+1
|
||||
bcc b1
|
||||
bcc b2
|
||||
bne !+
|
||||
lda dy
|
||||
cmp dx
|
||||
bcc b1
|
||||
bcc b2
|
||||
!:
|
||||
lda dx+1
|
||||
lsr
|
||||
@ -142,7 +154,7 @@ bitmap_line: {
|
||||
lda dx
|
||||
ror
|
||||
sta e
|
||||
b4:
|
||||
b6:
|
||||
lda y
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
@ -164,9 +176,9 @@ bitmap_line: {
|
||||
bne !+
|
||||
lda e
|
||||
cmp dy
|
||||
beq b5
|
||||
beq b7
|
||||
!:
|
||||
bcc b5
|
||||
bcc b7
|
||||
lda x
|
||||
clc
|
||||
adc sx
|
||||
@ -181,26 +193,26 @@ bitmap_line: {
|
||||
lda e+1
|
||||
sbc dy+1
|
||||
sta e+1
|
||||
b5:
|
||||
b7:
|
||||
lda y+1
|
||||
cmp y2+1
|
||||
bne b4
|
||||
bne b6
|
||||
lda y
|
||||
cmp y2
|
||||
bne b4
|
||||
b2:
|
||||
bne b6
|
||||
b3:
|
||||
lda y
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
rts
|
||||
b1:
|
||||
b2:
|
||||
lda dy+1
|
||||
lsr
|
||||
sta e1+1
|
||||
lda dy
|
||||
ror
|
||||
sta e1
|
||||
b7:
|
||||
b9:
|
||||
lda y
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
@ -222,9 +234,9 @@ bitmap_line: {
|
||||
bne !+
|
||||
lda e1
|
||||
cmp dx
|
||||
beq b8
|
||||
beq b10
|
||||
!:
|
||||
bcc b8
|
||||
bcc b10
|
||||
lda y
|
||||
clc
|
||||
adc sy
|
||||
@ -239,14 +251,19 @@ bitmap_line: {
|
||||
lda e1+1
|
||||
sbc dx+1
|
||||
sta e1+1
|
||||
b8:
|
||||
b10:
|
||||
lda x+1
|
||||
cmp x2+1
|
||||
bne b7
|
||||
bne b9
|
||||
lda x
|
||||
cmp x2
|
||||
bne b7
|
||||
jmp b2
|
||||
bne b9
|
||||
jmp b3
|
||||
b4:
|
||||
lda y1
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
rts
|
||||
}
|
||||
// Plot a single dot in the bitmap
|
||||
// bitmap_plot(word zeropage(8) x, byte register(X) y)
|
||||
|
@ -47,194 +47,205 @@ bitmap_line: scope:[bitmap_line] from main::@1
|
||||
[23] (word) abs_u16::w#0 ← (word) bitmap_line::x2#0 - (word) bitmap_line::x1#0
|
||||
[24] call abs_u16
|
||||
[25] (word) abs_u16::return#0 ← (word) abs_u16::return#4
|
||||
to:bitmap_line::@10
|
||||
bitmap_line::@10: scope:[bitmap_line] from bitmap_line
|
||||
to:bitmap_line::@12
|
||||
bitmap_line::@12: scope:[bitmap_line] from bitmap_line
|
||||
[26] (word) bitmap_line::dx#0 ← (word) abs_u16::return#0
|
||||
[27] (word) abs_u16::w#1 ← (word) bitmap_line::y2#0 - (word) bitmap_line::y1#0
|
||||
[28] call abs_u16
|
||||
[29] (word) abs_u16::return#1 ← (word) abs_u16::return#4
|
||||
to:bitmap_line::@11
|
||||
bitmap_line::@11: scope:[bitmap_line] from bitmap_line::@10
|
||||
[30] (word) bitmap_line::dy#0 ← (word) abs_u16::return#1
|
||||
[31] (word) sgn_u16::w#0 ← (word) bitmap_line::x2#0 - (word) bitmap_line::x1#0
|
||||
[32] call sgn_u16
|
||||
[33] (word) sgn_u16::return#0 ← (word) sgn_u16::return#4
|
||||
to:bitmap_line::@12
|
||||
bitmap_line::@12: scope:[bitmap_line] from bitmap_line::@11
|
||||
[34] (word) bitmap_line::sx#0 ← (word) sgn_u16::return#0
|
||||
[35] (word) sgn_u16::w#1 ← (word) bitmap_line::y2#0 - (word) bitmap_line::y1#0
|
||||
[36] call sgn_u16
|
||||
[37] (word) sgn_u16::return#1 ← (word) sgn_u16::return#4
|
||||
to:bitmap_line::@13
|
||||
bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@12
|
||||
[38] (word) bitmap_line::sy#0 ← (word) sgn_u16::return#1
|
||||
[39] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@1
|
||||
to:bitmap_line::@3
|
||||
bitmap_line::@3: scope:[bitmap_line] from bitmap_line::@13
|
||||
[40] (word) bitmap_line::e#0 ← (word) bitmap_line::dx#0 >> (byte) 1
|
||||
to:bitmap_line::@4
|
||||
bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@3 bitmap_line::@5
|
||||
[41] (word) bitmap_line::e#3 ← phi( bitmap_line::@3/(word) bitmap_line::e#0 bitmap_line::@5/(word) bitmap_line::e#6 )
|
||||
[41] (word) bitmap_line::x#11 ← phi( bitmap_line::@3/(word) bitmap_line::x1#0 bitmap_line::@5/(word) bitmap_line::x#10 )
|
||||
[41] (word) bitmap_line::y#3 ← phi( bitmap_line::@3/(word) bitmap_line::y1#0 bitmap_line::@5/(word) bitmap_line::y#1 )
|
||||
[42] (byte) bitmap_plot::y#0 ← (byte)(word) bitmap_line::y#3
|
||||
[43] (word) bitmap_plot::x#0 ← (word) bitmap_line::x#11
|
||||
[44] call bitmap_plot
|
||||
[30] (word) bitmap_line::dy#0 ← (word) abs_u16::return#1
|
||||
[31] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1
|
||||
to:bitmap_line::@18
|
||||
bitmap_line::@18: scope:[bitmap_line] from bitmap_line::@13
|
||||
[32] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4
|
||||
to:bitmap_line::@1
|
||||
bitmap_line::@1: scope:[bitmap_line] from bitmap_line::@13 bitmap_line::@18
|
||||
[33] (word) sgn_u16::w#0 ← (word) bitmap_line::x2#0 - (word) bitmap_line::x1#0
|
||||
[34] call sgn_u16
|
||||
[35] (word) sgn_u16::return#0 ← (word) sgn_u16::return#4
|
||||
to:bitmap_line::@14
|
||||
bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@4
|
||||
[45] (word) bitmap_line::y#1 ← (word) bitmap_line::y#3 + (word) bitmap_line::sy#0
|
||||
[46] (word) bitmap_line::e#1 ← (word) bitmap_line::e#3 + (word) bitmap_line::dx#0
|
||||
[47] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@5
|
||||
to:bitmap_line::@6
|
||||
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@14
|
||||
[48] (word) bitmap_line::x#1 ← (word) bitmap_line::x#11 + (word) bitmap_line::sx#0
|
||||
[49] (word) bitmap_line::e#2 ← (word) bitmap_line::e#1 - (word) bitmap_line::dy#0
|
||||
to:bitmap_line::@5
|
||||
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@14 bitmap_line::@6
|
||||
[50] (word) bitmap_line::e#6 ← phi( bitmap_line::@14/(word) bitmap_line::e#1 bitmap_line::@6/(word) bitmap_line::e#2 )
|
||||
[50] (word) bitmap_line::x#10 ← phi( bitmap_line::@14/(word) bitmap_line::x#11 bitmap_line::@6/(word) bitmap_line::x#1 )
|
||||
[51] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@4
|
||||
to:bitmap_line::@2
|
||||
bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@8
|
||||
[52] (word) bitmap_line::x#5 ← phi( bitmap_line::@8/(word) bitmap_line::x#13 bitmap_line::@5/(word) bitmap_line::x#10 )
|
||||
[52] (word) bitmap_line::y#6 ← phi( bitmap_line::@8/(word) bitmap_line::y#11 bitmap_line::@5/(word) bitmap_line::y#1 )
|
||||
[53] (byte) bitmap_plot::y#1 ← (byte)(word) bitmap_line::y#6
|
||||
[54] (word) bitmap_plot::x#1 ← (word) bitmap_line::x#5
|
||||
[55] call bitmap_plot
|
||||
to:bitmap_line::@return
|
||||
bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@2
|
||||
[56] return
|
||||
to:@return
|
||||
bitmap_line::@1: scope:[bitmap_line] from bitmap_line::@13
|
||||
[57] (word) bitmap_line::e1#0 ← (word) bitmap_line::dy#0 >> (byte) 1
|
||||
to:bitmap_line::@7
|
||||
bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@1 bitmap_line::@8
|
||||
[58] (word) bitmap_line::e1#3 ← phi( bitmap_line::@1/(word) bitmap_line::e1#0 bitmap_line::@8/(word) bitmap_line::e1#6 )
|
||||
[58] (word) bitmap_line::x#6 ← phi( bitmap_line::@1/(word) bitmap_line::x1#0 bitmap_line::@8/(word) bitmap_line::x#13 )
|
||||
[58] (word) bitmap_line::y#13 ← phi( bitmap_line::@1/(word) bitmap_line::y1#0 bitmap_line::@8/(word) bitmap_line::y#11 )
|
||||
[59] (byte) bitmap_plot::y#2 ← (byte)(word) bitmap_line::y#13
|
||||
[60] (word) bitmap_plot::x#2 ← (word) bitmap_line::x#6
|
||||
[61] call bitmap_plot
|
||||
bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@1
|
||||
[36] (word) bitmap_line::sx#0 ← (word) sgn_u16::return#0
|
||||
[37] (word) sgn_u16::w#1 ← (word) bitmap_line::y2#0 - (word) bitmap_line::y1#0
|
||||
[38] call sgn_u16
|
||||
[39] (word) sgn_u16::return#1 ← (word) sgn_u16::return#4
|
||||
to:bitmap_line::@15
|
||||
bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@7
|
||||
[62] (word) bitmap_line::x#13 ← (word) bitmap_line::x#6 + (word) bitmap_line::sx#0
|
||||
[63] (word) bitmap_line::e1#1 ← (word) bitmap_line::e1#3 + (word) bitmap_line::dy#0
|
||||
[64] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@8
|
||||
to:bitmap_line::@9
|
||||
bitmap_line::@9: scope:[bitmap_line] from bitmap_line::@15
|
||||
[65] (word) bitmap_line::y#2 ← (word) bitmap_line::y#13 + (word) bitmap_line::sy#0
|
||||
[66] (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#1 - (word) bitmap_line::dx#0
|
||||
bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@14
|
||||
[40] (word) bitmap_line::sy#0 ← (word) sgn_u16::return#1
|
||||
[41] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2
|
||||
to:bitmap_line::@5
|
||||
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
|
||||
[42] (word) bitmap_line::e#0 ← (word) bitmap_line::dx#0 >> (byte) 1
|
||||
to:bitmap_line::@6
|
||||
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@7
|
||||
[43] (word) bitmap_line::e#3 ← phi( bitmap_line::@5/(word) bitmap_line::e#0 bitmap_line::@7/(word) bitmap_line::e#6 )
|
||||
[43] (word) bitmap_line::x#13 ← phi( bitmap_line::@5/(word) bitmap_line::x1#0 bitmap_line::@7/(word) bitmap_line::x#12 )
|
||||
[43] (word) bitmap_line::y#4 ← phi( bitmap_line::@5/(word) bitmap_line::y1#0 bitmap_line::@7/(word) bitmap_line::y#1 )
|
||||
[44] (byte) bitmap_plot::y#1 ← (byte)(word) bitmap_line::y#4
|
||||
[45] (word) bitmap_plot::x#1 ← (word) bitmap_line::x#13
|
||||
[46] call bitmap_plot
|
||||
to:bitmap_line::@16
|
||||
bitmap_line::@16: scope:[bitmap_line] from bitmap_line::@6
|
||||
[47] (word) bitmap_line::y#1 ← (word) bitmap_line::y#4 + (word) bitmap_line::sy#0
|
||||
[48] (word) bitmap_line::e#1 ← (word) bitmap_line::e#3 + (word) bitmap_line::dx#0
|
||||
[49] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@7
|
||||
to:bitmap_line::@8
|
||||
bitmap_line::@8: scope:[bitmap_line] from bitmap_line::@15 bitmap_line::@9
|
||||
[67] (word) bitmap_line::e1#6 ← phi( bitmap_line::@9/(word) bitmap_line::e1#2 bitmap_line::@15/(word) bitmap_line::e1#1 )
|
||||
[67] (word) bitmap_line::y#11 ← phi( bitmap_line::@9/(word) bitmap_line::y#2 bitmap_line::@15/(word) bitmap_line::y#13 )
|
||||
[68] if((word) bitmap_line::x#13!=(word) bitmap_line::x2#0) goto bitmap_line::@7
|
||||
to:bitmap_line::@2
|
||||
bitmap_plot: scope:[bitmap_plot] from bitmap_line::@2 bitmap_line::@4 bitmap_line::@7
|
||||
[69] (word) bitmap_plot::x#3 ← phi( bitmap_line::@2/(word) bitmap_plot::x#1 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@7/(word) bitmap_plot::x#2 )
|
||||
[69] (byte) bitmap_plot::y#3 ← phi( bitmap_line::@2/(byte) bitmap_plot::y#1 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@7/(byte) bitmap_plot::y#2 )
|
||||
[70] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#3) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#3)
|
||||
[71] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#3 & (word) $fff8
|
||||
[72] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
|
||||
[73] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#3
|
||||
[74] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
|
||||
bitmap_line::@8: scope:[bitmap_line] from bitmap_line::@16
|
||||
[50] (word) bitmap_line::x#1 ← (word) bitmap_line::x#13 + (word) bitmap_line::sx#0
|
||||
[51] (word) bitmap_line::e#2 ← (word) bitmap_line::e#1 - (word) bitmap_line::dy#0
|
||||
to:bitmap_line::@7
|
||||
bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@16 bitmap_line::@8
|
||||
[52] (word) bitmap_line::e#6 ← phi( bitmap_line::@16/(word) bitmap_line::e#1 bitmap_line::@8/(word) bitmap_line::e#2 )
|
||||
[52] (word) bitmap_line::x#12 ← phi( bitmap_line::@16/(word) bitmap_line::x#13 bitmap_line::@8/(word) bitmap_line::x#1 )
|
||||
[53] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@6
|
||||
to:bitmap_line::@3
|
||||
bitmap_line::@3: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@7
|
||||
[54] (word) bitmap_line::x#6 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@7/(word) bitmap_line::x#12 )
|
||||
[54] (word) bitmap_line::y#7 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@7/(word) bitmap_line::y#1 )
|
||||
[55] (byte) bitmap_plot::y#2 ← (byte)(word) bitmap_line::y#7
|
||||
[56] (word) bitmap_plot::x#2 ← (word) bitmap_line::x#6
|
||||
[57] call bitmap_plot
|
||||
to:bitmap_line::@return
|
||||
bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@3 bitmap_line::@4
|
||||
[58] return
|
||||
to:@return
|
||||
bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@15
|
||||
[59] (word) bitmap_line::e1#0 ← (word) bitmap_line::dy#0 >> (byte) 1
|
||||
to:bitmap_line::@9
|
||||
bitmap_line::@9: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@2
|
||||
[60] (word) bitmap_line::e1#3 ← phi( bitmap_line::@10/(word) bitmap_line::e1#6 bitmap_line::@2/(word) bitmap_line::e1#0 )
|
||||
[60] (word) bitmap_line::x#7 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@2/(word) bitmap_line::x1#0 )
|
||||
[60] (word) bitmap_line::y#15 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@2/(word) bitmap_line::y1#0 )
|
||||
[61] (byte) bitmap_plot::y#3 ← (byte)(word) bitmap_line::y#15
|
||||
[62] (word) bitmap_plot::x#3 ← (word) bitmap_line::x#7
|
||||
[63] call bitmap_plot
|
||||
to:bitmap_line::@17
|
||||
bitmap_line::@17: scope:[bitmap_line] from bitmap_line::@9
|
||||
[64] (word) bitmap_line::x#15 ← (word) bitmap_line::x#7 + (word) bitmap_line::sx#0
|
||||
[65] (word) bitmap_line::e1#1 ← (word) bitmap_line::e1#3 + (word) bitmap_line::dy#0
|
||||
[66] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@10
|
||||
to:bitmap_line::@11
|
||||
bitmap_line::@11: scope:[bitmap_line] from bitmap_line::@17
|
||||
[67] (word) bitmap_line::y#2 ← (word) bitmap_line::y#15 + (word) bitmap_line::sy#0
|
||||
[68] (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#1 - (word) bitmap_line::dx#0
|
||||
to:bitmap_line::@10
|
||||
bitmap_line::@10: scope:[bitmap_line] from bitmap_line::@11 bitmap_line::@17
|
||||
[69] (word) bitmap_line::e1#6 ← phi( bitmap_line::@11/(word) bitmap_line::e1#2 bitmap_line::@17/(word) bitmap_line::e1#1 )
|
||||
[69] (word) bitmap_line::y#13 ← phi( bitmap_line::@11/(word) bitmap_line::y#2 bitmap_line::@17/(word) bitmap_line::y#15 )
|
||||
[70] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#0) goto bitmap_line::@9
|
||||
to:bitmap_line::@3
|
||||
bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18
|
||||
[71] (byte) bitmap_plot::y#0 ← (byte)(word) bitmap_line::y1#0
|
||||
[72] (word) bitmap_plot::x#0 ← (word) bitmap_line::x1#0
|
||||
[73] call bitmap_plot
|
||||
to:bitmap_line::@return
|
||||
bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9
|
||||
[74] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 )
|
||||
[74] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 )
|
||||
[75] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#4) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#4)
|
||||
[76] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#4 & (word) $fff8
|
||||
[77] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
|
||||
[78] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#4
|
||||
[79] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
|
||||
to:bitmap_plot::@return
|
||||
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
|
||||
[75] return
|
||||
[80] return
|
||||
to:@return
|
||||
sgn_u16: scope:[sgn_u16] from bitmap_line::@11 bitmap_line::@12
|
||||
[76] (word) sgn_u16::w#2 ← phi( bitmap_line::@11/(word) sgn_u16::w#0 bitmap_line::@12/(word) sgn_u16::w#1 )
|
||||
[77] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2
|
||||
[78] (byte~) sgn_u16::$1 ← (byte~) sgn_u16::$0 & (byte) $80
|
||||
[79] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1
|
||||
sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14
|
||||
[81] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 )
|
||||
[82] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2
|
||||
[83] (byte~) sgn_u16::$1 ← (byte~) sgn_u16::$0 & (byte) $80
|
||||
[84] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1
|
||||
to:sgn_u16::@return
|
||||
sgn_u16::@1: scope:[sgn_u16] from sgn_u16
|
||||
[80] phi()
|
||||
[85] phi()
|
||||
to:sgn_u16::@return
|
||||
sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1
|
||||
[81] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 )
|
||||
[82] return
|
||||
[86] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 )
|
||||
[87] return
|
||||
to:@return
|
||||
abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@10
|
||||
[83] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@10/(word) abs_u16::w#1 )
|
||||
[84] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2
|
||||
[85] (byte~) abs_u16::$1 ← (byte~) abs_u16::$0 & (byte) $80
|
||||
[86] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1
|
||||
abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12
|
||||
[88] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 )
|
||||
[89] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2
|
||||
[90] (byte~) abs_u16::$1 ← (byte~) abs_u16::$0 & (byte) $80
|
||||
[91] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1
|
||||
to:abs_u16::@return
|
||||
abs_u16::@1: scope:[abs_u16] from abs_u16
|
||||
[87] (word) abs_u16::return#2 ← - (word) abs_u16::w#2
|
||||
[92] (word) abs_u16::return#2 ← - (word) abs_u16::w#2
|
||||
to:abs_u16::@return
|
||||
abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1
|
||||
[88] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 )
|
||||
[89] return
|
||||
to:@return
|
||||
bitmap_clear: scope:[bitmap_clear] from main::@4
|
||||
[90] phi()
|
||||
[91] call memset
|
||||
to:bitmap_clear::@1
|
||||
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear
|
||||
[92] phi()
|
||||
[93] call memset
|
||||
to:bitmap_clear::@return
|
||||
bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
|
||||
[93] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 )
|
||||
[94] return
|
||||
to:@return
|
||||
bitmap_clear: scope:[bitmap_clear] from main::@4
|
||||
[95] phi()
|
||||
[96] call memset
|
||||
to:bitmap_clear::@1
|
||||
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear
|
||||
[97] phi()
|
||||
[98] call memset
|
||||
to:bitmap_clear::@return
|
||||
bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
|
||||
[99] return
|
||||
to:@return
|
||||
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
|
||||
[95] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
|
||||
[95] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
|
||||
[95] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
|
||||
[96] if((word) memset::num#2<=(byte) 0) goto memset::@return
|
||||
[100] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
|
||||
[100] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
|
||||
[100] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
|
||||
[101] if((word) memset::num#2<=(byte) 0) goto memset::@return
|
||||
to:memset::@1
|
||||
memset::@1: scope:[memset] from memset
|
||||
[97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
|
||||
[98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3
|
||||
[102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
|
||||
[103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3
|
||||
to:memset::@2
|
||||
memset::@2: scope:[memset] from memset::@1 memset::@2
|
||||
[99] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 )
|
||||
[100] *((byte*) memset::dst#2) ← (byte) memset::c#3
|
||||
[101] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
[102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2
|
||||
[104] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 )
|
||||
[105] *((byte*) memset::dst#2) ← (byte) memset::c#3
|
||||
[106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
[107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2
|
||||
to:memset::@return
|
||||
memset::@return: scope:[memset] from memset memset::@2
|
||||
[103] return
|
||||
[108] return
|
||||
to:@return
|
||||
bitmap_init: scope:[bitmap_init] from main
|
||||
[104] phi()
|
||||
[109] phi()
|
||||
to:bitmap_init::@1
|
||||
bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2
|
||||
[105] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
|
||||
[105] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
|
||||
[106] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
|
||||
[107] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
|
||||
[108] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
|
||||
[110] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
|
||||
[110] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
|
||||
[111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
|
||||
[112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
|
||||
[113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
|
||||
to:bitmap_init::@2
|
||||
bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1
|
||||
[109] phi()
|
||||
[114] phi()
|
||||
to:bitmap_init::@2
|
||||
bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
|
||||
[110] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
|
||||
[111] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
|
||||
[112] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
|
||||
[115] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
|
||||
[116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
|
||||
[117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
|
||||
to:bitmap_init::@3
|
||||
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
|
||||
[113] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
|
||||
[113] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
|
||||
[114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
|
||||
[115] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
|
||||
[116] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
|
||||
[117] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
|
||||
[118] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
|
||||
[119] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
|
||||
[120] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
|
||||
[118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
|
||||
[118] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
|
||||
[119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
|
||||
[120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
|
||||
[121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
|
||||
[122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
|
||||
[123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
|
||||
[124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
|
||||
[125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
|
||||
to:bitmap_init::@5
|
||||
bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3
|
||||
[121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
|
||||
[126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
|
||||
to:bitmap_init::@4
|
||||
bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5
|
||||
[122] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
|
||||
[123] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
|
||||
[124] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
|
||||
[127] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
|
||||
[128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
|
||||
[129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
|
||||
to:bitmap_init::@return
|
||||
bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4
|
||||
[125] return
|
||||
[130] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -80,6 +80,9 @@
|
||||
(label) bitmap_line::@13
|
||||
(label) bitmap_line::@14
|
||||
(label) bitmap_line::@15
|
||||
(label) bitmap_line::@16
|
||||
(label) bitmap_line::@17
|
||||
(label) bitmap_line::@18
|
||||
(label) bitmap_line::@2
|
||||
(label) bitmap_line::@3
|
||||
(label) bitmap_line::@4
|
||||
@ -90,9 +93,9 @@
|
||||
(label) bitmap_line::@9
|
||||
(label) bitmap_line::@return
|
||||
(word) bitmap_line::dx
|
||||
(word) bitmap_line::dx#0 dx zp ZP_WORD:28 8.131578947368421
|
||||
(word) bitmap_line::dx#0 dx zp ZP_WORD:28 7.775
|
||||
(word) bitmap_line::dy
|
||||
(word) bitmap_line::dy#0 dy zp ZP_WORD:16 9.088235294117647
|
||||
(word) bitmap_line::dy#0 dy zp ZP_WORD:16 8.638888888888888
|
||||
(word) bitmap_line::e
|
||||
(word) bitmap_line::e#0 e zp ZP_WORD:4 4.0
|
||||
(word) bitmap_line::e#1 e zp ZP_WORD:4 134.66666666666666
|
||||
@ -111,26 +114,26 @@
|
||||
(word) bitmap_line::sy#0 sy zp ZP_WORD:14 7.846153846153847
|
||||
(word) bitmap_line::x
|
||||
(word) bitmap_line::x#1 x zp ZP_WORD:8 101.0
|
||||
(word) bitmap_line::x#10 x zp ZP_WORD:8 202.0
|
||||
(word) bitmap_line::x#11 x zp ZP_WORD:8 58.00000000000001
|
||||
(word) bitmap_line::x#13 x zp ZP_WORD:8 57.714285714285715
|
||||
(word) bitmap_line::x#5 x zp ZP_WORD:8 102.0
|
||||
(word) bitmap_line::x#6 x zp ZP_WORD:8 76.25
|
||||
(word) bitmap_line::x#12 x zp ZP_WORD:8 202.0
|
||||
(word) bitmap_line::x#13 x zp ZP_WORD:8 58.00000000000001
|
||||
(word) bitmap_line::x#15 x zp ZP_WORD:8 57.714285714285715
|
||||
(word) bitmap_line::x#6 x zp ZP_WORD:8 102.0
|
||||
(word) bitmap_line::x#7 x zp ZP_WORD:8 76.25
|
||||
(word) bitmap_line::x1
|
||||
(word) bitmap_line::x1#0 x1 zp ZP_WORD:8 0.7916666666666667
|
||||
(word) bitmap_line::x1#0 x1 zp ZP_WORD:8 0.7777777777777778
|
||||
(word) bitmap_line::x2
|
||||
(word) bitmap_line::x2#0 x2 zp ZP_WORD:24 3.741935483870968
|
||||
(word) bitmap_line::x2#0 x2 zp ZP_WORD:24 3.515151515151515
|
||||
(word) bitmap_line::y
|
||||
(word) bitmap_line::y#1 y zp ZP_WORD:6 57.714285714285715
|
||||
(word) bitmap_line::y#11 y zp ZP_WORD:6 202.0
|
||||
(word) bitmap_line::y#13 y zp ZP_WORD:6 43.57142857142858
|
||||
(word) bitmap_line::y#13 y zp ZP_WORD:6 202.0
|
||||
(word) bitmap_line::y#15 y zp ZP_WORD:6 43.57142857142858
|
||||
(word) bitmap_line::y#2 y zp ZP_WORD:6 101.0
|
||||
(word) bitmap_line::y#3 y zp ZP_WORD:6 51.0
|
||||
(word) bitmap_line::y#6 y zp ZP_WORD:6 202.0
|
||||
(word) bitmap_line::y#4 y zp ZP_WORD:6 51.0
|
||||
(word) bitmap_line::y#7 y zp ZP_WORD:6 202.0
|
||||
(word) bitmap_line::y1
|
||||
(word) bitmap_line::y1#0 y1 zp ZP_WORD:6 0.826086956521739
|
||||
(word) bitmap_line::y1#0 y1 zp ZP_WORD:6 0.7599999999999999
|
||||
(word) bitmap_line::y2
|
||||
(word) bitmap_line::y2#0 y2 zp ZP_WORD:26 3.8666666666666667
|
||||
(word) bitmap_line::y2#0 y2 zp ZP_WORD:26 3.625
|
||||
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
|
||||
(word~) bitmap_plot::$1 $1 zp ZP_WORD:34 4.0
|
||||
(byte~) bitmap_plot::$2 reg byte a 4.0
|
||||
@ -139,15 +142,17 @@
|
||||
(word) bitmap_plot::plotter#0 plotter zp ZP_WORD:32 1.0
|
||||
(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:32 3.0
|
||||
(word) bitmap_plot::x
|
||||
(word) bitmap_plot::x#0 x zp ZP_WORD:8 202.0
|
||||
(word) bitmap_plot::x#1 x zp ZP_WORD:8 4.0
|
||||
(word) bitmap_plot::x#2 x zp ZP_WORD:8 202.0
|
||||
(word) bitmap_plot::x#3 x zp ZP_WORD:8 52.0
|
||||
(word) bitmap_plot::x#0 x zp ZP_WORD:8 4.0
|
||||
(word) bitmap_plot::x#1 x zp ZP_WORD:8 202.0
|
||||
(word) bitmap_plot::x#2 x zp ZP_WORD:8 4.0
|
||||
(word) bitmap_plot::x#3 x zp ZP_WORD:8 202.0
|
||||
(word) bitmap_plot::x#4 x zp ZP_WORD:8 52.5
|
||||
(byte) bitmap_plot::y
|
||||
(byte) bitmap_plot::y#0 reg byte x 101.0
|
||||
(byte) bitmap_plot::y#1 reg byte x 2.0
|
||||
(byte) bitmap_plot::y#2 reg byte x 101.0
|
||||
(byte) bitmap_plot::y#3 reg byte x 208.0
|
||||
(byte) bitmap_plot::y#0 reg byte x 2.0
|
||||
(byte) bitmap_plot::y#1 reg byte x 101.0
|
||||
(byte) bitmap_plot::y#2 reg byte x 2.0
|
||||
(byte) bitmap_plot::y#3 reg byte x 101.0
|
||||
(byte) bitmap_plot::y#4 reg byte x 210.0
|
||||
(byte[$100]) bitmap_plot_bit
|
||||
(const byte[$100]) bitmap_plot_bit#0 bitmap_plot_bit = { fill( $100, 0) }
|
||||
(byte[$100]) bitmap_plot_yhi
|
||||
@ -218,10 +223,10 @@
|
||||
zp ZP_BYTE:2 [ main::a#2 main::a#1 ]
|
||||
zp ZP_BYTE:3 [ main::i#2 main::i#1 ]
|
||||
zp ZP_WORD:4 [ bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ]
|
||||
zp ZP_WORD:6 [ bitmap_line::y#13 bitmap_line::y#6 bitmap_line::y#11 bitmap_line::y#3 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 ]
|
||||
zp ZP_WORD:8 [ bitmap_line::x#6 bitmap_line::x#5 bitmap_line::x#13 bitmap_line::x#11 bitmap_line::x1#0 bitmap_line::x#10 bitmap_line::x#1 bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#2 main::$6 ]
|
||||
zp ZP_WORD:10 [ bitmap_line::e1#3 bitmap_line::e1#0 bitmap_line::e1#6 bitmap_line::e1#2 bitmap_line::e1#1 ]
|
||||
reg byte x [ bitmap_plot::y#3 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#2 ]
|
||||
zp ZP_WORD:6 [ bitmap_line::y#15 bitmap_line::y#7 bitmap_line::y#13 bitmap_line::y#4 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 ]
|
||||
zp ZP_WORD:8 [ bitmap_line::x#7 bitmap_line::x#6 bitmap_line::x#15 bitmap_line::x#13 bitmap_line::x1#0 bitmap_line::x#12 bitmap_line::x#1 bitmap_plot::x#4 bitmap_plot::x#3 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 main::$6 ]
|
||||
zp ZP_WORD:10 [ bitmap_line::e1#3 bitmap_line::e1#6 bitmap_line::e1#0 bitmap_line::e1#2 bitmap_line::e1#1 ]
|
||||
reg byte x [ bitmap_plot::y#4 bitmap_plot::y#3 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ]
|
||||
zp ZP_WORD:12 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ]
|
||||
zp ZP_WORD:14 [ sgn_u16::return#4 sgn_u16::return#0 sgn_u16::return#1 bitmap_line::sy#0 ]
|
||||
zp ZP_WORD:16 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 abs_u16::return#0 abs_u16::return#1 bitmap_line::dy#0 ]
|
||||
|
1237
src/test/ref/complex/splines/simple-splines.asm
Normal file
1237
src/test/ref/complex/splines/simple-splines.asm
Normal file
File diff suppressed because it is too large
Load Diff
478
src/test/ref/complex/splines/simple-splines.cfg
Normal file
478
src/test/ref/complex/splines/simple-splines.cfg
Normal file
@ -0,0 +1,478 @@
|
||||
@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] *((byte*)(const struct Segment[$15]) letter_c#0) ← (const byte) MOVE_TO
|
||||
[5] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO) ← (signed byte) $6c
|
||||
[6] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y) ← (signed word) $92
|
||||
[7] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA) ← (signed byte) 0
|
||||
[8] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y) ← (signed byte) 0
|
||||
[9] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 1*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[10] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 1*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $59
|
||||
[11] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 1*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $b6
|
||||
[12] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 1*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $67
|
||||
[13] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 1*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $a9
|
||||
[14] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 2*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[15] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 2*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $3b
|
||||
[16] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 2*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $c3
|
||||
[17] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 2*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4b
|
||||
[18] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 2*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $c3
|
||||
[19] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 3*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[20] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 3*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $17
|
||||
[21] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 3*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $b2
|
||||
[22] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 3*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $26
|
||||
[23] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 3*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $c3
|
||||
[24] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 4*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[25] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 4*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) 9
|
||||
[26] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 4*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $84
|
||||
[27] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 4*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) 9
|
||||
[28] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 4*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $a1
|
||||
[29] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 5*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[30] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 5*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $19
|
||||
[31] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 5*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $57
|
||||
[32] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 5*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) 9
|
||||
[33] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 5*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $68
|
||||
[34] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 6*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[35] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 6*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $41
|
||||
[36] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 6*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $45
|
||||
[37] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 6*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $2a
|
||||
[38] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 6*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $45
|
||||
[39] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 7*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[40] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 7*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $5d
|
||||
[41] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 7*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4f
|
||||
[42] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 7*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $52
|
||||
[43] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 7*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $45
|
||||
[44] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 8*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[45] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 8*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $69
|
||||
[46] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 8*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $62
|
||||
[47] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 8*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $69
|
||||
[48] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 8*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $58
|
||||
[49] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) 9*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[50] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) 9*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $66
|
||||
[51] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 9*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $6a
|
||||
[52] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) 9*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $69
|
||||
[53] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 9*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $67
|
||||
[54] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $a*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[55] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $a*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $5d
|
||||
[56] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $a*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $6d
|
||||
[57] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $a*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $62
|
||||
[58] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $a*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $6d
|
||||
[59] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $b*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[60] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $b*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $51
|
||||
[61] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $b*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $68
|
||||
[62] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $b*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $55
|
||||
[63] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $b*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $6d
|
||||
[64] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $c*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[65] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $c*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4e
|
||||
[66] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $c*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $5d
|
||||
[67] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $c*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4f
|
||||
[68] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $c*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $65
|
||||
[69] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $d*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[70] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $d*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $49
|
||||
[71] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $d*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $52
|
||||
[72] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $d*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4e
|
||||
[73] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $d*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $56
|
||||
[74] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $e*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[75] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $e*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $3d
|
||||
[76] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $e*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4e
|
||||
[77] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $e*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $45
|
||||
[78] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $e*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4e
|
||||
[79] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $f*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[80] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $f*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $28
|
||||
[81] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $f*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $58
|
||||
[82] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $f*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $30
|
||||
[83] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $f*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $4e
|
||||
[84] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $10*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[85] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $10*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $1d
|
||||
[86] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $10*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $79
|
||||
[87] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $10*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $1d
|
||||
[88] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $10*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $64
|
||||
[89] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $11*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[90] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $11*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $28
|
||||
[91] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $11*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $9e
|
||||
[92] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $11*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $1d
|
||||
[93] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $11*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $8e
|
||||
[94] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $12*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[95] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $12*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $44
|
||||
[96] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $12*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $ae
|
||||
[97] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $12*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $32
|
||||
[98] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $12*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $ae
|
||||
[99] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $13*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[100] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $13*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $5b
|
||||
[101] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $13*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $a6
|
||||
[102] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $13*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $50
|
||||
[103] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $13*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $ae
|
||||
[104] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $14*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) SPLINE_TO
|
||||
[105] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $14*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $68
|
||||
[106] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $14*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $90
|
||||
[107] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $14*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $62
|
||||
[108] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $14*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $a0
|
||||
[109] *((byte*)(const struct Segment[$15]) letter_c#0+(byte) $15*(const byte) SIZEOF_STRUCT_SEGMENT) ← (const byte) LINE_TO
|
||||
[110] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(byte) $15*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) $6c
|
||||
[111] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $15*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed word) $92
|
||||
[112] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(byte) $15*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) 0
|
||||
[113] *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) $15*(const byte) SIZEOF_STRUCT_SEGMENT) ← (signed byte) 0
|
||||
[114] call bitmap_init
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main
|
||||
[115] phi()
|
||||
[116] call bitmap_clear
|
||||
to:main::vicSelectGfxBank1
|
||||
main::vicSelectGfxBank1: scope:[main] from main::@8
|
||||
[117] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
|
||||
to:main::vicSelectGfxBank1_toDd001
|
||||
main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1
|
||||
[118] phi()
|
||||
to:main::vicSelectGfxBank1_@1
|
||||
main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001
|
||||
[119] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
|
||||
to:main::toD0181
|
||||
main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1
|
||||
[120] phi()
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::toD0181
|
||||
[121] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
||||
[122] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@10 main::@7
|
||||
[123] (signed word) main::current_y#4 ← phi( main::@7/(signed byte) 0 main::@10/(signed word~) main::current_y#9 )
|
||||
[123] (signed word) main::current_x#4 ← phi( main::@7/(signed byte) 0 main::@10/(signed word~) main::current_x#9 )
|
||||
[123] (byte) main::i#10 ← phi( main::@7/(byte) 0 main::@10/(byte) main::i#1 )
|
||||
[124] (byte) main::$206 ← (byte) main::i#10 << (byte) 3
|
||||
[125] (byte~) main::$44 ← (byte) main::$206 + (byte) main::i#10
|
||||
[126] (byte) main::segment_type#0 ← *((byte*)(const struct Segment[$15]) letter_c#0 + (byte~) main::$44)
|
||||
[127] (signed word) main::current_x#8 ← *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO + (byte~) main::$44)
|
||||
[128] (signed word) main::current_y#8 ← *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) main::$44)
|
||||
[129] (signed word) main::segment_via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA + (byte~) main::$44)
|
||||
[130] (signed word) main::segment_via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment[$15]) letter_c#0+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) main::$44)
|
||||
[131] if((byte) main::segment_type#0==(const byte) MOVE_TO) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@1
|
||||
[132] if((byte) main::segment_type#0==(const byte) SPLINE_TO) goto main::@2
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@4
|
||||
[133] (word) bitmap_line::x1#0 ← (word)(signed word) main::current_x#4
|
||||
[134] (word) bitmap_line::y1#0 ← (word)(signed word) main::current_y#4
|
||||
[135] (word) bitmap_line::x2#0 ← (word)(signed word) main::current_x#8
|
||||
[136] (word) bitmap_line::y2#0 ← (word)(signed word) main::current_y#8
|
||||
[137] call bitmap_line
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1 main::@5 main::@9
|
||||
[138] (byte) main::i#1 ← ++ (byte) main::i#10
|
||||
[139] if((byte) main::i#1!=(byte) $15*(const byte) SIZEOF_STRUCT_SEGMENT/(const byte) SIZEOF_STRUCT_SEGMENT+(byte) 1) goto main::@10
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@3 main::@6
|
||||
[140] *((const byte*) PRINT_SCREEN#0+(word) $3e7) ← ++ *((const byte*) PRINT_SCREEN#0+(word) $3e7)
|
||||
to:main::@6
|
||||
main::@10: scope:[main] from main::@3
|
||||
[141] (signed word~) main::current_x#9 ← (signed word) main::current_x#8
|
||||
[142] (signed word~) main::current_y#9 ← (signed word) main::current_y#8
|
||||
to:main::@1
|
||||
main::@2: scope:[main] from main::@4
|
||||
[143] (signed word) spline_8segB::p0_x#0 ← (signed word) main::current_x#4
|
||||
[144] (signed word) spline_8segB::p0_y#0 ← (signed word) main::current_y#4
|
||||
[145] (signed word) spline_8segB::p1_x#0 ← (signed word) main::segment_via_x#0
|
||||
[146] (signed word) spline_8segB::p1_y#0 ← (signed word) main::segment_via_y#0
|
||||
[147] (signed word) spline_8segB::p2_x#0 ← (signed word) main::current_x#8
|
||||
[148] (signed word) spline_8segB::p2_y#0 ← (signed word) main::current_y#8
|
||||
[149] call spline_8segB
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::@2
|
||||
[150] phi()
|
||||
[151] call bitmap_plot_spline_8seg
|
||||
to:main::@3
|
||||
bitmap_plot_spline_8seg: scope:[bitmap_plot_spline_8seg] from main::@9
|
||||
[152] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0)
|
||||
[153] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y)
|
||||
to:bitmap_plot_spline_8seg::@1
|
||||
bitmap_plot_spline_8seg::@1: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg bitmap_plot_spline_8seg::@3
|
||||
[154] (signed word) bitmap_plot_spline_8seg::current_y#2 ← phi( bitmap_plot_spline_8seg/(signed word) bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::@3/(signed word~) bitmap_plot_spline_8seg::current_y#4 )
|
||||
[154] (signed word) bitmap_plot_spline_8seg::current_x#2 ← phi( bitmap_plot_spline_8seg/(signed word) bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::@3/(signed word~) bitmap_plot_spline_8seg::current_x#4 )
|
||||
[154] (byte) bitmap_plot_spline_8seg::n#2 ← phi( bitmap_plot_spline_8seg/(byte) 1 bitmap_plot_spline_8seg::@3/(byte) bitmap_plot_spline_8seg::n#1 )
|
||||
[155] (byte~) bitmap_plot_spline_8seg::$7 ← (byte) bitmap_plot_spline_8seg::n#2 << (byte) 2
|
||||
[156] (signed word) bitmap_plot_spline_8seg::to_x#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0 + (byte~) bitmap_plot_spline_8seg::$7)
|
||||
[157] (signed word) bitmap_plot_spline_8seg::to_y#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) bitmap_plot_spline_8seg::$7)
|
||||
[158] (word) bitmap_line::x1#1 ← (word)(signed word) bitmap_plot_spline_8seg::current_x#2
|
||||
[159] (word) bitmap_line::y1#1 ← (word)(signed word) bitmap_plot_spline_8seg::current_y#2
|
||||
[160] (word) bitmap_line::x2#1 ← (word)(signed word) bitmap_plot_spline_8seg::to_x#0
|
||||
[161] (word) bitmap_line::y2#1 ← (word)(signed word) bitmap_plot_spline_8seg::to_y#0
|
||||
[162] call bitmap_line
|
||||
to:bitmap_plot_spline_8seg::@2
|
||||
bitmap_plot_spline_8seg::@2: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg::@1
|
||||
[163] (byte) bitmap_plot_spline_8seg::n#1 ← ++ (byte) bitmap_plot_spline_8seg::n#2
|
||||
[164] if((byte) bitmap_plot_spline_8seg::n#1!=(byte) 9) goto bitmap_plot_spline_8seg::@3
|
||||
to:bitmap_plot_spline_8seg::@return
|
||||
bitmap_plot_spline_8seg::@return: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg::@2
|
||||
[165] return
|
||||
to:@return
|
||||
bitmap_plot_spline_8seg::@3: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg::@2
|
||||
[166] (signed word~) bitmap_plot_spline_8seg::current_x#4 ← (signed word) bitmap_plot_spline_8seg::to_x#0
|
||||
[167] (signed word~) bitmap_plot_spline_8seg::current_y#4 ← (signed word) bitmap_plot_spline_8seg::to_y#0
|
||||
to:bitmap_plot_spline_8seg::@1
|
||||
bitmap_line: scope:[bitmap_line] from bitmap_plot_spline_8seg::@1 main::@5
|
||||
[168] (word) bitmap_line::y2#11 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::y2#1 main::@5/(word) bitmap_line::y2#0 )
|
||||
[168] (word) bitmap_line::x2#10 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::x2#1 main::@5/(word) bitmap_line::x2#0 )
|
||||
[168] (word) bitmap_line::y#0 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::y1#1 main::@5/(word) bitmap_line::y1#0 )
|
||||
[168] (word) bitmap_line::x#0 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::x1#1 main::@5/(word) bitmap_line::x1#0 )
|
||||
[169] (word) abs_u16::w#0 ← (word) bitmap_line::x2#10 - (word) bitmap_line::x#0
|
||||
[170] call abs_u16
|
||||
[171] (word) abs_u16::return#0 ← (word) abs_u16::return#4
|
||||
to:bitmap_line::@12
|
||||
bitmap_line::@12: scope:[bitmap_line] from bitmap_line
|
||||
[172] (word) bitmap_line::dx#0 ← (word) abs_u16::return#0
|
||||
[173] (word) abs_u16::w#1 ← (word) bitmap_line::y2#11 - (word) bitmap_line::y#0
|
||||
[174] call abs_u16
|
||||
[175] (word) abs_u16::return#1 ← (word) abs_u16::return#4
|
||||
to:bitmap_line::@13
|
||||
bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@12
|
||||
[176] (word) bitmap_line::dy#0 ← (word) abs_u16::return#1
|
||||
[177] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1
|
||||
to:bitmap_line::@18
|
||||
bitmap_line::@18: scope:[bitmap_line] from bitmap_line::@13
|
||||
[178] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4
|
||||
to:bitmap_line::@1
|
||||
bitmap_line::@1: scope:[bitmap_line] from bitmap_line::@13 bitmap_line::@18
|
||||
[179] (word) sgn_u16::w#0 ← (word) bitmap_line::x2#10 - (word) bitmap_line::x#0
|
||||
[180] call sgn_u16
|
||||
[181] (word) sgn_u16::return#0 ← (word) sgn_u16::return#4
|
||||
to:bitmap_line::@14
|
||||
bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@1
|
||||
[182] (word) bitmap_line::sx#0 ← (word) sgn_u16::return#0
|
||||
[183] (word) sgn_u16::w#1 ← (word) bitmap_line::y2#11 - (word) bitmap_line::y#0
|
||||
[184] call sgn_u16
|
||||
[185] (word) sgn_u16::return#1 ← (word) sgn_u16::return#4
|
||||
to:bitmap_line::@15
|
||||
bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@14
|
||||
[186] (word) bitmap_line::sy#0 ← (word) sgn_u16::return#1
|
||||
[187] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2
|
||||
to:bitmap_line::@5
|
||||
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
|
||||
[188] (word) bitmap_line::e#0 ← (word) bitmap_line::dx#0 >> (byte) 1
|
||||
to:bitmap_line::@6
|
||||
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@7
|
||||
[189] (word) bitmap_line::e#3 ← phi( bitmap_line::@5/(word) bitmap_line::e#0 bitmap_line::@7/(word) bitmap_line::e#6 )
|
||||
[189] (word) bitmap_line::x#13 ← phi( bitmap_line::@5/(word) bitmap_line::x#0 bitmap_line::@7/(word) bitmap_line::x#12 )
|
||||
[189] (word) bitmap_line::y#4 ← phi( bitmap_line::@5/(word) bitmap_line::y#0 bitmap_line::@7/(word) bitmap_line::y#1 )
|
||||
[190] (byte) bitmap_plot::y#1 ← (byte)(word) bitmap_line::y#4
|
||||
[191] (word) bitmap_plot::x#1 ← (word) bitmap_line::x#13
|
||||
[192] call bitmap_plot
|
||||
to:bitmap_line::@16
|
||||
bitmap_line::@16: scope:[bitmap_line] from bitmap_line::@6
|
||||
[193] (word) bitmap_line::y#1 ← (word) bitmap_line::y#4 + (word) bitmap_line::sy#0
|
||||
[194] (word) bitmap_line::e#1 ← (word) bitmap_line::e#3 + (word) bitmap_line::dx#0
|
||||
[195] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@7
|
||||
to:bitmap_line::@8
|
||||
bitmap_line::@8: scope:[bitmap_line] from bitmap_line::@16
|
||||
[196] (word) bitmap_line::x#1 ← (word) bitmap_line::x#13 + (word) bitmap_line::sx#0
|
||||
[197] (word) bitmap_line::e#2 ← (word) bitmap_line::e#1 - (word) bitmap_line::dy#0
|
||||
to:bitmap_line::@7
|
||||
bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@16 bitmap_line::@8
|
||||
[198] (word) bitmap_line::e#6 ← phi( bitmap_line::@16/(word) bitmap_line::e#1 bitmap_line::@8/(word) bitmap_line::e#2 )
|
||||
[198] (word) bitmap_line::x#12 ← phi( bitmap_line::@16/(word) bitmap_line::x#13 bitmap_line::@8/(word) bitmap_line::x#1 )
|
||||
[199] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#11) goto bitmap_line::@6
|
||||
to:bitmap_line::@3
|
||||
bitmap_line::@3: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@7
|
||||
[200] (word) bitmap_line::x#6 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@7/(word) bitmap_line::x#12 )
|
||||
[200] (word) bitmap_line::y#7 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@7/(word) bitmap_line::y#1 )
|
||||
[201] (byte) bitmap_plot::y#2 ← (byte)(word) bitmap_line::y#7
|
||||
[202] (word) bitmap_plot::x#2 ← (word) bitmap_line::x#6
|
||||
[203] call bitmap_plot
|
||||
to:bitmap_line::@return
|
||||
bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@3 bitmap_line::@4
|
||||
[204] return
|
||||
to:@return
|
||||
bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@15
|
||||
[205] (word) bitmap_line::e1#0 ← (word) bitmap_line::dy#0 >> (byte) 1
|
||||
to:bitmap_line::@9
|
||||
bitmap_line::@9: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@2
|
||||
[206] (word) bitmap_line::e1#3 ← phi( bitmap_line::@10/(word) bitmap_line::e1#6 bitmap_line::@2/(word) bitmap_line::e1#0 )
|
||||
[206] (word) bitmap_line::x#7 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@2/(word) bitmap_line::x#0 )
|
||||
[206] (word) bitmap_line::y#15 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@2/(word) bitmap_line::y#0 )
|
||||
[207] (byte) bitmap_plot::y#3 ← (byte)(word) bitmap_line::y#15
|
||||
[208] (word) bitmap_plot::x#3 ← (word) bitmap_line::x#7
|
||||
[209] call bitmap_plot
|
||||
to:bitmap_line::@17
|
||||
bitmap_line::@17: scope:[bitmap_line] from bitmap_line::@9
|
||||
[210] (word) bitmap_line::x#15 ← (word) bitmap_line::x#7 + (word) bitmap_line::sx#0
|
||||
[211] (word) bitmap_line::e1#1 ← (word) bitmap_line::e1#3 + (word) bitmap_line::dy#0
|
||||
[212] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@10
|
||||
to:bitmap_line::@11
|
||||
bitmap_line::@11: scope:[bitmap_line] from bitmap_line::@17
|
||||
[213] (word) bitmap_line::y#2 ← (word) bitmap_line::y#15 + (word) bitmap_line::sy#0
|
||||
[214] (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#1 - (word) bitmap_line::dx#0
|
||||
to:bitmap_line::@10
|
||||
bitmap_line::@10: scope:[bitmap_line] from bitmap_line::@11 bitmap_line::@17
|
||||
[215] (word) bitmap_line::e1#6 ← phi( bitmap_line::@11/(word) bitmap_line::e1#2 bitmap_line::@17/(word) bitmap_line::e1#1 )
|
||||
[215] (word) bitmap_line::y#13 ← phi( bitmap_line::@11/(word) bitmap_line::y#2 bitmap_line::@17/(word) bitmap_line::y#15 )
|
||||
[216] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#10) goto bitmap_line::@9
|
||||
to:bitmap_line::@3
|
||||
bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18
|
||||
[217] (byte) bitmap_plot::y#0 ← (byte)(word) bitmap_line::y#0
|
||||
[218] (word) bitmap_plot::x#0 ← (word) bitmap_line::x#0
|
||||
[219] call bitmap_plot
|
||||
to:bitmap_line::@return
|
||||
bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9
|
||||
[220] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 )
|
||||
[220] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 )
|
||||
[221] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#4) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#4)
|
||||
[222] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#4 & (word) $fff8
|
||||
[223] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
|
||||
[224] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#4
|
||||
[225] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
|
||||
to:bitmap_plot::@return
|
||||
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
|
||||
[226] return
|
||||
to:@return
|
||||
sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14
|
||||
[227] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 )
|
||||
[228] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2
|
||||
[229] (byte~) sgn_u16::$1 ← (byte~) sgn_u16::$0 & (byte) $80
|
||||
[230] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1
|
||||
to:sgn_u16::@return
|
||||
sgn_u16::@1: scope:[sgn_u16] from sgn_u16
|
||||
[231] phi()
|
||||
to:sgn_u16::@return
|
||||
sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1
|
||||
[232] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 )
|
||||
[233] return
|
||||
to:@return
|
||||
abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12
|
||||
[234] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 )
|
||||
[235] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2
|
||||
[236] (byte~) abs_u16::$1 ← (byte~) abs_u16::$0 & (byte) $80
|
||||
[237] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1
|
||||
to:abs_u16::@return
|
||||
abs_u16::@1: scope:[abs_u16] from abs_u16
|
||||
[238] (word) abs_u16::return#2 ← - (word) abs_u16::w#2
|
||||
to:abs_u16::@return
|
||||
abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1
|
||||
[239] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 )
|
||||
[240] return
|
||||
to:@return
|
||||
spline_8segB: scope:[spline_8segB] from main::@2
|
||||
[241] (signed word~) spline_8segB::$0 ← (signed word) spline_8segB::p1_x#0 << (byte) 1
|
||||
[242] (signed word~) spline_8segB::$1 ← (signed word) spline_8segB::p2_x#0 - (signed word~) spline_8segB::$0
|
||||
[243] (signed word) spline_8segB::a_x#0 ← (signed word~) spline_8segB::$1 + (signed word) spline_8segB::p0_x#0
|
||||
[244] (signed word~) spline_8segB::$3 ← (signed word) spline_8segB::p1_y#0 << (byte) 1
|
||||
[245] (signed word~) spline_8segB::$4 ← (signed word) spline_8segB::p2_y#0 - (signed word~) spline_8segB::$3
|
||||
[246] (signed word) spline_8segB::a_y#0 ← (signed word~) spline_8segB::$4 + (signed word) spline_8segB::p0_y#0
|
||||
[247] (signed word~) spline_8segB::$6 ← (signed word) spline_8segB::p1_x#0 - (signed word) spline_8segB::p0_x#0
|
||||
[248] (signed word) spline_8segB::b_x#0 ← (signed word~) spline_8segB::$6 << (byte) 1
|
||||
[249] (signed word~) spline_8segB::$8 ← (signed word) spline_8segB::p1_y#0 - (signed word) spline_8segB::p0_y#0
|
||||
[250] (signed word) spline_8segB::b_y#0 ← (signed word~) spline_8segB::$8 << (byte) 1
|
||||
[251] (signed word~) spline_8segB::$10 ← (signed word) spline_8segB::b_x#0 << (byte) 3
|
||||
[252] (signed word) spline_8segB::i_x#0 ← (signed word) spline_8segB::a_x#0 + (signed word~) spline_8segB::$10
|
||||
[253] (signed word~) spline_8segB::$12 ← (signed word) spline_8segB::b_y#0 << (byte) 3
|
||||
[254] (signed word) spline_8segB::i_y#0 ← (signed word) spline_8segB::a_y#0 + (signed word~) spline_8segB::$12
|
||||
[255] (signed word) spline_8segB::j_x#0 ← (signed word) spline_8segB::a_x#0 << (byte) 1
|
||||
[256] (signed word) spline_8segB::j_y#0 ← (signed word) spline_8segB::a_y#0 << (byte) 1
|
||||
[257] (signed word) spline_8segB::p_x#0 ← (signed word) spline_8segB::p0_x#0 << (byte) 6
|
||||
[258] (signed word) spline_8segB::p_y#0 ← (signed word) spline_8segB::p0_y#0 << (byte) 6
|
||||
to:spline_8segB::@1
|
||||
spline_8segB::@1: scope:[spline_8segB] from spline_8segB spline_8segB::@1
|
||||
[259] (signed word) spline_8segB::i_y#2 ← phi( spline_8segB/(signed word) spline_8segB::i_y#0 spline_8segB::@1/(signed word) spline_8segB::i_y#1 )
|
||||
[259] (signed word) spline_8segB::i_x#2 ← phi( spline_8segB/(signed word) spline_8segB::i_x#0 spline_8segB::@1/(signed word) spline_8segB::i_x#1 )
|
||||
[259] (byte) spline_8segB::n#2 ← phi( spline_8segB/(byte) 0 spline_8segB::@1/(byte) spline_8segB::n#1 )
|
||||
[259] (signed word) spline_8segB::p_y#2 ← phi( spline_8segB/(signed word) spline_8segB::p_y#0 spline_8segB::@1/(signed word) spline_8segB::p_y#1 )
|
||||
[259] (signed word) spline_8segB::p_x#2 ← phi( spline_8segB/(signed word) spline_8segB::p_x#0 spline_8segB::@1/(signed word) spline_8segB::p_x#1 )
|
||||
[260] (signed word~) spline_8segB::$22 ← (signed word) spline_8segB::p_x#2 + (signed byte) $20
|
||||
[261] (signed word~) spline_8segB::$23 ← (signed word~) spline_8segB::$22 >> (byte) 6
|
||||
[262] (signed word~) spline_8segB::$24 ← (signed word) spline_8segB::p_y#2 + (signed byte) $20
|
||||
[263] (signed word~) spline_8segB::$25 ← (signed word~) spline_8segB::$24 >> (byte) 6
|
||||
[264] (byte~) spline_8segB::$31 ← (byte) spline_8segB::n#2 << (byte) 2
|
||||
[265] *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0 + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$23
|
||||
[266] *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$25
|
||||
[267] (signed word) spline_8segB::p_x#1 ← (signed word) spline_8segB::p_x#2 + (signed word) spline_8segB::i_x#2
|
||||
[268] (signed word) spline_8segB::p_y#1 ← (signed word) spline_8segB::p_y#2 + (signed word) spline_8segB::i_y#2
|
||||
[269] (signed word) spline_8segB::i_x#1 ← (signed word) spline_8segB::i_x#2 + (signed word) spline_8segB::j_x#0
|
||||
[270] (signed word) spline_8segB::i_y#1 ← (signed word) spline_8segB::i_y#2 + (signed word) spline_8segB::j_y#0
|
||||
[271] (byte) spline_8segB::n#1 ← ++ (byte) spline_8segB::n#2
|
||||
[272] if((byte) spline_8segB::n#1!=(byte) 8) goto spline_8segB::@1
|
||||
to:spline_8segB::@2
|
||||
spline_8segB::@2: scope:[spline_8segB] from spline_8segB::@1
|
||||
[273] (signed word~) spline_8segB::$18 ← (signed word) spline_8segB::p_x#1 + (signed byte) $20
|
||||
[274] (signed word~) spline_8segB::$19 ← (signed word~) spline_8segB::$18 >> (byte) 6
|
||||
[275] (signed word~) spline_8segB::$20 ← (signed word) spline_8segB::p_y#1 + (signed byte) $20
|
||||
[276] (signed word~) spline_8segB::$21 ← (signed word~) spline_8segB::$20 >> (byte) 6
|
||||
[277] *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0+(byte) 8*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16) ← (signed word~) spline_8segB::$19
|
||||
[278] *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 8*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16) ← (signed word~) spline_8segB::$21
|
||||
to:spline_8segB::@return
|
||||
spline_8segB::@return: scope:[spline_8segB] from spline_8segB::@2
|
||||
[279] return
|
||||
to:@return
|
||||
bitmap_clear: scope:[bitmap_clear] from main::@8
|
||||
[280] phi()
|
||||
[281] call memset
|
||||
to:bitmap_clear::@1
|
||||
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear
|
||||
[282] phi()
|
||||
[283] call memset
|
||||
to:bitmap_clear::@return
|
||||
bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
|
||||
[284] return
|
||||
to:@return
|
||||
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
|
||||
[285] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
|
||||
[285] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) BITMAP_SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP_GRAPHICS#0 )
|
||||
[285] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
|
||||
[286] if((word) memset::num#2<=(byte) 0) goto memset::@return
|
||||
to:memset::@1
|
||||
memset::@1: scope:[memset] from memset
|
||||
[287] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
|
||||
[288] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3
|
||||
to:memset::@2
|
||||
memset::@2: scope:[memset] from memset::@1 memset::@2
|
||||
[289] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 )
|
||||
[290] *((byte*) memset::dst#2) ← (byte) memset::c#3
|
||||
[291] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
[292] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2
|
||||
to:memset::@return
|
||||
memset::@return: scope:[memset] from memset memset::@2
|
||||
[293] return
|
||||
to:@return
|
||||
bitmap_init: scope:[bitmap_init] from main
|
||||
[294] phi()
|
||||
to:bitmap_init::@1
|
||||
bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2
|
||||
[295] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
|
||||
[295] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
|
||||
[296] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
|
||||
[297] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
|
||||
[298] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
|
||||
to:bitmap_init::@2
|
||||
bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1
|
||||
[299] phi()
|
||||
to:bitmap_init::@2
|
||||
bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
|
||||
[300] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
|
||||
[301] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
|
||||
[302] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
|
||||
to:bitmap_init::@3
|
||||
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
|
||||
[303] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP_GRAPHICS#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
|
||||
[303] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
|
||||
[304] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
|
||||
[305] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
|
||||
[306] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
|
||||
[307] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
|
||||
[308] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
|
||||
[309] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
|
||||
[310] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
|
||||
to:bitmap_init::@5
|
||||
bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3
|
||||
[311] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
|
||||
to:bitmap_init::@4
|
||||
bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5
|
||||
[312] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
|
||||
[313] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
|
||||
[314] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
|
||||
to:bitmap_init::@return
|
||||
bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4
|
||||
[315] return
|
||||
to:@return
|
13202
src/test/ref/complex/splines/simple-splines.log
Normal file
13202
src/test/ref/complex/splines/simple-splines.log
Normal file
File diff suppressed because it is too large
Load Diff
425
src/test/ref/complex/splines/simple-splines.sym
Normal file
425
src/test/ref/complex/splines/simple-splines.sym
Normal file
@ -0,0 +1,425 @@
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BITMAP_GRAPHICS
|
||||
(const byte*) BITMAP_GRAPHICS#0 BITMAP_GRAPHICS = (byte*) 24576
|
||||
(byte*) BITMAP_SCREEN
|
||||
(const byte*) BITMAP_SCREEN#0 BITMAP_SCREEN = (byte*) 23552
|
||||
(byte) BLACK
|
||||
(byte*) CIA2_PORT_A
|
||||
(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = (byte*) 56576
|
||||
(byte*) CIA2_PORT_A_DDR
|
||||
(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = (byte*) 56578
|
||||
(byte*) D011
|
||||
(const byte*) D011#0 D011 = (byte*) 53265
|
||||
(byte*) D018
|
||||
(const byte*) D018#0 D018 = (byte*) 53272
|
||||
(const byte) LINE_TO LINE_TO = (byte) 2
|
||||
(const byte) MOVE_TO MOVE_TO = (byte) 0
|
||||
(const byte) OFFSET_STRUCT_SEGMENT_TO OFFSET_STRUCT_SEGMENT_TO = (byte) 1
|
||||
(const byte) OFFSET_STRUCT_SEGMENT_VIA OFFSET_STRUCT_SEGMENT_VIA = (byte) 5
|
||||
(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y OFFSET_STRUCT_SPLINEVECTOR16_Y = (byte) 2
|
||||
(byte*) PRINT_SCREEN
|
||||
(const byte*) PRINT_SCREEN#0 PRINT_SCREEN = (byte*) 1024
|
||||
(const byte) SIZEOF_STRUCT_SEGMENT SIZEOF_STRUCT_SEGMENT = (byte) 9
|
||||
(const byte) SIZEOF_STRUCT_SPLINEVECTOR16 SIZEOF_STRUCT_SPLINEVECTOR16 = (byte) 4
|
||||
(struct SplineVector16[9]) SPLINE_8SEG
|
||||
(const struct SplineVector16[9]) SPLINE_8SEG#0 SPLINE_8SEG = { fill( 9, 0) }
|
||||
(const byte) SPLINE_TO SPLINE_TO = (byte) 1
|
||||
(struct SplineVector16) Segment::to
|
||||
(byte) Segment::type
|
||||
(struct SplineVector16) Segment::via
|
||||
(const byte) SegmentType::LINE_TO LINE_TO = (byte) 2
|
||||
(const byte) SegmentType::MOVE_TO MOVE_TO = (byte) 0
|
||||
(const byte) SegmentType::SPLINE_TO SPLINE_TO = (byte) 1
|
||||
(signed word) SplineVector16::x
|
||||
(signed word) SplineVector16::y
|
||||
(signed dword) SplineVector32::x
|
||||
(signed dword) SplineVector32::y
|
||||
(byte) VIC_BMM
|
||||
(const byte) VIC_BMM#0 VIC_BMM = (byte) $20
|
||||
(byte) VIC_DEN
|
||||
(const byte) VIC_DEN#0 VIC_DEN = (byte) $10
|
||||
(byte) VIC_RSEL
|
||||
(const byte) VIC_RSEL#0 VIC_RSEL = (byte) 8
|
||||
(byte) WHITE
|
||||
(const byte) WHITE#0 WHITE = (byte) 1
|
||||
(word()) abs_u16((word) abs_u16::w)
|
||||
(byte~) abs_u16::$0 reg byte a 4.0
|
||||
(byte~) abs_u16::$1 reg byte a 4.0
|
||||
(label) abs_u16::@1
|
||||
(label) abs_u16::@return
|
||||
(word) abs_u16::return
|
||||
(word) abs_u16::return#0 return zp ZP_WORD:20 4.0
|
||||
(word) abs_u16::return#1 return zp ZP_WORD:20 4.0
|
||||
(word) abs_u16::return#2 return zp ZP_WORD:20 4.0
|
||||
(word) abs_u16::return#4 return zp ZP_WORD:20 2.0
|
||||
(word) abs_u16::w
|
||||
(word) abs_u16::w#0 w zp ZP_WORD:20 4.0
|
||||
(word) abs_u16::w#1 w zp ZP_WORD:20 4.0
|
||||
(word) abs_u16::w#2 w zp ZP_WORD:20 2.5
|
||||
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
|
||||
(label) bitmap_clear::@1
|
||||
(label) bitmap_clear::@return
|
||||
(byte) bitmap_clear::bgcol
|
||||
(byte) bitmap_clear::col
|
||||
(const byte) bitmap_clear::col#0 col = (const byte) WHITE#0*(byte) $10
|
||||
(byte) bitmap_clear::fgcol
|
||||
(byte*) bitmap_gfx
|
||||
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
|
||||
(byte~) bitmap_init::$4 reg byte a 22.0
|
||||
(byte~) bitmap_init::$5 reg byte a 22.0
|
||||
(byte~) bitmap_init::$6 reg byte a 22.0
|
||||
(byte~) bitmap_init::$7 $7 zp ZP_BYTE:56 5.5
|
||||
(label) bitmap_init::@1
|
||||
(label) bitmap_init::@2
|
||||
(label) bitmap_init::@3
|
||||
(label) bitmap_init::@4
|
||||
(label) bitmap_init::@5
|
||||
(label) bitmap_init::@6
|
||||
(label) bitmap_init::@return
|
||||
(byte) bitmap_init::bits
|
||||
(byte) bitmap_init::bits#1 reg byte a 11.0
|
||||
(byte) bitmap_init::bits#3 reg byte a 16.5
|
||||
(byte) bitmap_init::bits#4 reg byte a 7.333333333333333
|
||||
(byte*) bitmap_init::gfx
|
||||
(byte*) bitmap_init::screen
|
||||
(byte) bitmap_init::x
|
||||
(byte) bitmap_init::x#1 reg byte x 16.5
|
||||
(byte) bitmap_init::x#2 reg byte x 5.5
|
||||
(byte) bitmap_init::y
|
||||
(byte) bitmap_init::y#1 reg byte x 16.5
|
||||
(byte) bitmap_init::y#2 reg byte x 5.5
|
||||
(byte*) bitmap_init::yoffs
|
||||
(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:30 22.0
|
||||
(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:30 6.875
|
||||
(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:30 11.0
|
||||
(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2)
|
||||
(label) bitmap_line::@1
|
||||
(label) bitmap_line::@10
|
||||
(label) bitmap_line::@11
|
||||
(label) bitmap_line::@12
|
||||
(label) bitmap_line::@13
|
||||
(label) bitmap_line::@14
|
||||
(label) bitmap_line::@15
|
||||
(label) bitmap_line::@16
|
||||
(label) bitmap_line::@17
|
||||
(label) bitmap_line::@18
|
||||
(label) bitmap_line::@2
|
||||
(label) bitmap_line::@3
|
||||
(label) bitmap_line::@4
|
||||
(label) bitmap_line::@5
|
||||
(label) bitmap_line::@6
|
||||
(label) bitmap_line::@7
|
||||
(label) bitmap_line::@8
|
||||
(label) bitmap_line::@9
|
||||
(label) bitmap_line::@return
|
||||
(word) bitmap_line::dx
|
||||
(word) bitmap_line::dx#0 dx zp ZP_WORD:40 7.775
|
||||
(word) bitmap_line::dy
|
||||
(word) bitmap_line::dy#0 dy zp ZP_WORD:20 8.638888888888888
|
||||
(word) bitmap_line::e
|
||||
(word) bitmap_line::e#0 e zp ZP_WORD:12 4.0
|
||||
(word) bitmap_line::e#1 e zp ZP_WORD:12 134.66666666666666
|
||||
(word) bitmap_line::e#2 e zp ZP_WORD:12 202.0
|
||||
(word) bitmap_line::e#3 e zp ZP_WORD:12 40.8
|
||||
(word) bitmap_line::e#6 e zp ZP_WORD:12 151.5
|
||||
(word) bitmap_line::e1
|
||||
(word) bitmap_line::e1#0 e1 zp ZP_WORD:14 4.0
|
||||
(word) bitmap_line::e1#1 e1 zp ZP_WORD:14 134.66666666666666
|
||||
(word) bitmap_line::e1#2 e1 zp ZP_WORD:14 202.0
|
||||
(word) bitmap_line::e1#3 e1 zp ZP_WORD:14 40.8
|
||||
(word) bitmap_line::e1#6 e1 zp ZP_WORD:14 151.5
|
||||
(word) bitmap_line::sx
|
||||
(word) bitmap_line::sx#0 sx zp ZP_WORD:42 6.800000000000001
|
||||
(word) bitmap_line::sy
|
||||
(word) bitmap_line::sy#0 sy zp ZP_WORD:18 7.846153846153847
|
||||
(word) bitmap_line::x
|
||||
(word) bitmap_line::x#0 x zp ZP_WORD:3 5.304347826086959
|
||||
(word) bitmap_line::x#1 x zp ZP_WORD:3 101.0
|
||||
(word) bitmap_line::x#12 x zp ZP_WORD:3 202.0
|
||||
(word) bitmap_line::x#13 x zp ZP_WORD:3 58.00000000000001
|
||||
(word) bitmap_line::x#15 x zp ZP_WORD:3 57.714285714285715
|
||||
(word) bitmap_line::x#6 x zp ZP_WORD:3 102.0
|
||||
(word) bitmap_line::x#7 x zp ZP_WORD:3 76.25
|
||||
(word) bitmap_line::x1
|
||||
(word) bitmap_line::x1#0 x1 zp ZP_WORD:3 5.5
|
||||
(word) bitmap_line::x1#1 x1 zp ZP_WORD:3 50.5
|
||||
(word) bitmap_line::x2
|
||||
(word) bitmap_line::x2#0 x2 zp ZP_WORD:8 11.0
|
||||
(word) bitmap_line::x2#1 x2 zp ZP_WORD:8 101.0
|
||||
(word) bitmap_line::x2#10 x2 zp ZP_WORD:8 6.78125
|
||||
(word) bitmap_line::y
|
||||
(word) bitmap_line::y#0 y zp ZP_WORD:5 5.454545454545454
|
||||
(word) bitmap_line::y#1 y zp ZP_WORD:5 57.714285714285715
|
||||
(word) bitmap_line::y#13 y zp ZP_WORD:5 202.0
|
||||
(word) bitmap_line::y#15 y zp ZP_WORD:5 43.57142857142858
|
||||
(word) bitmap_line::y#2 y zp ZP_WORD:5 101.0
|
||||
(word) bitmap_line::y#4 y zp ZP_WORD:5 51.0
|
||||
(word) bitmap_line::y#7 y zp ZP_WORD:5 202.0
|
||||
(word) bitmap_line::y1
|
||||
(word) bitmap_line::y1#0 y1 zp ZP_WORD:5 7.333333333333333
|
||||
(word) bitmap_line::y1#1 y1 zp ZP_WORD:5 67.33333333333333
|
||||
(word) bitmap_line::y2
|
||||
(word) bitmap_line::y2#0 y2 zp ZP_WORD:10 22.0
|
||||
(word) bitmap_line::y2#1 y2 zp ZP_WORD:10 202.0
|
||||
(word) bitmap_line::y2#11 y2 zp ZP_WORD:10 6.78125
|
||||
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
|
||||
(word~) bitmap_plot::$1 $1 zp ZP_WORD:46 4.0
|
||||
(byte~) bitmap_plot::$2 reg byte a 4.0
|
||||
(label) bitmap_plot::@return
|
||||
(byte*) bitmap_plot::plotter
|
||||
(word) bitmap_plot::plotter#0 plotter zp ZP_WORD:44 1.0
|
||||
(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:44 3.0
|
||||
(word) bitmap_plot::x
|
||||
(word) bitmap_plot::x#0 x zp ZP_WORD:3 4.0
|
||||
(word) bitmap_plot::x#1 x zp ZP_WORD:3 202.0
|
||||
(word) bitmap_plot::x#2 x zp ZP_WORD:3 4.0
|
||||
(word) bitmap_plot::x#3 x zp ZP_WORD:3 202.0
|
||||
(word) bitmap_plot::x#4 x zp ZP_WORD:3 52.5
|
||||
(byte) bitmap_plot::y
|
||||
(byte) bitmap_plot::y#0 reg byte x 2.0
|
||||
(byte) bitmap_plot::y#1 reg byte x 101.0
|
||||
(byte) bitmap_plot::y#2 reg byte x 2.0
|
||||
(byte) bitmap_plot::y#3 reg byte x 101.0
|
||||
(byte) bitmap_plot::y#4 reg byte x 210.0
|
||||
(byte[$100]) bitmap_plot_bit
|
||||
(const byte[$100]) bitmap_plot_bit#0 bitmap_plot_bit = { fill( $100, 0) }
|
||||
(void()) bitmap_plot_spline_8seg()
|
||||
(byte~) bitmap_plot_spline_8seg::$7 reg byte x 151.5
|
||||
(label) bitmap_plot_spline_8seg::@1
|
||||
(label) bitmap_plot_spline_8seg::@2
|
||||
(label) bitmap_plot_spline_8seg::@3
|
||||
(label) bitmap_plot_spline_8seg::@return
|
||||
(signed word) bitmap_plot_spline_8seg::current_x
|
||||
(signed word) bitmap_plot_spline_8seg::current_x#0 current_x zp ZP_WORD:3 2.0
|
||||
(signed word) bitmap_plot_spline_8seg::current_x#2 current_x zp ZP_WORD:3 25.75
|
||||
(signed word~) bitmap_plot_spline_8seg::current_x#4 current_x zp ZP_WORD:3 101.0
|
||||
(signed word) bitmap_plot_spline_8seg::current_y
|
||||
(signed word) bitmap_plot_spline_8seg::current_y#0 current_y zp ZP_WORD:5 4.0
|
||||
(signed word) bitmap_plot_spline_8seg::current_y#2 current_y zp ZP_WORD:5 20.599999999999998
|
||||
(signed word~) bitmap_plot_spline_8seg::current_y#4 current_y zp ZP_WORD:5 202.0
|
||||
(byte) bitmap_plot_spline_8seg::n
|
||||
(byte) bitmap_plot_spline_8seg::n#1 n zp ZP_BYTE:7 75.75
|
||||
(byte) bitmap_plot_spline_8seg::n#2 n zp ZP_BYTE:7 33.666666666666664
|
||||
(signed word) bitmap_plot_spline_8seg::to_x
|
||||
(signed word) bitmap_plot_spline_8seg::to_x#0 to_x zp ZP_WORD:36 22.444444444444443
|
||||
(signed word) bitmap_plot_spline_8seg::to_y
|
||||
(signed word) bitmap_plot_spline_8seg::to_y#0 to_y zp ZP_WORD:38 22.444444444444443
|
||||
(byte[$100]) bitmap_plot_yhi
|
||||
(const byte[$100]) bitmap_plot_yhi#0 bitmap_plot_yhi = { fill( $100, 0) }
|
||||
(byte[$100]) bitmap_plot_ylo
|
||||
(const byte[$100]) bitmap_plot_ylo#0 bitmap_plot_ylo = { fill( $100, 0) }
|
||||
(byte*) bitmap_screen
|
||||
(struct Segment[$15]) letter_c
|
||||
(const struct Segment[$15]) letter_c#0 letter_c = { fill( $15, 0) }
|
||||
(void()) main()
|
||||
(byte) main::$206 reg byte a 22.0
|
||||
(byte~) main::$44 reg byte y 13.2
|
||||
(label) main::@1
|
||||
(label) main::@10
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@7
|
||||
(label) main::@8
|
||||
(label) main::@9
|
||||
(signed word) main::current_x
|
||||
(signed word) main::current_x#4 current_x zp ZP_WORD:3 2.2
|
||||
(signed word) main::current_x#8 current_x#8 zp ZP_WORD:32 1.5
|
||||
(signed word~) main::current_x#9 current_x zp ZP_WORD:3 11.0
|
||||
(signed word) main::current_y
|
||||
(signed word) main::current_y#4 current_y zp ZP_WORD:5 1.8333333333333333
|
||||
(signed word) main::current_y#8 current_y#8 zp ZP_WORD:34 1.5
|
||||
(signed word~) main::current_y#9 current_y zp ZP_WORD:5 22.0
|
||||
(byte) main::i
|
||||
(byte) main::i#1 i zp ZP_BYTE:2 8.25
|
||||
(byte) main::i#10 i zp ZP_BYTE:2 1.8333333333333333
|
||||
(signed word) main::segment_to_x
|
||||
(signed word) main::segment_to_y
|
||||
(byte) main::segment_type
|
||||
(byte) main::segment_type#0 reg byte x 5.5
|
||||
(signed word) main::segment_via_x
|
||||
(signed word) main::segment_via_x#0 segment_via_x zp ZP_WORD:22 3.6666666666666665
|
||||
(signed word) main::segment_via_y
|
||||
(signed word) main::segment_via_y#0 segment_via_y zp ZP_WORD:24 3.6666666666666665
|
||||
(signed word) main::to1_x
|
||||
(signed word) main::to1_y
|
||||
(label) main::toD0181
|
||||
(word~) main::toD0181_$0
|
||||
(number~) main::toD0181_$1
|
||||
(number~) main::toD0181_$2
|
||||
(number~) main::toD0181_$3
|
||||
(word~) main::toD0181_$4
|
||||
(byte~) main::toD0181_$5
|
||||
(number~) main::toD0181_$6
|
||||
(number~) main::toD0181_$7
|
||||
(number~) main::toD0181_$8
|
||||
(byte*) main::toD0181_gfx
|
||||
(byte) main::toD0181_return
|
||||
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) BITMAP_SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP_GRAPHICS#0/(byte) 4&(byte) $f
|
||||
(byte*) main::toD0181_screen
|
||||
(signed word) main::to_x
|
||||
(signed word) main::to_y
|
||||
(signed word) main::via_x
|
||||
(signed word) main::via_y
|
||||
(label) main::vicSelectGfxBank1
|
||||
(byte~) main::vicSelectGfxBank1_$0
|
||||
(label) main::vicSelectGfxBank1_@1
|
||||
(byte*) main::vicSelectGfxBank1_gfx
|
||||
(label) main::vicSelectGfxBank1_toDd001
|
||||
(word~) main::vicSelectGfxBank1_toDd001_$0
|
||||
(byte~) main::vicSelectGfxBank1_toDd001_$1
|
||||
(number~) main::vicSelectGfxBank1_toDd001_$2
|
||||
(number~) main::vicSelectGfxBank1_toDd001_$3
|
||||
(byte*) main::vicSelectGfxBank1_toDd001_gfx
|
||||
(byte) main::vicSelectGfxBank1_toDd001_return
|
||||
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) BITMAP_SCREEN#0/(byte) $40
|
||||
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
|
||||
(label) memset::@1
|
||||
(label) memset::@2
|
||||
(label) memset::@return
|
||||
(byte) memset::c
|
||||
(byte) memset::c#3 reg byte x 1.375
|
||||
(byte*) memset::dst
|
||||
(byte*) memset::dst#1 dst zp ZP_WORD:28 16.5
|
||||
(byte*) memset::dst#2 dst zp ZP_WORD:28 17.5
|
||||
(byte*~) memset::dst#3 dst zp ZP_WORD:28 4.0
|
||||
(byte*) memset::end
|
||||
(byte*) memset::end#0 end zp ZP_WORD:26 2.1666666666666665
|
||||
(word) memset::num
|
||||
(word) memset::num#2 num zp ZP_WORD:26 2.0
|
||||
(void*) memset::return
|
||||
(void*) memset::str
|
||||
(void*) memset::str#3 str zp ZP_WORD:28
|
||||
(word()) sgn_u16((word) sgn_u16::w)
|
||||
(byte~) sgn_u16::$0 reg byte a 4.0
|
||||
(byte~) sgn_u16::$1 reg byte a 4.0
|
||||
(label) sgn_u16::@1
|
||||
(label) sgn_u16::@return
|
||||
(word) sgn_u16::return
|
||||
(word) sgn_u16::return#0 return zp ZP_WORD:18 4.0
|
||||
(word) sgn_u16::return#1 return zp ZP_WORD:18 4.0
|
||||
(word) sgn_u16::return#4 return zp ZP_WORD:18 1.0
|
||||
(word) sgn_u16::w
|
||||
(word) sgn_u16::w#0 w zp ZP_WORD:16 4.0
|
||||
(word) sgn_u16::w#1 w zp ZP_WORD:16 4.0
|
||||
(word) sgn_u16::w#2 w zp ZP_WORD:16 6.0
|
||||
(void()) spline_8segB((signed word) spline_8segB::p0_x , (signed word) spline_8segB::p0_y , (signed word) spline_8segB::p1_x , (signed word) spline_8segB::p1_y , (signed word) spline_8segB::p2_x , (signed word) spline_8segB::p2_y)
|
||||
(signed word~) spline_8segB::$0 $0 zp ZP_WORD:48 4.0
|
||||
(signed word~) spline_8segB::$1 $1 zp ZP_WORD:48 4.0
|
||||
(signed word~) spline_8segB::$10 $10 zp ZP_WORD:22 4.0
|
||||
(signed word~) spline_8segB::$12 $12 zp ZP_WORD:24 4.0
|
||||
(signed word~) spline_8segB::$18 $18 zp ZP_WORD:3 4.0
|
||||
(signed word~) spline_8segB::$19 $19 zp ZP_WORD:3 1.3333333333333333
|
||||
(signed word~) spline_8segB::$20 $20 zp ZP_WORD:5 4.0
|
||||
(signed word~) spline_8segB::$21 $21 zp ZP_WORD:5 2.0
|
||||
(signed word~) spline_8segB::$22 $22 zp ZP_WORD:52 202.0
|
||||
(signed word~) spline_8segB::$23 $23 zp ZP_WORD:52 50.5
|
||||
(signed word~) spline_8segB::$24 $24 zp ZP_WORD:54 202.0
|
||||
(signed word~) spline_8segB::$25 $25 zp ZP_WORD:54 67.33333333333333
|
||||
(signed word~) spline_8segB::$3 $3 zp ZP_WORD:50 4.0
|
||||
(byte~) spline_8segB::$31 reg byte x 151.5
|
||||
(signed word~) spline_8segB::$4 $4 zp ZP_WORD:50 4.0
|
||||
(signed word~) spline_8segB::$6 $6 zp ZP_WORD:22 4.0
|
||||
(signed word~) spline_8segB::$8 $8 zp ZP_WORD:24 4.0
|
||||
(label) spline_8segB::@1
|
||||
(label) spline_8segB::@2
|
||||
(label) spline_8segB::@return
|
||||
(signed word) spline_8segB::a_x
|
||||
(signed word) spline_8segB::a_x#0 a_x zp ZP_WORD:48 0.5
|
||||
(signed word) spline_8segB::a_y
|
||||
(signed word) spline_8segB::a_y#0 a_y zp ZP_WORD:50 0.6000000000000001
|
||||
(signed word) spline_8segB::b_x
|
||||
(signed word) spline_8segB::b_x#0 b_x zp ZP_WORD:22 1.3333333333333333
|
||||
(signed word) spline_8segB::b_y
|
||||
(signed word) spline_8segB::b_y#0 b_y zp ZP_WORD:24 1.3333333333333333
|
||||
(signed word) spline_8segB::i_x
|
||||
(signed word) spline_8segB::i_x#0 i_x zp ZP_WORD:22 0.5714285714285714
|
||||
(signed word) spline_8segB::i_x#1 i_x zp ZP_WORD:22 50.5
|
||||
(signed word) spline_8segB::i_x#2 i_x zp ZP_WORD:22 30.5
|
||||
(signed word) spline_8segB::i_y
|
||||
(signed word) spline_8segB::i_y#0 i_y zp ZP_WORD:24 0.8
|
||||
(signed word) spline_8segB::i_y#1 i_y zp ZP_WORD:24 67.33333333333333
|
||||
(signed word) spline_8segB::i_y#2 i_y zp ZP_WORD:24 27.727272727272727
|
||||
(signed word) spline_8segB::j_x
|
||||
(signed word) spline_8segB::j_x#0 j_x zp ZP_WORD:48 5.722222222222221
|
||||
(signed word) spline_8segB::j_y
|
||||
(signed word) spline_8segB::j_y#0 j_y zp ZP_WORD:50 6.0588235294117645
|
||||
(byte) spline_8segB::n
|
||||
(byte) spline_8segB::n#1 reg byte y 151.5
|
||||
(byte) spline_8segB::n#2 reg byte y 25.25
|
||||
(struct SplineVector16) spline_8segB::p0
|
||||
(signed word) spline_8segB::p0_x
|
||||
(signed word) spline_8segB::p0_x#0 p0_x zp ZP_WORD:3 0.7727272727272728
|
||||
(signed word) spline_8segB::p0_y
|
||||
(signed word) spline_8segB::p0_y#0 p0_y zp ZP_WORD:5 0.7727272727272728
|
||||
(struct SplineVector16) spline_8segB::p1
|
||||
(signed word) spline_8segB::p1_x
|
||||
(signed word) spline_8segB::p1_x#0 p1_x zp ZP_WORD:22 1.5
|
||||
(signed word) spline_8segB::p1_y
|
||||
(signed word) spline_8segB::p1_y#0 p1_y zp ZP_WORD:24 1.3636363636363638
|
||||
(struct SplineVector16) spline_8segB::p2
|
||||
(signed word) spline_8segB::p2_x
|
||||
(signed word) spline_8segB::p2_x#0 p2_x zp ZP_WORD:32 4.333333333333333
|
||||
(signed word) spline_8segB::p2_y
|
||||
(signed word) spline_8segB::p2_y#0 p2_y zp ZP_WORD:34 2.6
|
||||
(signed word) spline_8segB::p_x
|
||||
(signed word) spline_8segB::p_x#0 p_x zp ZP_WORD:3 2.0
|
||||
(signed word) spline_8segB::p_x#1 p_x zp ZP_WORD:3 34.0
|
||||
(signed word) spline_8segB::p_x#2 p_x zp ZP_WORD:3 38.125
|
||||
(signed word) spline_8segB::p_y
|
||||
(signed word) spline_8segB::p_y#0 p_y zp ZP_WORD:5 4.0
|
||||
(signed word) spline_8segB::p_y#1 p_y zp ZP_WORD:5 29.142857142857142
|
||||
(signed word) spline_8segB::p_y#2 p_y zp ZP_WORD:5 33.888888888888886
|
||||
|
||||
zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
|
||||
zp ZP_WORD:3 [ main::current_x#4 main::current_x#9 bitmap_line::x#7 bitmap_line::x#6 bitmap_line::x#15 bitmap_line::x#13 bitmap_line::x#0 bitmap_line::x1#1 bitmap_line::x1#0 bitmap_line::x#12 bitmap_line::x#1 bitmap_plot::x#4 bitmap_plot::x#3 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 spline_8segB::p0_x#0 bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#4 spline_8segB::p_x#2 spline_8segB::p_x#0 spline_8segB::p_x#1 spline_8segB::$18 spline_8segB::$19 ]
|
||||
zp ZP_WORD:5 [ main::current_y#4 main::current_y#9 bitmap_line::y#15 bitmap_line::y#7 bitmap_line::y#13 bitmap_line::y#4 bitmap_line::y#0 bitmap_line::y1#1 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 spline_8segB::p0_y#0 bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#4 spline_8segB::p_y#2 spline_8segB::p_y#0 spline_8segB::p_y#1 spline_8segB::$20 spline_8segB::$21 ]
|
||||
zp ZP_BYTE:7 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 ]
|
||||
zp ZP_WORD:8 [ bitmap_line::x2#10 bitmap_line::x2#1 bitmap_line::x2#0 ]
|
||||
zp ZP_WORD:10 [ bitmap_line::y2#11 bitmap_line::y2#1 bitmap_line::y2#0 ]
|
||||
zp ZP_WORD:12 [ bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ]
|
||||
zp ZP_WORD:14 [ bitmap_line::e1#3 bitmap_line::e1#6 bitmap_line::e1#0 bitmap_line::e1#2 bitmap_line::e1#1 ]
|
||||
reg byte x [ bitmap_plot::y#4 bitmap_plot::y#3 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ]
|
||||
zp ZP_WORD:16 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ]
|
||||
zp ZP_WORD:18 [ sgn_u16::return#4 sgn_u16::return#0 sgn_u16::return#1 bitmap_line::sy#0 ]
|
||||
zp ZP_WORD:20 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 abs_u16::return#0 abs_u16::return#1 bitmap_line::dy#0 ]
|
||||
reg byte y [ spline_8segB::n#2 spline_8segB::n#1 ]
|
||||
zp ZP_WORD:22 [ spline_8segB::i_x#2 spline_8segB::i_x#0 spline_8segB::i_x#1 spline_8segB::$10 spline_8segB::$6 spline_8segB::b_x#0 main::segment_via_x#0 spline_8segB::p1_x#0 ]
|
||||
zp ZP_WORD:24 [ spline_8segB::i_y#2 spline_8segB::i_y#0 spline_8segB::i_y#1 spline_8segB::$12 spline_8segB::$8 spline_8segB::b_y#0 main::segment_via_y#0 spline_8segB::p1_y#0 ]
|
||||
zp ZP_WORD:26 [ memset::num#2 memset::end#0 ]
|
||||
zp ZP_WORD:28 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ]
|
||||
reg byte x [ memset::c#3 ]
|
||||
reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
|
||||
reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ]
|
||||
reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ]
|
||||
zp ZP_WORD:30 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
|
||||
reg byte a [ main::$206 ]
|
||||
reg byte y [ main::$44 ]
|
||||
reg byte x [ main::segment_type#0 ]
|
||||
zp ZP_WORD:32 [ main::current_x#8 spline_8segB::p2_x#0 ]
|
||||
zp ZP_WORD:34 [ main::current_y#8 spline_8segB::p2_y#0 ]
|
||||
reg byte x [ bitmap_plot_spline_8seg::$7 ]
|
||||
zp ZP_WORD:36 [ bitmap_plot_spline_8seg::to_x#0 ]
|
||||
zp ZP_WORD:38 [ bitmap_plot_spline_8seg::to_y#0 ]
|
||||
zp ZP_WORD:40 [ bitmap_line::dx#0 ]
|
||||
zp ZP_WORD:42 [ bitmap_line::sx#0 ]
|
||||
zp ZP_WORD:44 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 ]
|
||||
zp ZP_WORD:46 [ bitmap_plot::$1 ]
|
||||
reg byte a [ bitmap_plot::$2 ]
|
||||
reg byte a [ sgn_u16::$0 ]
|
||||
reg byte a [ sgn_u16::$1 ]
|
||||
reg byte a [ abs_u16::$0 ]
|
||||
reg byte a [ abs_u16::$1 ]
|
||||
zp ZP_WORD:48 [ spline_8segB::$0 spline_8segB::$1 spline_8segB::a_x#0 spline_8segB::j_x#0 ]
|
||||
zp ZP_WORD:50 [ spline_8segB::$3 spline_8segB::$4 spline_8segB::a_y#0 spline_8segB::j_y#0 ]
|
||||
zp ZP_WORD:52 [ spline_8segB::$22 spline_8segB::$23 ]
|
||||
zp ZP_WORD:54 [ spline_8segB::$24 spline_8segB::$25 ]
|
||||
reg byte x [ spline_8segB::$31 ]
|
||||
zp ZP_BYTE:56 [ bitmap_init::$7 ]
|
||||
reg byte a [ bitmap_init::$4 ]
|
||||
reg byte a [ bitmap_init::$5 ]
|
||||
reg byte a [ bitmap_init::$6 ]
|
@ -120,19 +120,12 @@ render_sine: {
|
||||
lda (sin2_val),y
|
||||
stx sin2_val
|
||||
sta sin2_val+1
|
||||
lda #$a
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda wrap_y.y
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$a
|
||||
sta wrap_y.y
|
||||
lda wrap_y.y+1
|
||||
adc $ff
|
||||
adc #>$a
|
||||
sta wrap_y.y+1
|
||||
jsr wrap_y
|
||||
tax
|
||||
|
@ -4223,19 +4223,12 @@ render_sine: {
|
||||
lda (_3),y
|
||||
sta sin2_val+1
|
||||
// [37] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz2_plus_vbsc1
|
||||
lda #$a
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda sin2_val
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$a
|
||||
sta wrap_y.y
|
||||
lda sin2_val+1
|
||||
adc $ff
|
||||
adc #>$a
|
||||
sta wrap_y.y+1
|
||||
// [38] call wrap_y
|
||||
// [58] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y]
|
||||
@ -6026,30 +6019,30 @@ Uplift Scope [] 0.8: zp ZP_WORD:185 [ rem16u#1 ]
|
||||
Uplift Scope [bitmap_clear]
|
||||
Uplift Scope [main]
|
||||
|
||||
Uplifting [mul16u] best 31086 combination zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:23 [ mul16u::b#1 ] zp ZP_DWORD:112 [ mul16u::return#2 ] zp ZP_DWORD:157 [ mul16u::return#3 ]
|
||||
Uplifting [wrap_y] best 30903 combination zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#2 ]
|
||||
Uplifting [divr16u] best 30693 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:171 [ divr16u::return#2 ] zp ZP_WORD:175 [ divr16u::return#3 ]
|
||||
Uplifting [render_sine] best 30613 combination zp ZP_WORD:66 [ render_sine::$10 ] zp ZP_WORD:68 [ render_sine::$0 ] zp ZP_WORD:70 [ render_sine::sin_val#0 ] zp ZP_WORD:74 [ render_sine::$11 ] zp ZP_WORD:76 [ render_sine::$3 ] zp ZP_WORD:78 [ render_sine::sin2_val#0 ] zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos2#0 ]
|
||||
Uplifting [bitmap_init] best 30103 combination zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:191 [ bitmap_init::$5 ] zp ZP_BYTE:192 [ bitmap_init::$6 ] zp ZP_BYTE:189 [ bitmap_init::$7 ]
|
||||
Uplifting [mul16u] best 30921 combination zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:23 [ mul16u::b#1 ] zp ZP_DWORD:112 [ mul16u::return#2 ] zp ZP_DWORD:157 [ mul16u::return#3 ]
|
||||
Uplifting [wrap_y] best 30738 combination zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#2 ]
|
||||
Uplifting [divr16u] best 30528 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:171 [ divr16u::return#2 ] zp ZP_WORD:175 [ divr16u::return#3 ]
|
||||
Uplifting [render_sine] best 30448 combination zp ZP_WORD:66 [ render_sine::$10 ] zp ZP_WORD:68 [ render_sine::$0 ] zp ZP_WORD:70 [ render_sine::sin_val#0 ] zp ZP_WORD:74 [ render_sine::$11 ] zp ZP_WORD:76 [ render_sine::$3 ] zp ZP_WORD:78 [ render_sine::sin2_val#0 ] zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos2#0 ]
|
||||
Uplifting [bitmap_init] best 29938 combination zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:191 [ bitmap_init::$5 ] zp ZP_BYTE:192 [ bitmap_init::$6 ] zp ZP_BYTE:189 [ bitmap_init::$7 ]
|
||||
Limited combination testing to 100 combinations of 15360 possible.
|
||||
Uplifting [bitmap_plot] best 30036 combination reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] zp ZP_WORD:84 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] zp ZP_WORD:82 [ bitmap_plot::plotter#0 ]
|
||||
Uplifting [sin16s] best 30036 combination zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:98 [ sin16s::return#0 ] zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:125 [ sin16s::$4 ] zp ZP_WORD:133 [ sin16s::x2#0 ] zp ZP_WORD:141 [ sin16s::x3_6#0 ] zp ZP_WORD:147 [ sin16s::x4#0 ] zp ZP_WORD:151 [ sin16s::x5#0 ] zp ZP_WORD:153 [ sin16s::x5_128#0 ] zp ZP_WORD:137 [ sin16s::x3#0 ] zp ZP_WORD:155 [ sin16s::usinx#1 ] zp ZP_WORD:129 [ sin16s::x1#0 ] zp ZP_WORD:143 [ sin16s::usinx#0 ] zp ZP_BYTE:35 [ sin16s::isUpper#2 ]
|
||||
Uplifting [mulu16_sel] best 30020 combination zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:131 [ mulu16_sel::return#0 ] zp ZP_WORD:135 [ mulu16_sel::return#1 ] zp ZP_WORD:139 [ mulu16_sel::return#2 ] zp ZP_WORD:145 [ mulu16_sel::return#10 ] zp ZP_WORD:149 [ mulu16_sel::return#11 ] zp ZP_DWORD:161 [ mulu16_sel::$0 ] zp ZP_DWORD:165 [ mulu16_sel::$1 ] zp ZP_WORD:169 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ]
|
||||
Uplifting [sin16s_gen2] best 30020 combination zp ZP_DWORD:106 [ sin16s_gen2::$5 ] zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:110 [ sin16s_gen2::$8 ] zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:94 [ sin16s_gen2::step#0 ]
|
||||
Uplifting [mul16s] best 30020 combination zp ZP_DWORD:102 [ mul16s::return#2 ] zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:120 [ mul16s::return#0 ] zp ZP_WORD:116 [ mul16s::$9 ] zp ZP_WORD:118 [ mul16s::$16 ] zp ZP_WORD:100 [ mul16s::a#0 ]
|
||||
Uplifting [memset] best 30004 combination zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:187 [ memset::end#0 ] zp ZP_WORD:54 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:56 [ memset::str#3 ]
|
||||
Uplifting [div32u16u] best 30004 combination zp ZP_DWORD:90 [ div32u16u::return#2 ] zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:179 [ div32u16u::return#0 ] zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ]
|
||||
Uplifting [] best 30004 combination zp ZP_WORD:185 [ rem16u#1 ]
|
||||
Uplifting [bitmap_clear] best 30004 combination
|
||||
Uplifting [main] best 30004 combination
|
||||
Uplifting [bitmap_plot] best 29871 combination reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] zp ZP_WORD:84 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] zp ZP_WORD:82 [ bitmap_plot::plotter#0 ]
|
||||
Uplifting [sin16s] best 29871 combination zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:98 [ sin16s::return#0 ] zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:125 [ sin16s::$4 ] zp ZP_WORD:133 [ sin16s::x2#0 ] zp ZP_WORD:141 [ sin16s::x3_6#0 ] zp ZP_WORD:147 [ sin16s::x4#0 ] zp ZP_WORD:151 [ sin16s::x5#0 ] zp ZP_WORD:153 [ sin16s::x5_128#0 ] zp ZP_WORD:137 [ sin16s::x3#0 ] zp ZP_WORD:155 [ sin16s::usinx#1 ] zp ZP_WORD:129 [ sin16s::x1#0 ] zp ZP_WORD:143 [ sin16s::usinx#0 ] zp ZP_BYTE:35 [ sin16s::isUpper#2 ]
|
||||
Uplifting [mulu16_sel] best 29855 combination zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:131 [ mulu16_sel::return#0 ] zp ZP_WORD:135 [ mulu16_sel::return#1 ] zp ZP_WORD:139 [ mulu16_sel::return#2 ] zp ZP_WORD:145 [ mulu16_sel::return#10 ] zp ZP_WORD:149 [ mulu16_sel::return#11 ] zp ZP_DWORD:161 [ mulu16_sel::$0 ] zp ZP_DWORD:165 [ mulu16_sel::$1 ] zp ZP_WORD:169 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ]
|
||||
Uplifting [sin16s_gen2] best 29855 combination zp ZP_DWORD:106 [ sin16s_gen2::$5 ] zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:110 [ sin16s_gen2::$8 ] zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:94 [ sin16s_gen2::step#0 ]
|
||||
Uplifting [mul16s] best 29855 combination zp ZP_DWORD:102 [ mul16s::return#2 ] zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:120 [ mul16s::return#0 ] zp ZP_WORD:116 [ mul16s::$9 ] zp ZP_WORD:118 [ mul16s::$16 ] zp ZP_WORD:100 [ mul16s::a#0 ]
|
||||
Uplifting [memset] best 29839 combination zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:187 [ memset::end#0 ] zp ZP_WORD:54 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:56 [ memset::str#3 ]
|
||||
Uplifting [div32u16u] best 29839 combination zp ZP_DWORD:90 [ div32u16u::return#2 ] zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:179 [ div32u16u::return#0 ] zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ]
|
||||
Uplifting [] best 29839 combination zp ZP_WORD:185 [ rem16u#1 ]
|
||||
Uplifting [bitmap_clear] best 29839 combination
|
||||
Uplifting [main] best 29839 combination
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:191 [ bitmap_init::$5 ]
|
||||
Uplifting [bitmap_init] best 29944 combination reg byte a [ bitmap_init::$5 ]
|
||||
Uplifting [bitmap_init] best 29779 combination reg byte a [ bitmap_init::$5 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:192 [ bitmap_init::$6 ]
|
||||
Uplifting [bitmap_init] best 29884 combination reg byte a [ bitmap_init::$6 ]
|
||||
Uplifting [bitmap_init] best 29719 combination reg byte a [ bitmap_init::$6 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:189 [ bitmap_init::$7 ]
|
||||
Uplifting [bitmap_init] best 29884 combination zp ZP_BYTE:189 [ bitmap_init::$7 ]
|
||||
Uplifting [bitmap_init] best 29719 combination zp ZP_BYTE:189 [ bitmap_init::$7 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:35 [ sin16s::isUpper#2 ]
|
||||
Uplifting [sin16s] best 29884 combination zp ZP_BYTE:35 [ sin16s::isUpper#2 ]
|
||||
Uplifting [sin16s] best 29719 combination zp ZP_BYTE:35 [ sin16s::isUpper#2 ]
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] ] with [ zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] ] - score: 2
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:155 [ sin16s::usinx#1 ] ] - score: 2
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:137 [ sin16s::x3#0 ] ] - score: 2
|
||||
@ -6363,19 +6356,12 @@ render_sine: {
|
||||
stx sin2_val
|
||||
sta sin2_val+1
|
||||
// [37] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1
|
||||
lda #$a
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda wrap_y.y
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$a
|
||||
sta wrap_y.y
|
||||
lda wrap_y.y+1
|
||||
adc $ff
|
||||
adc #>$a
|
||||
sta wrap_y.y+1
|
||||
// [38] call wrap_y
|
||||
// [58] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y]
|
||||
@ -7844,8 +7830,8 @@ Removing instruction b12:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing unreachable instruction rts
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
Fixing long branch [159] bcc b1 to bcs
|
||||
Fixing long branch [165] bcc b1 to bcs
|
||||
Fixing long branch [152] bcc b1 to bcs
|
||||
Fixing long branch [158] bcc b1 to bcs
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
@ -8304,7 +8290,7 @@ reg byte a [ bitmap_init::$6 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 24804
|
||||
Score: 24639
|
||||
|
||||
// File Comments
|
||||
// Generate a big sinus and plot it on a bitmap
|
||||
@ -8521,19 +8507,12 @@ render_sine: {
|
||||
sta sin2_val+1
|
||||
// wrap_y(sin2_val+10)
|
||||
// [37] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1
|
||||
lda #$a
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda wrap_y.y
|
||||
adc $fe
|
||||
clc
|
||||
adc #<$a
|
||||
sta wrap_y.y
|
||||
lda wrap_y.y+1
|
||||
adc $ff
|
||||
adc #>$a
|
||||
sta wrap_y.y+1
|
||||
// [38] call wrap_y
|
||||
// [58] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y]
|
||||
|
17
src/test/ref/struct-8.asm
Normal file
17
src/test/ref/struct-8.asm
Normal file
@ -0,0 +1,17 @@
|
||||
// Minimal struct - nested struct where a sub-struct is assigned out
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = 5
|
||||
.label SCREEN = $400
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
lda #c_radius
|
||||
sta SCREEN+1
|
||||
rts
|
||||
}
|
17
src/test/ref/struct-8.cfg
Normal file
17
src/test/ref/struct-8.cfg
Normal file
@ -0,0 +1,17 @@
|
||||
@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] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0
|
||||
[5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0
|
||||
[6] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c_radius#0
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
[7] return
|
||||
to:@return
|
364
src/test/ref/struct-8.log
Normal file
364
src/test/ref/struct-8.log
Normal file
@ -0,0 +1,364 @@
|
||||
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
|
||||
Created struct value member variable (struct Point) main::c_center
|
||||
Created struct value member variable (byte) main::c_radius
|
||||
Converted struct value to member variables (struct Circle) main::c
|
||||
Created struct value member variable (byte) main::point_x
|
||||
Created struct value member variable (byte) main::point_y
|
||||
Converted struct value to member variables (struct Point) main::point
|
||||
Adding struct value list initializer (byte) main::p_x ← (number) $a
|
||||
Adding struct value list initializer (byte) main::p_y ← (number) $a
|
||||
Adding struct value list initializer (struct Point) main::c_center ← (struct Point) main::p
|
||||
Adding struct value list initializer (byte) main::c_radius ← (number) 5
|
||||
Replacing struct member reference (struct Circle) main::c.center with member variable reference (struct Point) main::c_center
|
||||
Replacing struct member reference (struct Point) main::point.x with member variable reference (byte) main::point_x
|
||||
Replacing struct member reference (struct Point) main::point.y with member variable reference (byte) main::point_y
|
||||
Replacing struct member reference (struct Circle) main::c.radius with member variable reference (byte) main::c_radius
|
||||
Created struct value member variable (byte) main::c_center_x
|
||||
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 copy (byte) main::c_center_x ← (byte) main::p_x
|
||||
Adding struct value member variable copy (byte) main::c_center_y ← (byte) main::p_y
|
||||
Adding struct value member variable copy (byte) main::point_x ← (byte) main::c_center_x
|
||||
Adding struct value member variable copy (byte) main::point_y ← (byte) main::c_center_y
|
||||
Identified constant variable (byte) main::p_x
|
||||
Identified constant variable (byte) main::p_y
|
||||
Identified constant variable (byte) main::c_radius
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
(byte) main::p_x#0 ← (number) $a
|
||||
(byte) main::p_y#0 ← (number) $a
|
||||
(byte) main::c_center_x#0 ← (byte) main::p_x#0
|
||||
(byte) main::c_center_y#0 ← (byte) main::p_y#0
|
||||
(byte) main::c_radius#0 ← (number) 5
|
||||
(byte) main::point_x#0 ← (byte) main::c_center_x#0
|
||||
(byte) main::point_y#0 ← (byte) main::c_center_y#0
|
||||
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
|
||||
*((byte*) main::SCREEN#0 + (number) 0) ← (byte) main::point_x#0
|
||||
*((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::point_y#0
|
||||
*((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::c_radius#0
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(byte*) main::SCREEN#0
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_x#0
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_center_y#0
|
||||
(byte) main::c_radius
|
||||
(byte) main::c_radius#0
|
||||
(byte) main::p_x
|
||||
(byte) main::p_x#0
|
||||
(byte) main::p_y
|
||||
(byte) main::p_y#0
|
||||
(byte) main::point_x
|
||||
(byte) main::point_x#0
|
||||
(byte) main::point_y
|
||||
(byte) main::point_y#0
|
||||
|
||||
Adding number conversion cast (unumber) $a in (byte) main::p_x#0 ← (number) $a
|
||||
Adding number conversion cast (unumber) $a in (byte) main::p_y#0 ← (number) $a
|
||||
Adding number conversion cast (unumber) 5 in (byte) main::c_radius#0 ← (number) 5
|
||||
Adding number conversion cast (unumber) 0 in *((byte*) main::SCREEN#0 + (number) 0) ← (byte) main::point_x#0
|
||||
Adding number conversion cast (unumber) 1 in *((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::point_y#0
|
||||
Adding number conversion cast (unumber) 1 in *((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::c_radius#0
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Inlining cast (byte) main::p_x#0 ← (unumber)(number) $a
|
||||
Inlining cast (byte) main::p_y#0 ← (unumber)(number) $a
|
||||
Inlining cast (byte) main::c_radius#0 ← (unumber)(number) 5
|
||||
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant integer cast $a
|
||||
Simplifying constant integer cast $a
|
||||
Simplifying constant integer cast 5
|
||||
Simplifying constant pointer cast (byte*) 1024
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant integer cast 1
|
||||
Simplifying constant integer cast 1
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
Finalized unsigned number type (byte) $a
|
||||
Finalized unsigned number type (byte) $a
|
||||
Finalized unsigned number type (byte) 5
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) 1
|
||||
Finalized unsigned number type (byte) 1
|
||||
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
||||
Alias (byte) main::p_x#0 = (byte) main::c_center_x#0 (byte) main::point_x#0
|
||||
Alias (byte) main::p_y#0 = (byte) main::c_center_y#0 (byte) main::point_y#0
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Constant (const byte) main::p_x#0 = $a
|
||||
Constant (const byte) main::p_y#0 = $a
|
||||
Constant (const byte) main::c_radius#0 = 5
|
||||
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Simplifying expression containing zero main::SCREEN#0 in [8] *((const byte*) main::SCREEN#0 + (byte) 0) ← (const byte) main::p_x#0
|
||||
Successful SSA optimization PassNSimplifyExpressionWithZero
|
||||
Consolidated array index constant in *(main::SCREEN#0+1)
|
||||
Consolidated array index constant in *(main::SCREEN#0+1)
|
||||
Successful SSA optimization Pass2ConstantAdditionElimination
|
||||
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 @end
|
||||
CALL GRAPH
|
||||
Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Culled Empty Block (label) @2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
|
||||
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] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0
|
||||
[5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0
|
||||
[6] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c_radius#0
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
[7] return
|
||||
to:@return
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(byte*) main::SCREEN
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_radius
|
||||
(byte) main::p_x
|
||||
(byte) main::p_y
|
||||
(byte) main::point_x
|
||||
(byte) main::point_y
|
||||
|
||||
Initial phi equivalence classes
|
||||
Complete equivalence classes
|
||||
|
||||
INITIAL ASM
|
||||
// File Comments
|
||||
// Minimal struct - nested struct where a sub-struct is assigned out
|
||||
// Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
// @begin
|
||||
bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
// @1
|
||||
b1:
|
||||
// [2] call main
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
// @end
|
||||
bend:
|
||||
// main
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = 5
|
||||
.label SCREEN = $400
|
||||
// [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
// [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
// [6] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c_radius#0 -- _deref_pbuc1=vbuc2
|
||||
lda #c_radius
|
||||
sta SCREEN+1
|
||||
jmp breturn
|
||||
// main::@return
|
||||
breturn:
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [6] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c_radius#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [Point]
|
||||
Uplift Scope [Circle]
|
||||
Uplift Scope [main]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [Point] best 39 combination
|
||||
Uplifting [Circle] best 39 combination
|
||||
Uplifting [main] best 39 combination
|
||||
Uplifting [] best 39 combination
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
// File Comments
|
||||
// Minimal struct - nested struct where a sub-struct is assigned out
|
||||
// Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
// @begin
|
||||
bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
// @1
|
||||
b1:
|
||||
// [2] call main
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
// @end
|
||||
bend:
|
||||
// main
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = 5
|
||||
.label SCREEN = $400
|
||||
// [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
// [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
// [6] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c_radius#0 -- _deref_pbuc1=vbuc2
|
||||
lda #c_radius
|
||||
sta SCREEN+1
|
||||
jmp breturn
|
||||
// main::@return
|
||||
breturn:
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
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
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_radius
|
||||
(const byte) main::c_radius#0 c_radius = (byte) 5
|
||||
(byte) main::p_x
|
||||
(const byte) main::p_x#0 p_x = (byte) $a
|
||||
(byte) main::p_y
|
||||
(const byte) main::p_y#0 p_y = (byte) $a
|
||||
(byte) main::point_x
|
||||
(byte) main::point_y
|
||||
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 24
|
||||
|
||||
// File Comments
|
||||
// Minimal struct - nested struct where a sub-struct is assigned out
|
||||
// Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
// @begin
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
// @1
|
||||
// [2] call main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
// @end
|
||||
// main
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = 5
|
||||
.label SCREEN = $400
|
||||
// SCREEN[0] = point.x
|
||||
// [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
// SCREEN[1] = point.y
|
||||
// [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
// SCREEN[1] = c.radius
|
||||
// [6] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c_radius#0 -- _deref_pbuc1=vbuc2
|
||||
lda #c_radius
|
||||
sta SCREEN+1
|
||||
// main::@return
|
||||
// }
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
22
src/test/ref/struct-8.sym
Normal file
22
src/test/ref/struct-8.sym
Normal file
@ -0,0 +1,22 @@
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_radius
|
||||
(const byte) main::c_radius#0 c_radius = (byte) 5
|
||||
(byte) main::p_x
|
||||
(const byte) main::p_x#0 p_x = (byte) $a
|
||||
(byte) main::p_y
|
||||
(const byte) main::p_y#0 p_y = (byte) $a
|
||||
(byte) main::point_x
|
||||
(byte) main::point_y
|
||||
|
17
src/test/ref/struct-9.asm
Normal file
17
src/test/ref/struct-9.asm
Normal file
@ -0,0 +1,17 @@
|
||||
// Minimal struct - nesting structs
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = $c
|
||||
.label SCREEN = $400
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
lda #c_radius
|
||||
sta SCREEN+2
|
||||
rts
|
||||
}
|
17
src/test/ref/struct-9.cfg
Normal file
17
src/test/ref/struct-9.cfg
Normal file
@ -0,0 +1,17 @@
|
||||
@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] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0
|
||||
[5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0
|
||||
[6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) main::c_radius#1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
[7] return
|
||||
to:@return
|
366
src/test/ref/struct-9.log
Normal file
366
src/test/ref/struct-9.log
Normal file
@ -0,0 +1,366 @@
|
||||
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
|
||||
Created struct value member variable (struct Point) main::c_center
|
||||
Created struct value member variable (byte) main::c_radius
|
||||
Converted struct value to member variables (struct Circle) main::c
|
||||
Adding struct value list initializer (byte) main::p_x ← (number) $a
|
||||
Adding struct value list initializer (byte) main::p_y ← (number) $a
|
||||
Adding struct value member variable default initializer (struct Point) main::c_center ← {}
|
||||
Adding struct value member variable default initializer (byte) main::c_radius ← (byte) 0
|
||||
Replacing struct member reference (struct Circle) main::c.center with member variable reference (struct Point) main::c_center
|
||||
Replacing struct member reference (struct Circle) main::c.radius with member variable reference (byte) main::c_radius
|
||||
Replacing struct member reference (struct Circle) main::c.center with member variable reference (struct Point) main::c_center
|
||||
Replacing struct member reference (struct Circle) main::c.center with member variable reference (struct Point) main::c_center
|
||||
Replacing struct member reference (struct Circle) main::c.radius with member variable reference (byte) main::c_radius
|
||||
Created struct value member variable (byte) main::c_center_x
|
||||
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 struct value member variable copy (byte) main::c_center_x ← (byte) main::p_x
|
||||
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
|
||||
Identified constant variable (byte) main::p_x
|
||||
Identified constant variable (byte) main::p_y
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
(byte) main::p_x#0 ← (number) $a
|
||||
(byte) main::p_y#0 ← (number) $a
|
||||
(byte) main::c_center_x#0 ← (byte) 0
|
||||
(byte) main::c_center_y#0 ← (byte) 0
|
||||
(byte) main::c_radius#0 ← (byte) 0
|
||||
(byte) main::c_center_x#1 ← (byte) main::p_x#0
|
||||
(byte) main::c_center_y#1 ← (byte) main::p_y#0
|
||||
(byte) main::c_radius#1 ← (number) $c
|
||||
(byte*) main::SCREEN#0 ← ((byte*)) (number) $400
|
||||
*((byte*) main::SCREEN#0 + (number) 0) ← (byte) main::c_center_x#1
|
||||
*((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::c_center_y#1
|
||||
*((byte*) main::SCREEN#0 + (number) 2) ← (byte) main::c_radius#1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(byte*) main::SCREEN#0
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_x#0
|
||||
(byte) main::c_center_x#1
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_center_y#0
|
||||
(byte) main::c_center_y#1
|
||||
(byte) main::c_radius
|
||||
(byte) main::c_radius#0
|
||||
(byte) main::c_radius#1
|
||||
(byte) main::p_x
|
||||
(byte) main::p_x#0
|
||||
(byte) main::p_y
|
||||
(byte) main::p_y#0
|
||||
|
||||
Adding number conversion cast (unumber) $a in (byte) main::p_x#0 ← (number) $a
|
||||
Adding number conversion cast (unumber) $a in (byte) main::p_y#0 ← (number) $a
|
||||
Adding number conversion cast (unumber) $c in (byte) main::c_radius#1 ← (number) $c
|
||||
Adding number conversion cast (unumber) 0 in *((byte*) main::SCREEN#0 + (number) 0) ← (byte) main::c_center_x#1
|
||||
Adding number conversion cast (unumber) 1 in *((byte*) main::SCREEN#0 + (number) 1) ← (byte) main::c_center_y#1
|
||||
Adding number conversion cast (unumber) 2 in *((byte*) main::SCREEN#0 + (number) 2) ← (byte) main::c_radius#1
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Inlining cast (byte) main::p_x#0 ← (unumber)(number) $a
|
||||
Inlining cast (byte) main::p_y#0 ← (unumber)(number) $a
|
||||
Inlining cast (byte) main::c_radius#1 ← (unumber)(number) $c
|
||||
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant integer cast $a
|
||||
Simplifying constant integer cast $a
|
||||
Simplifying constant integer cast $c
|
||||
Simplifying constant pointer cast (byte*) 1024
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant integer cast 1
|
||||
Simplifying constant integer cast 2
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
Finalized unsigned number type (byte) $a
|
||||
Finalized unsigned number type (byte) $a
|
||||
Finalized unsigned number type (byte) $c
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) 1
|
||||
Finalized unsigned number type (byte) 2
|
||||
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
||||
Alias (byte) main::p_x#0 = (byte) main::c_center_x#1
|
||||
Alias (byte) main::p_y#0 = (byte) main::c_center_y#1
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Constant (const byte) main::p_x#0 = $a
|
||||
Constant (const byte) main::p_y#0 = $a
|
||||
Constant (const byte) main::c_center_x#0 = 0
|
||||
Constant (const byte) main::c_center_y#0 = 0
|
||||
Constant (const byte) main::c_radius#0 = 0
|
||||
Constant (const byte) main::c_radius#1 = $c
|
||||
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Simplifying expression containing zero main::SCREEN#0 in [9] *((const byte*) main::SCREEN#0 + (byte) 0) ← (const byte) main::p_x#0
|
||||
Successful SSA optimization PassNSimplifyExpressionWithZero
|
||||
Eliminating unused constant (const byte) main::c_center_x#0
|
||||
Eliminating unused constant (const byte) main::c_center_y#0
|
||||
Eliminating unused constant (const byte) main::c_radius#0
|
||||
Successful SSA optimization PassNEliminateUnusedVars
|
||||
Consolidated array index constant in *(main::SCREEN#0+1)
|
||||
Consolidated array index constant in *(main::SCREEN#0+2)
|
||||
Successful SSA optimization Pass2ConstantAdditionElimination
|
||||
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 @end
|
||||
CALL GRAPH
|
||||
Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Culled Empty Block (label) @2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
|
||||
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] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0
|
||||
[5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0
|
||||
[6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) main::c_radius#1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
[7] return
|
||||
to:@return
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(byte*) main::SCREEN
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_radius
|
||||
(byte) main::p_x
|
||||
(byte) main::p_y
|
||||
|
||||
Initial phi equivalence classes
|
||||
Complete equivalence classes
|
||||
|
||||
INITIAL ASM
|
||||
// File Comments
|
||||
// Minimal struct - nesting structs
|
||||
// Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
// @begin
|
||||
bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
// @1
|
||||
b1:
|
||||
// [2] call main
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
// @end
|
||||
bend:
|
||||
// main
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = $c
|
||||
.label SCREEN = $400
|
||||
// [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
// [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
// [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) main::c_radius#1 -- _deref_pbuc1=vbuc2
|
||||
lda #c_radius
|
||||
sta SCREEN+2
|
||||
jmp breturn
|
||||
// main::@return
|
||||
breturn:
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) main::c_radius#1 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [Point]
|
||||
Uplift Scope [Circle]
|
||||
Uplift Scope [main]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [Point] best 39 combination
|
||||
Uplifting [Circle] best 39 combination
|
||||
Uplifting [main] best 39 combination
|
||||
Uplifting [] best 39 combination
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
// File Comments
|
||||
// Minimal struct - nesting structs
|
||||
// Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
// @begin
|
||||
bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
// @1
|
||||
b1:
|
||||
// [2] call main
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
// @end
|
||||
bend:
|
||||
// main
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = $c
|
||||
.label SCREEN = $400
|
||||
// [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
// [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
// [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) main::c_radius#1 -- _deref_pbuc1=vbuc2
|
||||
lda #c_radius
|
||||
sta SCREEN+2
|
||||
jmp breturn
|
||||
// main::@return
|
||||
breturn:
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
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
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_radius
|
||||
(const byte) main::c_radius#1 c_radius = (byte) $c
|
||||
(byte) main::p_x
|
||||
(const byte) main::p_x#0 p_x = (byte) $a
|
||||
(byte) main::p_y
|
||||
(const byte) main::p_y#0 p_y = (byte) $a
|
||||
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 24
|
||||
|
||||
// File Comments
|
||||
// Minimal struct - nesting structs
|
||||
// Basic Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
// @begin
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
// @1
|
||||
// [2] call main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
// @end
|
||||
// main
|
||||
main: {
|
||||
.const p_x = $a
|
||||
.const p_y = $a
|
||||
.const c_radius = $c
|
||||
.label SCREEN = $400
|
||||
// SCREEN[0] = c.center.x
|
||||
// [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_x
|
||||
sta SCREEN
|
||||
// SCREEN[1] = c.center.y
|
||||
// [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 -- _deref_pbuc1=vbuc2
|
||||
lda #p_y
|
||||
sta SCREEN+1
|
||||
// SCREEN[2] = c.radius
|
||||
// [6] *((const byte*) main::SCREEN#0+(byte) 2) ← (const byte) main::c_radius#1 -- _deref_pbuc1=vbuc2
|
||||
lda #c_radius
|
||||
sta SCREEN+2
|
||||
// main::@return
|
||||
// }
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
20
src/test/ref/struct-9.sym
Normal file
20
src/test/ref/struct-9.sym
Normal file
@ -0,0 +1,20 @@
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(struct Point) Circle::center
|
||||
(byte) Circle::radius
|
||||
(byte) Point::x
|
||||
(byte) Point::y
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(const byte*) main::SCREEN#0 SCREEN = (byte*) 1024
|
||||
(byte) main::c_center_x
|
||||
(byte) main::c_center_y
|
||||
(byte) main::c_radius
|
||||
(const byte) main::c_radius#1 c_radius = (byte) $c
|
||||
(byte) main::p_x
|
||||
(const byte) main::p_x#0 p_x = (byte) $a
|
||||
(byte) main::p_y
|
||||
(const byte) main::p_y#0 p_y = (byte) $a
|
||||
|
@ -25,19 +25,12 @@ main: {
|
||||
lda #>-$3ff
|
||||
sta a+1
|
||||
b1:
|
||||
lda #-7
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda a
|
||||
adc $fe
|
||||
clc
|
||||
adc #<-7
|
||||
sta a
|
||||
lda a+1
|
||||
adc $ff
|
||||
adc #>-7
|
||||
sta a+1
|
||||
clc
|
||||
lda b
|
||||
|
@ -871,19 +871,12 @@ main: {
|
||||
// main::@1
|
||||
b1:
|
||||
// [6] (signed word) main::a#1 ← (signed word) main::a#2 + (signed byte) -7 -- vwsz1=vwsz1_plus_vbsc1
|
||||
lda #-7
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda a
|
||||
adc $fe
|
||||
clc
|
||||
adc #<-7
|
||||
sta a
|
||||
lda a+1
|
||||
adc $ff
|
||||
adc #>-7
|
||||
sta a+1
|
||||
// [7] (word) main::b#1 ← (word) main::b#2 + (word) $141 -- vwuz1=vwuz1_plus_vwuc1
|
||||
clc
|
||||
@ -1223,15 +1216,15 @@ Uplift Scope [print_char] 14: zp ZP_BYTE:12 [ print_char::ch#5 print_char::ch#2
|
||||
Uplift Scope [print_sword] 10.83: zp ZP_WORD:15 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
|
||||
Uplift Scope [print_ln]
|
||||
|
||||
Uplifting [] best 6244 combination zp ZP_WORD:7 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ] zp ZP_WORD:13 [ print_char_cursor#33 print_char_cursor#13 print_char_cursor#47 print_char_cursor#57 ]
|
||||
Uplifting [main] best 6154 combination zp ZP_WORD:2 [ main::a#2 main::a#1 ] zp ZP_WORD:4 [ main::b#2 main::b#1 ] reg byte x [ main::i#2 main::i#1 ]
|
||||
Uplifting [print_word] best 6154 combination zp ZP_WORD:9 [ print_word::w#2 print_word::w#1 print_word::w#0 ]
|
||||
Uplifting [print_byte] best 6146 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ]
|
||||
Uplifting [print_char] best 6128 combination reg byte a [ print_char::ch#5 print_char::ch#2 print_char::ch#3 ]
|
||||
Uplifting [print_sword] best 6128 combination zp ZP_WORD:15 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
|
||||
Uplifting [print_ln] best 6128 combination
|
||||
Uplifting [] best 6079 combination zp ZP_WORD:7 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ] zp ZP_WORD:13 [ print_char_cursor#33 print_char_cursor#13 print_char_cursor#47 print_char_cursor#57 ]
|
||||
Uplifting [main] best 5989 combination zp ZP_WORD:2 [ main::a#2 main::a#1 ] zp ZP_WORD:4 [ main::b#2 main::b#1 ] reg byte x [ main::i#2 main::i#1 ]
|
||||
Uplifting [print_word] best 5989 combination zp ZP_WORD:9 [ print_word::w#2 print_word::w#1 print_word::w#0 ]
|
||||
Uplifting [print_byte] best 5981 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ]
|
||||
Uplifting [print_char] best 5963 combination reg byte a [ print_char::ch#5 print_char::ch#2 print_char::ch#3 ]
|
||||
Uplifting [print_sword] best 5963 combination zp ZP_WORD:15 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
|
||||
Uplifting [print_ln] best 5963 combination
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
|
||||
Uplifting [print_byte] best 6128 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
|
||||
Uplifting [print_byte] best 5963 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ print_word::w#2 print_word::w#1 print_word::w#0 ] ] with [ zp ZP_WORD:15 [ print_sword::w#4 print_sword::w#0 print_sword::w#1 ] ] - score: 1
|
||||
Allocated (was zp ZP_WORD:7) zp ZP_WORD:6 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ]
|
||||
Allocated (was zp ZP_WORD:9) zp ZP_WORD:8 [ print_word::w#2 print_word::w#1 print_word::w#0 print_sword::w#4 print_sword::w#0 print_sword::w#1 ]
|
||||
@ -1296,19 +1289,12 @@ main: {
|
||||
// main::@1
|
||||
b1:
|
||||
// [6] (signed word) main::a#1 ← (signed word) main::a#2 + (signed byte) -7 -- vwsz1=vwsz1_plus_vbsc1
|
||||
lda #-7
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda a
|
||||
adc $fe
|
||||
clc
|
||||
adc #<-7
|
||||
sta a
|
||||
lda a+1
|
||||
adc $ff
|
||||
adc #>-7
|
||||
sta a+1
|
||||
// [7] (word) main::b#1 ← (word) main::b#2 + (word) $141 -- vwuz1=vwuz1_plus_vwuc1
|
||||
clc
|
||||
@ -1731,7 +1717,7 @@ reg byte a [ print_byte::$2 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 5348
|
||||
Score: 5183
|
||||
|
||||
// File Comments
|
||||
// Tests the special "signed" / "unsigned" without a simple type name
|
||||
@ -1780,19 +1766,12 @@ main: {
|
||||
b1:
|
||||
// a += -7
|
||||
// [6] (signed word) main::a#1 ← (signed word) main::a#2 + (signed byte) -7 -- vwsz1=vwsz1_plus_vbsc1
|
||||
lda #-7
|
||||
sta $fe
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda a
|
||||
adc $fe
|
||||
clc
|
||||
adc #<-7
|
||||
sta a
|
||||
lda a+1
|
||||
adc $ff
|
||||
adc #>-7
|
||||
sta a+1
|
||||
// b += 321
|
||||
// [7] (word) main::b#1 ← (word) main::b#2 + (word) $141 -- vwuz1=vwuz1_plus_vwuc1
|
||||
|
Loading…
x
Reference in New Issue
Block a user