1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-27 09:31:18 +00:00

Removed most of the support for auto-casting integers to pointers. #659

This commit is contained in:
jespergravgaard 2021-05-10 21:27:14 +02:00
parent a076fde1f0
commit 497fd2b89f
110 changed files with 13464 additions and 13587 deletions

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 108dd16dc1 108dd18d7f
//KICKC FRAGMENT CACHE 11e0ba6c6b 11e0ba8c9f
//FRAGMENT vbuzz=vbuc1
ldz #{c1}
//FRAGMENT vbuzz_lt_vbuc1_then_la1

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 108dd16dc1 108dd18d7f
//KICKC FRAGMENT CACHE 11e0ba6c6b 11e0ba8c9f
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,12 @@
//KICKC FRAGMENT CACHE 108dd16dc1 108dd18d7f
//KICKC FRAGMENT CACHE 11e0ba6c6b 11e0ba8c9f
//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1
inc {c1}
//FRAGMENT isr_hardware_all_entry
pha @clob_none
txa @clob_x
pha @clob_x
tya @clob_y
pha @clob_y
//FRAGMENT _deref_pbuc1=vbuc2
lda #{c2}
sta {c1}
//FRAGMENT isr_hardware_all_exit
pla @clob_y
tay @clob_y
@ -15,17 +14,6 @@ pla @clob_x
tax @clob_x
pla @clob_none
rti
//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2
lda #{c2}
ora {c1}
sta {c1}
//FRAGMENT _deref_qprc1=pprc2
lda #<{c2}
sta {c1}
lda #>{c2}
sta {c1}+1
//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1
inc {c1}
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}
@ -63,6 +51,18 @@ iny
//FRAGMENT vbuyy_neq_vbuc1_then_la1
cpy #{c1}
bne {la1}
//FRAGMENT _deref_pbuc1=vbuc2
lda #{c2}
sta {c1}
//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2
lda #{c2}
ora {c1}
sta {c1}
//FRAGMENT _deref_qprc1=pprc2
lda #<{c2}
sta {c1}
lda #>{c2}
sta {c1}+1
//FRAGMENT vbuz1=vbuz2
lda {z2}
sta {z1}

File diff suppressed because it is too large Load Diff

View File

@ -46,14 +46,14 @@ public class Pass2FixInlineConstructors extends Pass2SsaOptimization {
OperatorCast operatorCast = (OperatorCast) operator;
SymbolType castToType = operatorCast.getToType();
if(SymbolType.WORD.equals(castToType)) {
addLiteralWordConstructor(Operators.WORD, SymbolType.WORD, SymbolType.BYTE, programExpression, listValues, currentStmt, stmtIt, currentBlock);
addLiteralWordConstructor(Operators.WORD, SymbolType.WORD, SymbolType.WORD, SymbolType.BYTE, programExpression, listValues, currentStmt, stmtIt, currentBlock);
optimized.set(true);
} else if(SymbolType.DWORD.equals(castToType)) {
addLiteralWordConstructor(Operators.DWORD, SymbolType.DWORD, SymbolType.WORD, programExpression, listValues, currentStmt, stmtIt, currentBlock);
addLiteralWordConstructor(Operators.DWORD, SymbolType.DWORD, SymbolType.DWORD, SymbolType.WORD, programExpression, listValues, currentStmt, stmtIt, currentBlock);
optimized.set(true);
} else if((castToType instanceof SymbolTypePointer)) {
SymbolType castType = ((OperatorCastPtr) operator).getToType();
addLiteralWordConstructor(Operators.WORD, castType, SymbolType.BYTE, programExpression, listValues, currentStmt, stmtIt, currentBlock);
addLiteralWordConstructor(Operators.WORD, castType, SymbolType.WORD, SymbolType.BYTE, programExpression, listValues, currentStmt, stmtIt, currentBlock);
optimized.set(true);
}
}
@ -79,7 +79,7 @@ public class Pass2FixInlineConstructors extends Pass2SsaOptimization {
* @param stmtIt
* @param currentBlock
*/
public void addLiteralWordConstructor(OperatorBinary constructOperator, SymbolType constructType, SymbolType subType, ProgramExpression programExpression, List<RValue> listValues, Statement currentStmt, ListIterator<Statement> stmtIt, ControlFlowBlock currentBlock) {
public void addLiteralWordConstructor(OperatorBinary constructOperator, SymbolType castType, SymbolType constructType, SymbolType subType, ProgramExpression programExpression, List<RValue> listValues, Statement currentStmt, ListIterator<Statement> stmtIt, ControlFlowBlock currentBlock) {
// Convert list to a word constructor in a new tmp variable
Scope currentScope = Pass2FixInlineConstructors.this.getScope().getScope(currentBlock.getScope());
Variable tmpVar = currentScope.addVariableIntermediate();
@ -91,8 +91,11 @@ public class Pass2FixInlineConstructors extends Pass2SsaOptimization {
stmtIt.add(assignment);
// Move back before the current statement
stmtIt.next();
// Replace current value with the reference
programExpression.set(tmpVar.getRef());
// Replace current value with the reference (adding a cast if needed)
if(constructType.equals(castType))
programExpression.set(tmpVar.getRef());
else
programExpression.set(new CastValue(castType, tmpVar.getRef()));
Pass2FixInlineConstructors.this.getLog().append("Fixing inline constructor with " + assignment.toString());
}

View File

@ -4,7 +4,10 @@ import dk.camelot64.kickc.model.CompileError;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.iterator.ProgramExpressionBinary;
import dk.camelot64.kickc.model.iterator.ProgramExpressionIterator;
import dk.camelot64.kickc.model.types.*;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeConversion;
import dk.camelot64.kickc.model.types.SymbolTypeInference;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.values.RValue;
import dk.camelot64.kickc.model.values.ValueList;
@ -43,12 +46,7 @@ public class PassNAddTypeConversionAssignment extends Pass2SsaOptimization {
if(!SymbolTypeConversion.assignmentTypeMatch(leftType, rightType) || SymbolType.VAR.equals(rightType)) {
// Assigning a pointer from an unsigned word
if(programExpression instanceof ProgramExpressionBinary.ProgramExpressionBinaryAssignmentLValue || programExpression instanceof ProgramExpressionBinary.ProgramExpressionBinaryCallParameter) {
if((leftType instanceof SymbolTypePointer) && SymbolType.isInteger(rightType)) {
if(!pass1 || getLog().isVerbosePass1CreateSsa())
getLog().append("Adding pointer type conversion cast (" + leftType + ") " + binary.getLeft().toString() + " in " + currentStmt.toString(getProgram(), false));
binary.addRightCast(leftType, stmtIt, currentBlock.getScope(), getScope());
modified.set(true);
} else if((leftType instanceof SymbolTypePointer) && rightType instanceof SymbolTypePointer && SymbolType.VOID.equals(((SymbolTypePointer) leftType).getElementType())) {
if((leftType instanceof SymbolTypePointer) && rightType instanceof SymbolTypePointer && SymbolType.VOID.equals(((SymbolTypePointer) leftType).getElementType())) {
if(!pass1 || getLog().isVerbosePass1CreateSsa())
getLog().append("Adding void pointer type conversion cast (" + leftType + ") " + binary.getRight().toString() + " in " + currentStmt.toString(getProgram(), false));
binary.addRightCast(leftType, stmtIt, currentBlock.getScope(), getScope());

View File

@ -340,7 +340,7 @@ unsigned byte scroll(unsigned byte onoff) {
void screenlayer(unsigned byte layer) {
conio_screen_layer = layer;
CONIO_SCREEN_BANK = vera_layer_get_mapbase_bank(conio_screen_layer);
CONIO_SCREEN_TEXT = vera_layer_get_mapbase_offset(conio_screen_layer);
CONIO_SCREEN_TEXT = (char*)vera_layer_get_mapbase_offset(conio_screen_layer);
conio_width = vera_layer_get_width(conio_screen_layer);
conio_rowshift = vera_layer_get_rowshift(conio_screen_layer);
conio_rowskip = vera_layer_get_rowskip(conio_screen_layer);

View File

@ -95,7 +95,7 @@ void bitmap_clear() {
word hdelta = hdeltas[(__bitmap_color_depth<<2)+__bitmap_hscale];
dword count = mul16u(hdelta,vdelta);
char vbank = <(>__bitmap_address);
void* vdest = <__bitmap_address;
void* vdest = (void*) <__bitmap_address;
memset_vram(vbank, vdest, 0, count);
}

View File

@ -75,14 +75,14 @@ void memcpy_bank_to_vram(unsigned long vdest, unsigned long src, unsigned long n
unsigned long end = src+num;
char bank = (byte)(((((word)<(>beg)<<8)|>(<beg))>>5)+((word)<(>beg)<<3));
char* addr = ((<beg)&0x1FFF); // stip off the top 3 bits, which are representing the bank of the word!
char* addr = (char*)((<beg)&0x1FFF); // stip off the top 3 bits, which are representing the bank of the word!
addr += 0xA000;
VIA1->PORT_A = (char)bank; // select the bank
for(unsigned long pos=beg; pos<end; pos++) {
if(addr == 0xC000) {
VIA1->PORT_A = (char)++bank; // select the bank
addr = 0xA000;
addr = (char*)0xA000;
}
*VERA_DATA0 = *addr;
addr++;
@ -168,7 +168,7 @@ char load_to_bank( char device, char* filename, dword address) {
setnam(filename);
setlfs(device);
char bank = (byte)(((((word)<(>address)<<8)|>(<address))>>5)+((word)<(>address)<<3));
char* addr = ((<address)&0x1FFF); // stip off the top 3 bits, which are representing the bank of the word!
char* addr = (char*)((<address)&0x1FFF); // stip off the top 3 bits, which are representing the bank of the word!
addr += 0xA000;
VIA1->PORT_A = (char)bank; // select the bank
return load(addr, 0);

View File

@ -78,5 +78,5 @@ void *memchr(const void *str, char c, size_t n) {
return ptr;
ptr++;
}
return 0;
return (void*)0;
}

View File

@ -4442,7 +4442,7 @@ public class TestProgramsFast extends TestPrograms {
@Test
public void testTypeMismatch() throws IOException {
assertError("typemismatch.c", "Type mismatch");
assertError("typemismatch.c", "Type mismatch (byte) cannot be assigned from (word)");
}
@Test

View File

@ -5,5 +5,5 @@ char* levelRowOff[31] = { 1, 2, 3 };
void main() {
for(char c=0;c<sizeof(levelRowOff)/sizeof(char*); c++)
levelRowOff[c] = 12345;
levelRowOff[c] = (char*)12345;
}

View File

@ -69,13 +69,13 @@ void gfx_init_chunky() {
// 320x200 8bpp pixels for Plane
byte gfxbCpuBank = (byte)(CHUNKY/$4000);
dtvSetCpuBankSegment1(gfxbCpuBank++);
byte* gfxb = $4000;
byte* gfxb = (byte*)$4000;
for(byte y : 0..50) {
for (word x : 0..319) {
// If we have crossed to $8000 increase the CPU BANK segment and reset to $4000
if(gfxb==$8000) {
dtvSetCpuBankSegment1(gfxbCpuBank++);
gfxb = $4000;
gfxb = (byte*)$4000;
}
byte c = (byte)(x+y);
*gfxb++ = c;

View File

@ -506,7 +506,7 @@ void gfx_init_plane_8bppchunky() {
// If we have crossed to $8000 increase the CPU BANK segment and reset to $4000
if(gfxb==$8000) {
dtvSetCpuBankSegment1(gfxbCpuBank++);
gfxb = $4000;
gfxb = (byte*)$4000;
}
byte c = (byte)(x+y);
*gfxb++ = c;
@ -611,7 +611,7 @@ void gfx_init_plane_full() {
void gfx_init_plane_fill(dword plane_addr, byte fill) {
byte gfxbCpuBank = < >(plane_addr*4);
dtvSetCpuBankSegment1(gfxbCpuBank++);
byte* gfxb = $4000 + (<plane_addr & $3fff);
byte* gfxb = (byte*)$4000 + (<plane_addr & $3fff);
for(byte by : 0..199) {
for ( byte bx : 0..39) {
*gfxb++ = fill;

View File

@ -864,7 +864,7 @@ void mode_8bppchunkybmm() {
// If we have crossed to $8000 increase the CPU BANK segment and reset to $4000
if(gfxb==$8000) {
dtvSetCpuBankSegment1(gfxbCpuBank++);
gfxb = $4000;
gfxb = (char*)$4000;
}
byte c = (byte)(x+y);
*gfxb++ = c;

View File

@ -207,7 +207,7 @@ void splash_run() {
*PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK;
*PROCPORT = PROCPORT_RAM_ALL;
// Reset memory to avoid crashes
memset(0x4000, 0, 0xc00);
memset((char*)0x4000, 0, 0xc00);
// Decrunch raster code
byteboozer_decrunch(RASTER_CODE_CRUNCHED);
// Decrunch logic code

View File

@ -5,14 +5,14 @@
// A potential fix is https://gitlab.com/camelot/kickc/-/issues/430
// The address of the sprite pointers on the current screen (screen+0x3f8).
char* PLEX_SCREEN_PTR1 = 0x400;
char* PLEX_SCREEN_PTR2 = 0x500;
char* PLEX_SCREEN_PTR1 = (char*)0x400;
char* PLEX_SCREEN_PTR2 = (char*)0x500;
volatile char idx = 0;
void()** const IRQ = 0x314;
void main() {
PLEX_SCREEN_PTR1 = 0x400;
PLEX_SCREEN_PTR1 = (char*)0x400;
*IRQ = &irq;
}

View File

@ -90,7 +90,7 @@ void main() {
SPRITE_ATTR.ADDR = <(VRAM_SPRITE/32)|VERA_SPRITE_4BPP;
SPRITE_ATTR.X = 100;
SPRITE_ATTR.Y = 100;
memcpy_to_vram((char)>VERA_SPRITE_ATTR, <VERA_SPRITE_ATTR, &SPRITE_ATTR, sizeof(SPRITE_ATTR));
memcpy_to_vram((char)>VERA_SPRITE_ATTR, (char*)<VERA_SPRITE_ATTR, &SPRITE_ATTR, sizeof(SPRITE_ATTR));
// Enable sprites
*VERA_CTRL &= ~VERA_DCSEL;

View File

@ -53,9 +53,9 @@ struct VERA_SPRITE SPRITE_ATTR = { <(SPRITE_PIXELS_VRAM/32)|VERA_SPRITE_8BPP, 32
void main() {
// Copy sprite data to VRAM
memcpy_to_vram((char)>SPRITE_PIXELS_VRAM, <SPRITE_PIXELS_VRAM, SPRITE_PIXELS, 64*64);
memcpy_to_vram((char)>SPRITE_PIXELS_VRAM, (char*)<SPRITE_PIXELS_VRAM, SPRITE_PIXELS, 64*64);
// Copy sprite palette to VRAM
memcpy_to_vram((char)>VERA_PALETTE, <VERA_PALETTE, SPRITE_PIXELS+64*64, 0x200);
memcpy_to_vram((char)>VERA_PALETTE, (char*)<VERA_PALETTE, SPRITE_PIXELS+64*64, 0x200);
// Copy 8* sprite attributes to VRAM
char* vram_sprite_attr = <VERA_SPRITE_ATTR;
for(char s=0;s<NUM_SPRITES;s++) {

View File

@ -26,7 +26,7 @@ void main() {
// realign the moved character set to 0xf000 as the new tile base for layer 1.
// We also will need to realign for layer 1 the map base from 0x00000 to 0x14000.
// This is now all easily done with a few statements in the new kickc vera lib ...
memcpy_in_vram(1, 0xF000, VERA_INC_1, 0, 0xF800, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each.
memcpy_in_vram(1, (char*)0xF000, VERA_INC_1, 0, (char*)0xF800, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each.
vera_layer_mode_tile(1, 0x14000, 0x1F000, 128, 64, 8, 8, 1);
vera_layer_mode_bitmap(0, (dword)0x00000, 320, 8);

View File

@ -42,7 +42,7 @@ void main() {
// We also will need to realign for layer 1 the map base from 0x00000 to 0x10000.
// This is now all easily done with a few statements in the new kickc vera lib ...
memcpy_in_vram(1, 0xF000, VERA_INC_1, 0, 0xF800, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each.
memcpy_in_vram(1, (char*)0xF000, VERA_INC_1, 0, (char*)0xF800, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each.
vera_layer_mode_tile(1, 0x10000, 0x1F000, 128, 64, 8, 8, 1);
screenlayer(1);
@ -56,7 +56,7 @@ void main() {
vera_layer_mode_tile(0, 0x14000, 0x00000, 64, 64, 16, 16, 8);
word tilebase = 0x0000;
char* tilebase = 0x0000;
memcpy_to_vram(0, tilebase, tiles, 256);
tilebase+=256;
for(byte t:1..255) {
@ -121,7 +121,7 @@ void main() {
// Now put back the defaults ...
vera_tile_area(0, 0, 0, 0, 40, 30, 0, 0, 0);
vera_layer_hide(0);
memcpy_in_vram(0, 0xF800, VERA_INC_1, 1, 0xF000, VERA_INC_1, 256*8);
memcpy_in_vram(0, (char*)0xF800, VERA_INC_1, 1, (char*)0xF000, VERA_INC_1, 256*8);
vera_layer_mode_tile(1, 0x00000, 0x0F800, 128, 128, 8, 8, 1);
vera_layer_mode_tile(0, 0x00000, 0x0F800, 128, 128, 8, 8, 1);

View File

@ -24,7 +24,7 @@ void main() {
VICIV->SIDBDRWD_LO = 1;
// Transfer banked code/data to upper memory ($10000)
memcpy_dma4(1, 0x0000, 0, upperCodeData, MUSIC_END-MUSIC);
memcpy_dma4(1, (void*)0x0000, 0, upperCodeData, MUSIC_END-MUSIC);
// Remap [$4000-$5fff] to point to [$10000-$11fff]
memoryRemapBlock(0x40, 0x100);

View File

@ -66,7 +66,7 @@ void main() {
// Fill the screen with 0
memset_dma(SCREEN, 0, 45*25*2);
// Fill the colours with WHITE - directly into $ff80000
memset_dma256(0xff,0x08,0x0000, WHITE, 45*25*2);
memset_dma256(0xff,0x08,(void*)0x0000, WHITE, 45*25*2);
// Fill the charset with 0x55
memset_dma(CHARSET, 0x55, 45*32*8);

View File

@ -1,15 +1,15 @@
// Inline functions in two levels
void main() {
for(byte* sc = $400;sc<$400+1000;sc++) *sc = ' ';
for(byte* sc = (byte*)$400;sc<$400+1000;sc++) *sc = ' ';
line(2, $40, 10, '*');
line(4, $80, 15, '.');
}
byte* cur_line = $400;
byte* cur_line = (byte*)$400;
inline void line(byte xpos, byte xadd, byte ysize, byte ch) {
cur_line = $400;
cur_line = (byte*)$400;
word pos = {xpos, 0};
for( byte i=0;i<ysize; i++) {
plot(>pos, ch);

View File

@ -3,10 +3,10 @@
// Erroneously tries to inline the string completely leading to a CompileError
void main() {
const byte STRING[] = "camelot"z;
byte* const PTR = $9ffe;
byte* const PTR = (byte*)$9ffe;
*PTR = <STRING;
*(PTR+1)= >STRING;
byte* ptr = (byte*) { *(PTR+1), *PTR };
byte* const SCREEN = $400;
byte* const SCREEN = (byte*)$400;
*SCREEN = *ptr;
}

View File

@ -12,7 +12,7 @@ void init_1(void) {
}
void init_2(void) {
SCREEN = 0x0400;
SCREEN = (char*)0x0400;
}
void main(void) {

View File

@ -12,7 +12,7 @@ struct node* root;
void init(void) {
free_ = 0;
root = 0;
root = (void*)0;
}
struct node* alloc() {

View File

@ -4,11 +4,11 @@ unsigned char *volatile h1; // This must be volatile because is used in an inte
void test(unsigned char *videoMem, unsigned char *colorMem, unsigned char *other)
{
unsigned char *diff;
unsigned int diff;
__ma unsigned char *dst; // This must be declared as __ma because is used in an assembly routine...
diff = colorMem - videoMem;
diff = colorMem - videoMem;
dst = other + ((unsigned int)diff);
dst[0] = 1;
@ -21,5 +21,5 @@ void test(unsigned char *videoMem, unsigned char *colorMem, unsigned char *other
void main(void)
{
test(h1, 0xD800, 0xC000);
test(h1, (char*)0xD800, (char*)0xC000);
}

View File

@ -125,10 +125,10 @@ void main() {
// Set all values in the passed struct
// Sets the values to n, n+1, n... to help test that everything works as intended
void initEntry(byte* entry, byte n) {
*entryBufDisk(entry) = 0x1111+n;
*entryBufEdit(entry) = 0x2222+n;
*entryBufDisk(entry) = (byte*)(0x1111+n);
*entryBufEdit(entry) = (byte*)(0x2222+n);
*entryTsLen(entry) = 0x3333+n;
*entryTsOrder(entry) = 0x4444+n;
*entryTsOrder(entry) = (word*)(0x4444+n);
*entryTLastLink(entry) = 0x55+n;
*entrySLastLink(entry) = 0x66+n;
*entryBFlag(entry) = 0x77+n;

View File

@ -14,7 +14,7 @@ uint8_t* sieve = 0x1000;
void main (void) {
//Show lower case font
*D018 = toD018(SCREEN, 0x1800);
*D018 = toD018(SCREEN, (char*)0x1800);
print_cls();
print_str("Sieve benchmark - calculating primes");
print_ln();

View File

@ -15,7 +15,7 @@ ENTRY *file;
int main(void) {
file = files;
file->bufEdit = 0x4000;
file->bufEdit = (char*)0x4000;
file->bufEdit[3] = 0xAA; // writes address 0x0000 (wrong!)
((char *)file->bufEdit)[4] = 0xCC; // writes address 0x4004 (right!)
print_cls();

View File

@ -10,8 +10,8 @@ typedef struct fileentry ENTRY;
void main(){
ENTRY *file;
WORD uSize;
file = 0x4000;
file->bufEdit = 4;
file = (ENTRY *)0x4000;
file->bufEdit = (BYTE*)4;
word* ptrw = (WORD *)(file->bufEdit + 30);
uSize = *ptrw;
print_uint(uSize);

View File

@ -5,7 +5,7 @@ struct Entry {
struct Entry* next;
};
struct Entry* ENTRIES= 0x1000;
struct Entry* ENTRIES = (struct Entry*)0x1000;
void main() {
// Create a few (non-linear) linked entries
@ -17,11 +17,11 @@ void main() {
entry0->value = 1;
entry2->next = entry1;
entry2->value = 2;
entry1->next = 0;
entry1->next = (struct Entry*)0;
entry1->value = 3;
// Run through the linked list
byte* const SCREEN = 0x0400;
byte* const SCREEN = (byte*)0x0400;
byte idx = 0;
struct Entry* entry = ENTRIES;

View File

@ -4,12 +4,12 @@ void main() {
byte b = 4; // constant byte
word w = { b, 0 }; // constant inline word
word w2 = (word){ 1, 1 } + w + (word){ 0, 0 }; // constant inline words inside expression
byte* sc = w2; // implicit cast to (byte*)
byte* sc = (byte*)w2; // cast to (byte*)
*sc = bs[1]; // In the end $501 is set to 'c'
// Test the result
byte* pos = $501;
byte* BG_COLOR = $d021;
byte* pos = (byte*)$501;
byte* BG_COLOR = (byte*)$d021;
if(*pos=='m') {
*BG_COLOR = 5;
} else {

View File

@ -1,7 +1,7 @@
// Illustrates the problem with variable forward references not working
void main() {
screen = $400;
screen = (byte*)$400;
b = 'a';
*screen = b;
}

View File

@ -1,9 +1,9 @@
// Variables without initialization causes problems when compiling
byte* screen;
char* screen;
void main() {
screen = $400;
screen = (char*)$400;
*screen = 'a';
}

View File

@ -19,7 +19,7 @@ main: {
// }
rts
__b2:
// levelRowOff[c] = 12345
// levelRowOff[c] = (char*)12345
txa
asl
tay

View File

@ -15,7 +15,7 @@ main::@1: scope:[main] from main main::@2
main::@2: scope:[main] from main::@1
main::c#3 = phi( main::@1/main::c#2 )
main::$3 = main::c#3 * SIZEOF_POINTER
levelRowOff[main::$3] = ((byte*)) $3039
levelRowOff[main::$3] = (byte*)$3039
main::c#1 = ++ main::c#3
to:main::@1
main::@return: scope:[main] from main::@1
@ -47,8 +47,6 @@ byte main::c#1
byte main::c#2
byte main::c#3
Inlining cast levelRowOff[main::$3] = (byte*)$3039
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1
Simplifying constant pointer cast (byte*) 2
Simplifying constant pointer cast (byte*) 3
@ -261,7 +259,7 @@ main: {
rts
// main::@2
__b2:
// levelRowOff[c] = 12345
// levelRowOff[c] = (char*)12345
// [4] main::$3 = main::c#2 << 1 -- vbuaa=vbuxx_rol_1
txa
asl

View File

@ -1138,13 +1138,11 @@ Inferred type updated to word in bitmap_line::$20 = bitmap_line::dy#2 / 2
Inferred type updated to word in bitmap_line::$15 = bitmap_line::dx#3 / 2
Inferred type updated to byte in abs_u16::$1 = abs_u16::$0 & $80
Inferred type updated to byte in sgn_u16::$1 = sgn_u16::$0 & $80
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#4] w= bitmap_plot_ylo[bitmap_plot::y#4]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [2] memset::$1 = memset::num#2 <= 0 from [1] memset::$0 = memset::num#2 > 0
Inversing boolean not [29] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [28] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [49] bitmap_init::$9 = bitmap_init::$7 != 7 from [48] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [145] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [144] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [165] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [164] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [144] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [143] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [164] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [163] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
@ -1171,7 +1169,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
Alias abs_u16::w#0 = bitmap_line::$0
@ -1373,8 +1370,6 @@ Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [16] if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [28] if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [39] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -1400,7 +1395,7 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [2] memset::$4 = (byte*)memset::str#3 keeping memset::str#3
Inlining Noop Cast [4] memset::dst#0 = (byte*)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Rewriting division to use shift [59] bitmap_line::e1#0 = bitmap_line::dy#0 / 2
Rewriting division to use shift [60] bitmap_line::e#0 = bitmap_line::dx#0 / 2

View File

@ -1125,14 +1125,12 @@ Inferred type updated to word in bitmap_line::$20 = bitmap_line::dy#2 / 2
Inferred type updated to word in bitmap_line::$15 = bitmap_line::dx#3 / 2
Inferred type updated to byte in abs_u16::$1 = abs_u16::$0 & $80
Inferred type updated to byte in sgn_u16::$1 = sgn_u16::$0 & $80
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#4] w= bitmap_plot_ylo[bitmap_plot::y#4]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [2] memset::$1 = memset::num#2 <= 0 from [1] memset::$0 = memset::num#2 > 0
Inversing boolean not [29] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [28] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [49] bitmap_init::$9 = bitmap_init::$7 != 7 from [48] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [145] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [144] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [165] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [164] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [220] main::$4 = next#0 != $140 from [219] main::$3 = next#0 == $140
Inversing boolean not [144] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [143] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [164] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [163] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [219] main::$4 = next#0 != $140 from [218] main::$3 = next#0 == $140
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
@ -1159,7 +1157,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
Alias abs_u16::w#0 = bitmap_line::$0
@ -1360,8 +1357,6 @@ Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [16] if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [28] if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [39] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -1390,7 +1385,7 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [2] memset::$4 = (byte*)memset::str#3 keeping memset::str#3
Inlining Noop Cast [4] memset::dst#0 = (byte*)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Rewriting division to use shift [59] bitmap_line::e1#0 = bitmap_line::dy#0 / 2
Rewriting division to use shift [60] bitmap_line::e#0 = bitmap_line::dx#0 / 2

View File

@ -795,12 +795,10 @@ Inferred type updated to byte in main::toD0181_$2 = > main::toD0181_$1
Inferred type updated to byte in main::toD0181_$4 = main::toD0181_$3 / 4
Inferred type updated to byte in main::toD0181_$5 = main::toD0181_$4 & $f
Inferred type updated to byte in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#1] w= bitmap_plot_ylo[bitmap_plot::y#1]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [2] memset::$1 = memset::num#2 <= 0 from [1] memset::$0 = memset::num#2 > 0
Inversing boolean not [29] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [28] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [49] bitmap_init::$9 = bitmap_init::$7 != 7 from [48] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [166] irq::$0 = 0 == frame_cnt from [165] irq::$1 = 0 != frame_cnt
Inversing boolean not [165] irq::$0 = 0 == frame_cnt from [164] irq::$1 = 0 != frame_cnt
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
@ -827,7 +825,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_gfx#2 = bitmap_gfx#9 bitmap_gfx#34 bitmap_gfx#32 bitmap_gfx#27 bitmap_gfx#23 bitmap_gfx#20
Alias bitmap_screen#19 = bitmap_screen#2 bitmap_screen#9 bitmap_screen#33 bitmap_screen#31 bitmap_screen#26 bitmap_screen#22
Alias main::toD0181_screen#0 = main::toD0181_screen#1
@ -958,8 +955,6 @@ Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) 0 in if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -1006,7 +1001,7 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [2] memset::$4 = (byte*)memset::str#3 keeping memset::str#3
Inlining Noop Cast [4] memset::dst#0 = (byte*)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [34] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [34] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Inlining constant with var siblings memset::num#0
Inlining constant with var siblings memset::c#1

View File

@ -1876,8 +1876,6 @@ Inferred type updated to byte in main::toD0181_$5 = main::toD0181_$4 & $f
Inferred type updated to byte in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Inferred type updated to word in main::$8 = $a0 + main::$7
Inferred type updated to word in main::$12 = $64 + main::$11
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#1] w= bitmap_plot_ylo[bitmap_plot::y#1]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [9] divr16u::$4 = divr16u::$2 == 0 from [8] divr16u::$3 = divr16u::$2 != 0
Inversing boolean not [17] divr16u::$9 = divr16u::rem#6 < divr16u::divisor#2 from [16] divr16u::$8 = divr16u::rem#6 >= divr16u::divisor#2
Inversing boolean not [74] mul16u::$3 = mul16u::$1 == 0 from [73] mul16u::$2 = mul16u::$1 != 0
@ -1889,9 +1887,9 @@ Inversing boolean not [228] sin16s::$15 = sin16s::isUpper#2 == 0 from [227] sin1
Inversing boolean not [256] memset::$1 = memset::num#2 <= 0 from [255] memset::$0 = memset::num#2 > 0
Inversing boolean not [283] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [282] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [303] bitmap_init::$9 = bitmap_init::$7 != 7 from [302] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [416] main::$15 = main::idx_x#1 != $200 from [415] main::$14 = main::idx_x#1 == $200
Inversing boolean not [421] main::$17 = main::idx_y#1 != $200 from [420] main::$16 = main::idx_y#1 == $200
Inversing boolean not [446] irq::$0 = 0 == frame_cnt from [445] irq::$1 = 0 != frame_cnt
Inversing boolean not [415] main::$15 = main::idx_x#1 != $200 from [414] main::$14 = main::idx_x#1 == $200
Inversing boolean not [420] main::$17 = main::idx_y#1 != $200 from [419] main::$16 = main::idx_y#1 == $200
Inversing boolean not [445] irq::$0 = 0 == frame_cnt from [444] irq::$1 = 0 != frame_cnt
Successful SSA optimization Pass2UnaryNotSimplification
Alias divr16u::rem#0 = divr16u::$0 divr16u::rem#7
Alias divr16u::dividend#0 = divr16u::$6 divr16u::dividend#8
@ -2003,7 +2001,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_gfx#15 = bitmap_gfx#20
Alias bitmap_screen#14 = bitmap_screen#19
Alias rem16u#18 = rem16u#7 rem16u#43 rem16u#41 rem16u#39 rem16u#36 rem16u#32 rem16u#29
@ -2210,8 +2207,6 @@ Adding number conversion cast (unumber) $10 in if(divr16u::i#1!=$10) goto divr16
Adding number conversion cast (unumber) 0 in if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -2280,7 +2275,7 @@ Inlining Noop Cast [128] memset::$4 = (byte*)memset::str#3 keeping memset::str#3
Inlining Noop Cast [130] memset::dst#0 = (byte*)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [71] sin16s_gen2::$8 = (signed word)sin16s_gen2::$7 keeping sin16s_gen2::$8
Inlining Noop Cast [160] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [160] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Rewriting multiplication to use shift [173] main::$19 = main::idx_x#3 * SIZEOF_SIGNED_WORD
Rewriting multiplication to use shift [183] main::$20 = main::idx_y#3 * SIZEOF_SIGNED_WORD

View File

@ -1994,8 +1994,6 @@ Inferred type updated to byte in main::toD0181_$5 = main::toD0181_$4 & $f
Inferred type updated to byte in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Inferred type updated to signed word in main::$8 = $a0 + main::$7
Inferred type updated to signed word in main::$12 = $64 + main::$11
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#1] w= bitmap_plot_ylo[bitmap_plot::y#1]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [9] divr16u::$4 = divr16u::$2 == 0 from [8] divr16u::$3 = divr16u::$2 != 0
Inversing boolean not [17] divr16u::$9 = divr16u::rem#6 < divr16u::divisor#2 from [16] divr16u::$8 = divr16u::rem#6 >= divr16u::divisor#2
Inversing boolean not [74] mul16u::$3 = mul16u::$1 == 0 from [73] mul16u::$2 = mul16u::$1 != 0
@ -2007,10 +2005,10 @@ Inversing boolean not [228] sin16s::$15 = sin16s::isUpper#2 == 0 from [227] sin1
Inversing boolean not [256] memset::$1 = memset::num#2 <= 0 from [255] memset::$0 = memset::num#2 > 0
Inversing boolean not [283] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [282] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [303] bitmap_init::$9 = bitmap_init::$7 != 7 from [302] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [421] main::$16 = main::idx_x#1 < $200 from [420] main::$15 = main::idx_x#1 >= $200
Inversing boolean not [426] main::$18 = main::idx_y#1 < $200 from [425] main::$17 = main::idx_y#1 >= $200
Inversing boolean not [441] main::$24 = main::r#5 < (signed word)$200*$c+$100 from [440] main::$23 = main::r#5 >= (signed word)$200*$c+$100
Inversing boolean not [466] irq::$0 = 0 == frame_cnt from [465] irq::$1 = 0 != frame_cnt
Inversing boolean not [420] main::$16 = main::idx_x#1 < $200 from [419] main::$15 = main::idx_x#1 >= $200
Inversing boolean not [425] main::$18 = main::idx_y#1 < $200 from [424] main::$17 = main::idx_y#1 >= $200
Inversing boolean not [440] main::$24 = main::r#5 < (signed word)$200*$c+$100 from [439] main::$23 = main::r#5 >= (signed word)$200*$c+$100
Inversing boolean not [465] irq::$0 = 0 == frame_cnt from [464] irq::$1 = 0 != frame_cnt
Successful SSA optimization Pass2UnaryNotSimplification
Alias divr16u::rem#0 = divr16u::$0 divr16u::rem#7
Alias divr16u::dividend#0 = divr16u::$6 divr16u::dividend#8
@ -2122,7 +2120,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_gfx#15 = bitmap_gfx#20
Alias bitmap_screen#14 = bitmap_screen#19
Alias rem16u#18 = rem16u#7 rem16u#47 rem16u#45 rem16u#43 rem16u#40 rem16u#37 rem16u#33
@ -2356,8 +2353,6 @@ Adding number conversion cast (unumber) $10 in if(divr16u::i#1!=$10) goto divr16
Adding number conversion cast (unumber) 0 in if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -2428,7 +2423,7 @@ Inlining Noop Cast [128] memset::$4 = (byte*)memset::str#3 keeping memset::str#3
Inlining Noop Cast [130] memset::dst#0 = (byte*)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [71] sin16s_gen2::$8 = (signed word)sin16s_gen2::$7 keeping sin16s_gen2::$8
Inlining Noop Cast [160] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [160] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Inlining Noop Cast [182] main::$28 = (signed word)main::$6 keeping main::$28
Inlining Noop Cast [185] main::x#0 = (word)main::$8 keeping main::x#0
Inlining Noop Cast [195] main::$29 = (signed word)main::$10 keeping main::$29

View File

@ -1205,13 +1205,11 @@ Inferred type updated to word in main::$4 = main::$13 + $78
Inferred type updated to byte in main::$5 = main::a#2 + $20
Inferred type updated to word in main::$6 = main::$14 + $78
Inferred type updated to byte in main::$7 = main::a#2 + $20
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#4] w= bitmap_plot_ylo[bitmap_plot::y#4]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [2] memset::$1 = memset::num#2 <= 0 from [1] memset::$0 = memset::num#2 > 0
Inversing boolean not [29] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [28] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [49] bitmap_init::$9 = bitmap_init::$7 != 7 from [48] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [145] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [144] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [165] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [164] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [144] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [143] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [164] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [163] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
@ -1238,7 +1236,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
Alias abs_u16::w#0 = bitmap_line::$0
@ -1440,8 +1437,6 @@ Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [16] if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [28] if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [39] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -1485,7 +1480,7 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [2] memset::$4 = (byte*)memset::str#3 keeping memset::str#3
Inlining Noop Cast [4] memset::dst#0 = (byte*)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Rewriting division to use shift [63] bitmap_line::e1#0 = bitmap_line::dy#0 / 2
Rewriting division to use shift [64] bitmap_line::e#0 = bitmap_line::dx#0 / 2

View File

@ -127,7 +127,7 @@ gfx_init_chunky::@8: scope:[gfx_init_chunky] from gfx_init_chunky::@4
gfx_init_chunky::x#4 = phi( gfx_init_chunky::@4/gfx_init_chunky::x#5 )
gfx_init_chunky::gfxbCpuBank#5 = phi( gfx_init_chunky::@4/gfx_init_chunky::gfxbCpuBank#4 )
gfx_init_chunky::gfxbCpuBank#2 = ++ gfx_init_chunky::gfxbCpuBank#5
gfx_init_chunky::gfxb#2 = ((byte*)) $4000
gfx_init_chunky::gfxb#2 = (byte*)$4000
to:gfx_init_chunky::@3
gfx_init_chunky::@5: scope:[gfx_init_chunky] from gfx_init_chunky::@3
gfx_init_chunky::gfxbCpuBank#9 = phi( gfx_init_chunky::@3/gfx_init_chunky::gfxbCpuBank#8 )
@ -301,7 +301,6 @@ Inlining cast *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = (unumber)(unumbe
Inlining cast *VICII_MEMORY = (unumber)(byte)(word)CHUNKY&(unumber)$3fff/(unumber)$40|(unumber)>(word)CHUNKY&(unumber)$3fff/(unumber)4
Inlining cast *VICII_CONTROL1 = (unumber)VICII_DEN|VICII_ECM|VICII_RSEL|(unumber)3
Inlining cast *BORDER_COLOR = (unumber)0
Inlining cast gfx_init_chunky::gfxb#2 = (byte*)$4000
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53280

View File

@ -2845,7 +2845,7 @@ gfx_init_plane_fill: {
lda.z __5+1
and #>$3fff
sta.z __5+1
// $4000 + (<plane_addr & $3fff)
// byte* gfxb = (byte*)$4000 + (<plane_addr & $3fff)
clc
lda.z gfxb
adc #<$4000

View File

@ -1521,169 +1521,168 @@ gfx_init_plane_fill: scope:[gfx_init_plane_fill] from gfx_init_plane_blank gfx_
gfx_init_plane_fill::@5: scope:[gfx_init_plane_fill] from gfx_init_plane_fill
[725] gfx_init_plane_fill::$4 = < gfx_init_plane_fill::plane_addr#3
[726] gfx_init_plane_fill::$5 = gfx_init_plane_fill::$4 & $3fff
[727] gfx_init_plane_fill::gfxb#0 = $4000 + gfx_init_plane_fill::$5
[728] gfx_init_plane_fill::gfxb#6 = (byte*)gfx_init_plane_fill::gfxb#0
[727] gfx_init_plane_fill::gfxb#0 = (byte*) 16384 + gfx_init_plane_fill::$5
to:gfx_init_plane_fill::@1
gfx_init_plane_fill::@1: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@3 gfx_init_plane_fill::@5
[729] gfx_init_plane_fill::by#4 = phi( gfx_init_plane_fill::@3/gfx_init_plane_fill::by#1, gfx_init_plane_fill::@5/0 )
[729] gfx_init_plane_fill::gfxb#3 = phi( gfx_init_plane_fill::@3/gfx_init_plane_fill::gfxb#1, gfx_init_plane_fill::@5/gfx_init_plane_fill::gfxb#6 )
[728] gfx_init_plane_fill::by#4 = phi( gfx_init_plane_fill::@3/gfx_init_plane_fill::by#1, gfx_init_plane_fill::@5/0 )
[728] gfx_init_plane_fill::gfxb#3 = phi( gfx_init_plane_fill::@3/gfx_init_plane_fill::gfxb#1, gfx_init_plane_fill::@5/gfx_init_plane_fill::gfxb#0 )
to:gfx_init_plane_fill::@2
gfx_init_plane_fill::@2: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@1 gfx_init_plane_fill::@2
[730] gfx_init_plane_fill::bx#2 = phi( gfx_init_plane_fill::@1/0, gfx_init_plane_fill::@2/gfx_init_plane_fill::bx#1 )
[730] gfx_init_plane_fill::gfxb#2 = phi( gfx_init_plane_fill::@1/gfx_init_plane_fill::gfxb#3, gfx_init_plane_fill::@2/gfx_init_plane_fill::gfxb#1 )
[731] *gfx_init_plane_fill::gfxb#2 = gfx_init_plane_fill::fill#6
[732] gfx_init_plane_fill::gfxb#1 = ++ gfx_init_plane_fill::gfxb#2
[733] gfx_init_plane_fill::bx#1 = ++ gfx_init_plane_fill::bx#2
[734] if(gfx_init_plane_fill::bx#1!=$28) goto gfx_init_plane_fill::@2
[729] gfx_init_plane_fill::bx#2 = phi( gfx_init_plane_fill::@1/0, gfx_init_plane_fill::@2/gfx_init_plane_fill::bx#1 )
[729] gfx_init_plane_fill::gfxb#2 = phi( gfx_init_plane_fill::@1/gfx_init_plane_fill::gfxb#3, gfx_init_plane_fill::@2/gfx_init_plane_fill::gfxb#1 )
[730] *gfx_init_plane_fill::gfxb#2 = gfx_init_plane_fill::fill#6
[731] gfx_init_plane_fill::gfxb#1 = ++ gfx_init_plane_fill::gfxb#2
[732] gfx_init_plane_fill::bx#1 = ++ gfx_init_plane_fill::bx#2
[733] if(gfx_init_plane_fill::bx#1!=$28) goto gfx_init_plane_fill::@2
to:gfx_init_plane_fill::@3
gfx_init_plane_fill::@3: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@2
[735] gfx_init_plane_fill::by#1 = ++ gfx_init_plane_fill::by#4
[736] if(gfx_init_plane_fill::by#1!=$c8) goto gfx_init_plane_fill::@1
[734] gfx_init_plane_fill::by#1 = ++ gfx_init_plane_fill::by#4
[735] if(gfx_init_plane_fill::by#1!=$c8) goto gfx_init_plane_fill::@1
to:gfx_init_plane_fill::@4
gfx_init_plane_fill::@4: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@3
[737] phi()
[738] call dtvSetCpuBankSegment1
[736] phi()
[737] call dtvSetCpuBankSegment1
to:gfx_init_plane_fill::@return
gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@4
[739] return
[738] return
to:@return
void* memset(void* memset::str , byte memset::c , word memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1 print_cls
[740] memset::c#5 = phi( bitmap_clear/bitmap_clear::col#0, bitmap_clear::@1/0, print_cls/' ' )
[740] memset::str#4 = phi( bitmap_clear/(void*)VICII_SCREEN0, bitmap_clear::@1/(void*)VICII_BITMAP, print_cls/memset::str#0 )
[740] memset::num#3 = phi( bitmap_clear/$3e8, bitmap_clear::@1/$1f40, print_cls/$3e8 )
[741] if(memset::num#3<=0) goto memset::@return
[739] memset::c#5 = phi( bitmap_clear/bitmap_clear::col#0, bitmap_clear::@1/0, print_cls/' ' )
[739] memset::str#4 = phi( bitmap_clear/(void*)VICII_SCREEN0, bitmap_clear::@1/(void*)VICII_BITMAP, print_cls/memset::str#0 )
[739] memset::num#3 = phi( bitmap_clear/$3e8, bitmap_clear::@1/$1f40, print_cls/$3e8 )
[740] if(memset::num#3<=0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[742] memset::end#0 = (byte*)memset::str#4 + memset::num#3
[743] memset::dst#4 = (byte*)memset::str#4
[741] memset::end#0 = (byte*)memset::str#4 + memset::num#3
[742] memset::dst#4 = (byte*)memset::str#4
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[744] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[745] if(memset::dst#2!=memset::end#0) goto memset::@3
[743] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[744] if(memset::dst#2!=memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[746] return
[745] return
to:@return
memset::@3: scope:[memset] from memset::@2
[747] *memset::dst#2 = memset::c#5
[748] memset::dst#1 = ++ memset::dst#2
[746] *memset::dst#2 = memset::c#5
[747] memset::dst#1 = ++ memset::dst#2
to:memset::@2
void print_char(byte print_char::ch)
print_char: scope:[print_char] from print_str_lines::@4
[749] *print_char_cursor#43 = print_char::ch#0
[750] print_char_cursor#29 = ++ print_char_cursor#43
[748] *print_char_cursor#43 = print_char::ch#0
[749] print_char_cursor#29 = ++ print_char_cursor#43
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[751] return
[750] return
to:@return
void print_ln()
print_ln: scope:[print_ln] from print_str_lines::@5
[752] phi()
[751] phi()
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[753] print_line_cursor#22 = phi( print_ln/print_line_cursor#1, print_ln::@1/print_line_cursor#2 )
[754] print_line_cursor#2 = print_line_cursor#22 + $28
[755] if(print_line_cursor#2<print_char_cursor#44) goto print_ln::@1
[752] print_line_cursor#22 = phi( print_ln/print_line_cursor#1, print_ln::@1/print_line_cursor#2 )
[753] print_line_cursor#2 = print_line_cursor#22 + $28
[754] if(print_line_cursor#2<print_char_cursor#44) goto print_ln::@1
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[756] return
[755] return
to:@return
byte* form_field_ptr(byte form_field_ptr::field_idx)
form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2
[757] form_field_ptr::field_idx#2 = phi( form_control/form_field_ptr::field_idx#1, form_render_values::@2/form_field_ptr::field_idx#0 )
[758] form_field_ptr::y#0 = form_fields_y[form_field_ptr::field_idx#2]
[759] form_field_ptr::line#0 = form_line_hi[form_field_ptr::y#0] w= form_line_lo[form_field_ptr::y#0]
[760] form_field_ptr::x#0 = form_fields_x[form_field_ptr::field_idx#2]
[761] form_field_ptr::return#0 = (byte*)form_field_ptr::line#0 + form_field_ptr::x#0
[756] form_field_ptr::field_idx#2 = phi( form_control/form_field_ptr::field_idx#1, form_render_values::@2/form_field_ptr::field_idx#0 )
[757] form_field_ptr::y#0 = form_fields_y[form_field_ptr::field_idx#2]
[758] form_field_ptr::line#0 = form_line_hi[form_field_ptr::y#0] w= form_line_lo[form_field_ptr::y#0]
[759] form_field_ptr::x#0 = form_fields_x[form_field_ptr::field_idx#2]
[760] form_field_ptr::return#0 = (byte*)form_field_ptr::line#0 + form_field_ptr::x#0
to:form_field_ptr::@return
form_field_ptr::@return: scope:[form_field_ptr] from form_field_ptr
[762] return
[761] return
to:@return
void print_str_at(byte* print_str_at::str , byte* print_str_at::at)
print_str_at: scope:[print_str_at] from render_preset_name::@2
[763] phi()
[762] phi()
to:print_str_at::@1
print_str_at::@1: scope:[print_str_at] from print_str_at print_str_at::@2
[764] print_str_at::at#2 = phi( print_str_at/FORM_SCREEN+$28*2+$a, print_str_at::@2/print_str_at::at#0 )
[764] print_str_at::str#2 = phi( print_str_at/print_str_at::str#1, print_str_at::@2/print_str_at::str#0 )
[765] if(0!=*print_str_at::str#2) goto print_str_at::@2
[763] print_str_at::at#2 = phi( print_str_at/FORM_SCREEN+$28*2+$a, print_str_at::@2/print_str_at::at#0 )
[763] print_str_at::str#2 = phi( print_str_at/print_str_at::str#1, print_str_at::@2/print_str_at::str#0 )
[764] if(0!=*print_str_at::str#2) goto print_str_at::@2
to:print_str_at::@return
print_str_at::@return: scope:[print_str_at] from print_str_at::@1
[766] return
[765] return
to:@return
print_str_at::@2: scope:[print_str_at] from print_str_at::@1
[767] *print_str_at::at#2 = *print_str_at::str#2
[768] print_str_at::at#0 = ++ print_str_at::at#2
[769] print_str_at::str#0 = ++ print_str_at::str#2
[766] *print_str_at::at#2 = *print_str_at::str#2
[767] print_str_at::at#0 = ++ print_str_at::at#2
[768] print_str_at::str#0 = ++ print_str_at::str#2
to:print_str_at::@1
byte keyboard_matrix_read(byte keyboard_matrix_read::rowid)
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7
[770] *((byte*)CIA1) = keyboard_matrix_row_bitmask[keyboard_matrix_read::rowid#0]
[771] keyboard_matrix_read::return#0 = ~ *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B)
[769] *((byte*)CIA1) = keyboard_matrix_row_bitmask[keyboard_matrix_read::rowid#0]
[770] keyboard_matrix_read::return#0 = ~ *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B)
to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
[772] return
[771] return
to:@return
byte keyboard_event_pressed(byte keyboard_event_pressed::keycode)
keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3
[773] keyboard_event_pressed::keycode#4 = phi( keyboard_event_scan::@1/KEY_RSHIFT, keyboard_event_scan::@17/KEY_LSHIFT, keyboard_event_scan::@2/KEY_CTRL, keyboard_event_scan::@3/KEY_COMMODORE )
[774] keyboard_event_pressed::$0 = keyboard_event_pressed::keycode#4 >> 3
[775] keyboard_event_pressed::row_bits#0 = keyboard_scan_values[keyboard_event_pressed::$0]
[776] keyboard_event_pressed::$1 = keyboard_event_pressed::keycode#4 & 7
[777] keyboard_event_pressed::return#10 = keyboard_event_pressed::row_bits#0 & keyboard_matrix_col_bitmask[keyboard_event_pressed::$1]
[772] keyboard_event_pressed::keycode#4 = phi( keyboard_event_scan::@1/KEY_RSHIFT, keyboard_event_scan::@17/KEY_LSHIFT, keyboard_event_scan::@2/KEY_CTRL, keyboard_event_scan::@3/KEY_COMMODORE )
[773] keyboard_event_pressed::$0 = keyboard_event_pressed::keycode#4 >> 3
[774] keyboard_event_pressed::row_bits#0 = keyboard_scan_values[keyboard_event_pressed::$0]
[775] keyboard_event_pressed::$1 = keyboard_event_pressed::keycode#4 & 7
[776] keyboard_event_pressed::return#10 = keyboard_event_pressed::row_bits#0 & keyboard_matrix_col_bitmask[keyboard_event_pressed::$1]
to:keyboard_event_pressed::@return
keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed
[778] return
[777] return
to:@return
word abs_u16(word abs_u16::w)
abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12
[779] abs_u16::w#2 = phi( bitmap_line/abs_u16::w#0, bitmap_line::@12/abs_u16::w#1 )
[780] abs_u16::$0 = > abs_u16::w#2
[781] abs_u16::$1 = abs_u16::$0 & $80
[782] if(0!=abs_u16::$1) goto abs_u16::@1
[778] abs_u16::w#2 = phi( bitmap_line/abs_u16::w#0, bitmap_line::@12/abs_u16::w#1 )
[779] abs_u16::$0 = > abs_u16::w#2
[780] abs_u16::$1 = abs_u16::$0 & $80
[781] if(0!=abs_u16::$1) goto abs_u16::@1
to:abs_u16::@return
abs_u16::@1: scope:[abs_u16] from abs_u16
[783] abs_u16::return#2 = - abs_u16::w#2
[782] abs_u16::return#2 = - abs_u16::w#2
to:abs_u16::@return
abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1
[784] abs_u16::return#4 = phi( abs_u16::@1/abs_u16::return#2, abs_u16/abs_u16::w#2 )
[785] return
[783] abs_u16::return#4 = phi( abs_u16::@1/abs_u16::return#2, abs_u16/abs_u16::w#2 )
[784] return
to:@return
word sgn_u16(word sgn_u16::w)
sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14
[786] sgn_u16::w#2 = phi( bitmap_line::@1/sgn_u16::w#0, bitmap_line::@14/sgn_u16::w#1 )
[787] sgn_u16::$0 = > sgn_u16::w#2
[788] sgn_u16::$1 = sgn_u16::$0 & $80
[789] if(0!=sgn_u16::$1) goto sgn_u16::@1
[785] sgn_u16::w#2 = phi( bitmap_line::@1/sgn_u16::w#0, bitmap_line::@14/sgn_u16::w#1 )
[786] sgn_u16::$0 = > sgn_u16::w#2
[787] sgn_u16::$1 = sgn_u16::$0 & $80
[788] if(0!=sgn_u16::$1) goto sgn_u16::@1
to:sgn_u16::@return
sgn_u16::@1: scope:[sgn_u16] from sgn_u16
[790] phi()
[789] phi()
to:sgn_u16::@return
sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1
[791] sgn_u16::return#4 = phi( sgn_u16::@1/-1, sgn_u16/1 )
[792] return
[790] sgn_u16::return#4 = phi( sgn_u16::@1/-1, sgn_u16/1 )
[791] return
to:@return
void bitmap_plot(word bitmap_plot::x , byte bitmap_plot::y)
bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9
[793] bitmap_plot::x#4 = phi( bitmap_line::@3/bitmap_plot::x#2, bitmap_line::@4/bitmap_plot::x#0, bitmap_line::@6/bitmap_plot::x#1, bitmap_line::@9/bitmap_plot::x#3 )
[793] bitmap_plot::y#4 = phi( bitmap_line::@3/bitmap_plot::y#2, bitmap_line::@4/bitmap_plot::y#0, bitmap_line::@6/bitmap_plot::y#1, bitmap_line::@9/bitmap_plot::y#3 )
[794] bitmap_plot::plotter#0 = bitmap_plot_yhi[bitmap_plot::y#4] w= bitmap_plot_ylo[bitmap_plot::y#4]
[795] bitmap_plot::$0 = bitmap_plot::x#4 & $fff8
[796] bitmap_plot::plotter#1 = (byte*)bitmap_plot::plotter#0 + bitmap_plot::$0
[797] bitmap_plot::$1 = < bitmap_plot::x#4
[798] *bitmap_plot::plotter#1 = *bitmap_plot::plotter#1 | bitmap_plot_bit[bitmap_plot::$1]
[792] bitmap_plot::x#4 = phi( bitmap_line::@3/bitmap_plot::x#2, bitmap_line::@4/bitmap_plot::x#0, bitmap_line::@6/bitmap_plot::x#1, bitmap_line::@9/bitmap_plot::x#3 )
[792] bitmap_plot::y#4 = phi( bitmap_line::@3/bitmap_plot::y#2, bitmap_line::@4/bitmap_plot::y#0, bitmap_line::@6/bitmap_plot::y#1, bitmap_line::@9/bitmap_plot::y#3 )
[793] bitmap_plot::plotter#0 = bitmap_plot_yhi[bitmap_plot::y#4] w= bitmap_plot_ylo[bitmap_plot::y#4]
[794] bitmap_plot::$0 = bitmap_plot::x#4 & $fff8
[795] bitmap_plot::plotter#1 = (byte*)bitmap_plot::plotter#0 + bitmap_plot::$0
[796] bitmap_plot::$1 = < bitmap_plot::x#4
[797] *bitmap_plot::plotter#1 = *bitmap_plot::plotter#1 | bitmap_plot_bit[bitmap_plot::$1]
to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
[799] return
[798] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -432,13 +432,12 @@ byte gfx_init_plane_fill::by
byte gfx_init_plane_fill::by#1 by zp[1]:10 15001.5
byte gfx_init_plane_fill::by#4 by zp[1]:10 3333.6666666666665
byte gfx_init_plane_fill::fill
byte gfx_init_plane_fill::fill#6 fill zp[1]:9 5555.611111111111
byte gfx_init_plane_fill::fill#6 fill zp[1]:9 5882.411764705882
byte* gfx_init_plane_fill::gfxb
word gfx_init_plane_fill::gfxb#0 gfxb zp[2]:11 1001.0
byte* gfx_init_plane_fill::gfxb#0 gfxb zp[2]:11 2002.0
byte* gfx_init_plane_fill::gfxb#1 gfxb zp[2]:11 42000.600000000006
byte* gfx_init_plane_fill::gfxb#2 gfxb zp[2]:11 155002.0
byte* gfx_init_plane_fill::gfxb#3 gfxb zp[2]:11 21003.0
byte* gfx_init_plane_fill::gfxb#6 gfxb zp[2]:11 2002.0
byte gfx_init_plane_fill::gfxbCpuBank
byte gfx_init_plane_fill::gfxbCpuBank#0 reg byte a 2002.0
dword gfx_init_plane_fill::plane_addr
@ -863,7 +862,7 @@ reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#13 dtvSetCpuBankSegment1::cpuBank
zp[4]:5 [ gfx_init_plane_fill::plane_addr#3 get_plane::return#14 get_plane::return#16 get_plane::return#17 gfx_mode::$20 gfx_mode::plane_a#0 gfx_mode::$34 gfx_mode::plane_b#0 ]
zp[1]:9 [ gfx_init_plane_fill::fill#6 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
zp[1]:10 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 keyboard_events_size#19 keyboard_events_size#107 keyboard_events_size#98 keyboard_events_size#49 keyboard_events_size#28 keyboard_events_size#25 keyboard_events_size#100 keyboard_events_size#106 keyboard_events_size#0 keyboard_events_size#1 keyboard_events_size#3 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
zp[2]:11 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_mode::VICII_colors#2 gfx_mode::VICII_colors#3 gfx_mode::VICII_colors#1 gfx_mode::VICII_colors#0 get_VICII_screen::return#11 get_VICII_screen::return#5 get_VICII_screen::return#10 gfx_mode::$82 gfx_mode::$47 gfx_mode::$48 ]
zp[2]:11 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$5 gfx_init_plane_fill::$4 bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_mode::VICII_colors#2 gfx_mode::VICII_colors#3 gfx_mode::VICII_colors#1 gfx_mode::VICII_colors#0 get_VICII_screen::return#11 get_VICII_screen::return#5 get_VICII_screen::return#10 gfx_mode::$82 gfx_mode::$47 gfx_mode::$48 ]
reg byte x [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ]
zp[2]:13 [ memset::num#3 memset::end#0 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#2 bitmap_plot::x#0 bitmap_plot::x#1 bitmap_plot::x#3 apply_preset::preset#15 print_char_cursor#43 print_char_cursor#2 print_char_cursor#72 print_char_cursor#73 print_char_cursor#44 print_char_cursor#29 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ]
reg byte x [ memset::c#5 ]

View File

@ -2877,7 +2877,7 @@ mode_8bppchunkybmm::@10: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@6
mode_8bppchunkybmm::x#3 = phi( mode_8bppchunkybmm::@6/mode_8bppchunkybmm::x#5 )
mode_8bppchunkybmm::gfxbCpuBank#5 = phi( mode_8bppchunkybmm::@6/mode_8bppchunkybmm::gfxbCpuBank#4 )
mode_8bppchunkybmm::gfxbCpuBank#2 = ++ mode_8bppchunkybmm::gfxbCpuBank#5
mode_8bppchunkybmm::gfxb#2 = ((byte*)) $4000
mode_8bppchunkybmm::gfxb#2 = (byte*)$4000
to:mode_8bppchunkybmm::@5
mode_8bppchunkybmm::@7: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@5
dtv_control#189 = phi( mode_8bppchunkybmm::@5/dtv_control#204 )
@ -5535,7 +5535,6 @@ Inlining cast *DTV_PLANEB_STEP = (unumber)8
Inlining cast *DTV_PLANEB_MODULO_LO = (unumber)0
Inlining cast *DTV_PLANEB_MODULO_HI = (unumber)0
Inlining cast *BORDER_COLOR = (unumber)0
Inlining cast mode_8bppchunkybmm::gfxb#2 = (byte*)$4000
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53280
@ -6238,37 +6237,35 @@ Inferred type updated to byte in mode_8bpppixelcell::$4 = mode_8bpppixelcell::ax
Inferred type updated to byte in mode_8bpppixelcell::$5 = mode_8bpppixelcell::$3 | mode_8bpppixelcell::$4
Inferred type updated to byte in mode_8bpppixelcell::$8 = mode_8bpppixelcell::bits#2 & $80
Inferred type updated to byte in mode_8bpppixelcell::$11 = mode_8bpppixelcell::bits#3 * 2
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#4] w= bitmap_plot_ylo[bitmap_plot::y#4]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [6] memset::$1 = memset::num#3 <= 0 from [5] memset::$0 = memset::num#3 > 0
Inversing boolean not [32] print_str_lines::$0 = 0 == print_str_lines::ch#0 from [31] print_str_lines::$5 = 0 != print_str_lines::ch#0
Inversing boolean not [123] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [122] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [143] bitmap_init::$9 = bitmap_init::$7 != 7 from [142] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [239] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [238] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [259] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [258] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [365] menu::$7 = menu::$5 == 0 from [364] menu::$6 = menu::$5 != 0
Inversing boolean not [374] menu::$11 = menu::$9 == 0 from [373] menu::$10 = menu::$9 != 0
Inversing boolean not [395] menu::$15 = menu::$13 == 0 from [394] menu::$14 = menu::$13 != 0
Inversing boolean not [408] menu::$19 = menu::$17 == 0 from [407] menu::$18 = menu::$17 != 0
Inversing boolean not [421] menu::$23 = menu::$21 == 0 from [420] menu::$22 = menu::$21 != 0
Inversing boolean not [436] menu::$27 = menu::$25 == 0 from [435] menu::$26 = menu::$25 != 0
Inversing boolean not [449] menu::$31 = menu::$29 == 0 from [448] menu::$30 = menu::$29 != 0
Inversing boolean not [462] menu::$35 = menu::$33 == 0 from [461] menu::$34 = menu::$33 != 0
Inversing boolean not [475] menu::$39 = menu::$37 == 0 from [474] menu::$38 = menu::$37 != 0
Inversing boolean not [488] menu::$43 = menu::$41 == 0 from [487] menu::$42 = menu::$41 != 0
Inversing boolean not [501] menu::$47 = menu::$45 == 0 from [500] menu::$46 = menu::$45 != 0
Inversing boolean not [514] menu::$51 = menu::$49 == 0 from [513] menu::$50 = menu::$49 != 0
Inversing boolean not [537] mode_ctrl::$3 = mode_ctrl::$1 == 0 from [536] mode_ctrl::$2 = mode_ctrl::$1 != 0
Inversing boolean not [547] mode_ctrl::$6 = mode_ctrl::$4 == 0 from [546] mode_ctrl::$5 = mode_ctrl::$4 != 0
Inversing boolean not [559] mode_ctrl::$10 = mode_ctrl::$8 == 0 from [558] mode_ctrl::$9 = mode_ctrl::$8 != 0
Inversing boolean not [571] mode_ctrl::$14 = mode_ctrl::$12 == 0 from [570] mode_ctrl::$13 = mode_ctrl::$12 != 0
Inversing boolean not [583] mode_ctrl::$18 = mode_ctrl::$16 == 0 from [582] mode_ctrl::$17 = mode_ctrl::$16 != 0
Inversing boolean not [595] mode_ctrl::$22 = mode_ctrl::$20 == 0 from [594] mode_ctrl::$21 = mode_ctrl::$20 != 0
Inversing boolean not [607] mode_ctrl::$26 = mode_ctrl::$24 == 0 from [606] mode_ctrl::$25 = mode_ctrl::$24 != 0
Inversing boolean not [619] mode_ctrl::$30 = mode_ctrl::$28 == 0 from [618] mode_ctrl::$29 = mode_ctrl::$28 != 0
Inversing boolean not [626] mode_ctrl::$32 = mode_ctrl::ctrl#14 == dtv_control#73 from [625] mode_ctrl::$31 = mode_ctrl::ctrl#14 != dtv_control#73
Inversing boolean not [1323] mode_8bpppixelcell::$10 = mode_8bpppixelcell::$8 == 0 from [1322] mode_8bpppixelcell::$9 = mode_8bpppixelcell::$8 != 0
Inversing boolean not [1381] mode_8bppchunkybmm::$5 = mode_8bppchunkybmm::gfxb#3 != $8000 from [1380] mode_8bppchunkybmm::$4 = mode_8bppchunkybmm::gfxb#3 == $8000
Inversing boolean not [238] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [237] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [258] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [257] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [364] menu::$7 = menu::$5 == 0 from [363] menu::$6 = menu::$5 != 0
Inversing boolean not [373] menu::$11 = menu::$9 == 0 from [372] menu::$10 = menu::$9 != 0
Inversing boolean not [394] menu::$15 = menu::$13 == 0 from [393] menu::$14 = menu::$13 != 0
Inversing boolean not [407] menu::$19 = menu::$17 == 0 from [406] menu::$18 = menu::$17 != 0
Inversing boolean not [420] menu::$23 = menu::$21 == 0 from [419] menu::$22 = menu::$21 != 0
Inversing boolean not [435] menu::$27 = menu::$25 == 0 from [434] menu::$26 = menu::$25 != 0
Inversing boolean not [448] menu::$31 = menu::$29 == 0 from [447] menu::$30 = menu::$29 != 0
Inversing boolean not [461] menu::$35 = menu::$33 == 0 from [460] menu::$34 = menu::$33 != 0
Inversing boolean not [474] menu::$39 = menu::$37 == 0 from [473] menu::$38 = menu::$37 != 0
Inversing boolean not [487] menu::$43 = menu::$41 == 0 from [486] menu::$42 = menu::$41 != 0
Inversing boolean not [500] menu::$47 = menu::$45 == 0 from [499] menu::$46 = menu::$45 != 0
Inversing boolean not [513] menu::$51 = menu::$49 == 0 from [512] menu::$50 = menu::$49 != 0
Inversing boolean not [536] mode_ctrl::$3 = mode_ctrl::$1 == 0 from [535] mode_ctrl::$2 = mode_ctrl::$1 != 0
Inversing boolean not [546] mode_ctrl::$6 = mode_ctrl::$4 == 0 from [545] mode_ctrl::$5 = mode_ctrl::$4 != 0
Inversing boolean not [558] mode_ctrl::$10 = mode_ctrl::$8 == 0 from [557] mode_ctrl::$9 = mode_ctrl::$8 != 0
Inversing boolean not [570] mode_ctrl::$14 = mode_ctrl::$12 == 0 from [569] mode_ctrl::$13 = mode_ctrl::$12 != 0
Inversing boolean not [582] mode_ctrl::$18 = mode_ctrl::$16 == 0 from [581] mode_ctrl::$17 = mode_ctrl::$16 != 0
Inversing boolean not [594] mode_ctrl::$22 = mode_ctrl::$20 == 0 from [593] mode_ctrl::$21 = mode_ctrl::$20 != 0
Inversing boolean not [606] mode_ctrl::$26 = mode_ctrl::$24 == 0 from [605] mode_ctrl::$25 = mode_ctrl::$24 != 0
Inversing boolean not [618] mode_ctrl::$30 = mode_ctrl::$28 == 0 from [617] mode_ctrl::$29 = mode_ctrl::$28 != 0
Inversing boolean not [625] mode_ctrl::$32 = mode_ctrl::ctrl#14 == dtv_control#73 from [624] mode_ctrl::$31 = mode_ctrl::ctrl#14 != dtv_control#73
Inversing boolean not [1322] mode_8bpppixelcell::$10 = mode_8bpppixelcell::$8 == 0 from [1321] mode_8bpppixelcell::$9 = mode_8bpppixelcell::$8 != 0
Inversing boolean not [1380] mode_8bppchunkybmm::$5 = mode_8bppchunkybmm::gfxb#3 != $8000 from [1379] mode_8bppchunkybmm::$4 = mode_8bppchunkybmm::gfxb#3 == $8000
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#3 memset::return#5 memset::return#1
Alias memset::str#4 = memset::str#5
@ -6316,7 +6313,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#11 bitmap_gfx#21
Alias bitmap_screen#1 = bitmap_screen#11 bitmap_screen#21
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#12 = bitmap_gfx#22
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
Alias abs_u16::w#0 = bitmap_line::$0
@ -7347,8 +7343,6 @@ Adding number conversion cast (unumber) $10 in [766] if(mode_8bppchunkybmm::i#1!
Adding number conversion cast (unumber) $140 in [778] if(mode_8bppchunkybmm::x#1!=$140) goto mode_8bppchunkybmm::@4
Adding number conversion cast (unumber) $c8 in [783] if(mode_8bppchunkybmm::y#1!=$c8) goto mode_8bppchunkybmm::@3
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [77] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $10
@ -7478,7 +7472,7 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [6] memset::$4 = (byte*)memset::str#4 keeping memset::str#4
Inlining Noop Cast [8] memset::dst#0 = (byte*)memset::str#4 keeping memset::str#4
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [73] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [73] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Rewriting division to use shift [101] bitmap_line::e1#0 = bitmap_line::dy#0 / 2
Rewriting division to use shift [102] bitmap_line::e#0 = bitmap_line::dx#0 / 2

View File

@ -2049,7 +2049,7 @@ splash_run: {
// *PROCPORT = PROCPORT_RAM_ALL
lda #PROCPORT_RAM_ALL
sta PROCPORT
// memset(0x4000, 0, 0xc00)
// memset((char*)0x4000, 0, 0xc00)
// Reset memory to avoid crashes
lda #<$4000
sta.z memset.str

View File

@ -1449,7 +1449,7 @@ choose_direction::@10: scope:[choose_direction] from choose_direction::@1
void* memset(void* memset::str , byte memset::c , word memset::num)
memset: scope:[memset] from splash_run::@16 splash_run::@23 splash_run::@24 splash_run::@28 splash_run::@34
[776] memset::str#6 = phi( splash_run::@16/(void*) 16384, splash_run::@23/(void*)BANK_1+$2000, splash_run::@24/(void*)BANK_2, splash_run::@28/(void*)BANK_1, splash_run::@34/(void*)INTRO_MUSIC_CRUNCHED_UPPER )
[776] memset::str#6 = phi( splash_run::@16/(void*)(byte*) 16384, splash_run::@23/(void*)BANK_1+$2000, splash_run::@24/(void*)BANK_2, splash_run::@28/(void*)BANK_1, splash_run::@34/(void*)INTRO_MUSIC_CRUNCHED_UPPER )
[776] memset::num#5 = phi( splash_run::@16/$c00, splash_run::@23/$1fff, splash_run::@24/$3fff, splash_run::@28/$1fff, splash_run::@34/INTRO_MUSIC_CRUNCHED_SIZE )
[777] if(memset::num#5<=0) goto memset::@return
to:memset::@1

View File

@ -750,7 +750,7 @@ splash_run::@17: scope:[splash_run] from splash_run::SEI1
*((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) = CIA_INTERRUPT_CLEAR
*PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
*PROCPORT = PROCPORT_RAM_ALL
memset::str#0 = (void*)$4000
memset::str#0 = (void*)(byte*)$4000
memset::c#0 = 0
memset::num#0 = $c00
call memset
@ -6188,7 +6188,7 @@ Simplifying constant integer cast $19
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant pointer cast (void*) 16384
Simplifying constant pointer cast (byte*) 16384
Simplifying constant integer cast 0
Simplifying constant integer cast $c00
Simplifying constant integer cast $2000
@ -7012,59 +7012,56 @@ Inferred type updated to byte in choose_direction::$10 = choose_direction::ydiff
Inferred type updated to byte in choose_direction::$14 = choose_direction::ydiff#2 + 1
Inferred type updated to byte in choose_direction::$18 = choose_direction::xdiff#3 - 1
Inferred type updated to byte in choose_direction::$22 = choose_direction::xdiff#4 + 1
Adding pointer type conversion cast (byte*) render::$7 in render::$7 = render::$1 w= (byte)render::$2
Adding pointer type conversion cast (byte*) render_tiles::$10 in render_tiles::$10 = render_tiles::$4 w= (byte)render_tiles::$5
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [20] memset::$1 = memset::num#5 <= 0 from [19] memset::$0 = memset::num#5 > 0
Inversing boolean not [53] merge_code::$2 = merge_code::cycle_budget#0 != merge_code::RASTER_EXIT from [52] merge_code::$1 = merge_code::cycle_budget#0 == merge_code::RASTER_EXIT
Inversing boolean not [122] pacman_sound_play::$0 = 0 == pacman_ch1_enabled from [121] pacman_sound_play::$4 = 0 != pacman_ch1_enabled
Inversing boolean not [129] pacman_sound_play::$3 = pacman_ch1_idx != pacman_sound_play::$1 from [128] pacman_sound_play::$2 = pacman_ch1_idx == pacman_sound_play::$1
Inversing boolean not [143] init_render_index::$2 = init_render_index::x_col#3 < $18 from [142] init_render_index::$1 = init_render_index::x_col#3 >= $18
Inversing boolean not [170] init_render_index::$8 = init_render_index::ypos_inc_offset#2 < $17 from [169] init_render_index::$7 = init_render_index::ypos_inc_offset#2 >= $17
Inversing boolean not [329] done_run::$9 = 0 == done_run::$8 from [328] done_run::$13 = 0 != done_run::$8
Inversing boolean not [332] done_run::$10 = 0 == music_play_next from [331] done_run::$14 = 0 != music_play_next
Inversing boolean not [406] splash_run::$26 = 0 == splash_run::$25 from [405] splash_run::$35 = 0 != splash_run::$25
Inversing boolean not [495] splash_run::$31 = 0 == splash_run::$30 from [494] splash_run::$36 = 0 != splash_run::$30
Inversing boolean not [498] splash_run::$32 = 0 == music_play_next from [497] splash_run::$37 = 0 != music_play_next
Inversing boolean not [618] level_show::$3 = TILES_TYPE[level_show::tile_left#0] != PILL from [617] level_show::$2 = TILES_TYPE[level_show::tile_left#0] == PILL
Inversing boolean not [627] level_show::$5 = TILES_TYPE[level_show::tile_right#0] != PILL from [626] level_show::$4 = TILES_TYPE[level_show::tile_right#0] == PILL
Inversing boolean not [694] init_level_tile_directions::$5 = TILES_TYPE[init_level_tile_directions::$3] == WALL from [693] init_level_tile_directions::$4 = TILES_TYPE[init_level_tile_directions::$3] != WALL
Inversing boolean not [708] init_level_tile_directions::$9 = TILES_TYPE[init_level_tile_directions::$7] == WALL from [707] init_level_tile_directions::$8 = TILES_TYPE[init_level_tile_directions::$7] != WALL
Inversing boolean not [721] init_level_tile_directions::$13 = TILES_TYPE[init_level_tile_directions::$11] == WALL from [720] init_level_tile_directions::$12 = TILES_TYPE[init_level_tile_directions::$11] != WALL
Inversing boolean not [734] init_level_tile_directions::$17 = TILES_TYPE[init_level_tile_directions::$15] == WALL from [733] init_level_tile_directions::$16 = TILES_TYPE[init_level_tile_directions::$15] != WALL
Inversing boolean not [838] game_logic::$1 = game_playable != 0 from [837] game_logic::$0 = game_playable == 0
Inversing boolean not [890] game_logic::$23 = ghosts_mode != FRIGHTENED from [889] game_logic::$22 = ghosts_mode == FRIGHTENED
Inversing boolean not [937] game_logic::$57 = ghosts_mode_count <= $32 from [936] game_logic::$56 = ghosts_mode_count > $32
Inversing boolean not [944] game_logic::$55 = ghosts_mode_count <= $96 from [943] game_logic::$54 = ghosts_mode_count > $96
Inversing boolean not [948] game_logic::$51 = ghosts_mode != FRIGHTENED from [947] game_logic::$50 = ghosts_mode == FRIGHTENED
Inversing boolean not [952] game_logic::$53 = ghosts_mode_count <= $32 from [951] game_logic::$52 = ghosts_mode_count > $32
Inversing boolean not [962] game_logic::$58 = 0 == game_logic::do_reverse#4 from [961] game_logic::$219 = 0 != game_logic::do_reverse#4
Inversing boolean not [992] game_logic::$74 = pill_count != 0 from [991] game_logic::$73 = pill_count == 0
Inversing boolean not [996] game_logic::$64 = TILES_TYPE[game_logic::tile_id#1] != POWERUP from [995] game_logic::$63 = TILES_TYPE[game_logic::tile_id#1] == POWERUP
Inversing boolean not [1073] game_logic::$124 = ghost4_respawn != 0 from [1072] game_logic::$123 = ghost4_respawn == 0
Inversing boolean not [1085] game_logic::$108 = ghost4_direction != UP from [1084] game_logic::$107 = ghost4_direction == UP
Inversing boolean not [1142] game_logic::$122 = ghost4_xfine != $61 from [1141] game_logic::$121 = ghost4_xfine == $61
Inversing boolean not [1151] game_logic::$145 = ghost3_respawn != 0 from [1150] game_logic::$144 = ghost3_respawn == 0
Inversing boolean not [1163] game_logic::$129 = ghost3_direction != UP from [1162] game_logic::$128 = ghost3_direction == UP
Inversing boolean not [1220] game_logic::$143 = ghost3_xfine != $61 from [1219] game_logic::$142 = ghost3_xfine == $61
Inversing boolean not [1229] game_logic::$166 = ghost2_respawn != 0 from [1228] game_logic::$165 = ghost2_respawn == 0
Inversing boolean not [1241] game_logic::$150 = ghost2_direction != UP from [1240] game_logic::$149 = ghost2_direction == UP
Inversing boolean not [1298] game_logic::$164 = ghost2_xfine != $61 from [1297] game_logic::$163 = ghost2_xfine == $61
Inversing boolean not [1307] game_logic::$187 = ghost1_respawn != 0 from [1306] game_logic::$186 = ghost1_respawn == 0
Inversing boolean not [1319] game_logic::$171 = ghost1_direction != UP from [1318] game_logic::$170 = ghost1_direction == UP
Inversing boolean not [1376] game_logic::$185 = ghost1_xfine != $61 from [1375] game_logic::$184 = ghost1_xfine == $61
Inversing boolean not [1391] game_logic::$192 = pacman_direction != UP from [1390] game_logic::$191 = pacman_direction == UP
Inversing boolean not [1419] game_logic::$203 = game_logic::joy_directions#0 == 0 from [1418] game_logic::$202 = game_logic::joy_directions#0 != 0
Inversing boolean not [1427] game_logic::$206 = game_logic::new_direction#0 == 0 from [1426] game_logic::$205 = game_logic::new_direction#0 != 0
Inversing boolean not [1433] game_logic::$209 = pacman_xfine != $61 from [1432] game_logic::$208 = pacman_xfine == $61
Inversing boolean not [1445] choose_direction::$3 = 0 == choose_direction::$2 from [1444] choose_direction::$26 = 0 != choose_direction::$2
Inversing boolean not [1450] choose_direction::$5 = 0 == choose_direction::$4 from [1449] choose_direction::$27 = 0 != choose_direction::$4
Inversing boolean not [1457] choose_direction::$13 = choose_direction::dist_up#0 >= choose_direction::dist_min#5 from [1456] choose_direction::$12 = choose_direction::dist_up#0 < choose_direction::dist_min#5
Inversing boolean not [1465] choose_direction::$7 = 0 == choose_direction::$6 from [1464] choose_direction::$28 = 0 != choose_direction::$6
Inversing boolean not [1472] choose_direction::$17 = choose_direction::dist_down#0 >= choose_direction::dist_min#6 from [1471] choose_direction::$16 = choose_direction::dist_down#0 < choose_direction::dist_min#6
Inversing boolean not [1480] choose_direction::$9 = 0 == choose_direction::$8 from [1479] choose_direction::$29 = 0 != choose_direction::$8
Inversing boolean not [1487] choose_direction::$21 = choose_direction::dist_left#0 >= choose_direction::dist_min#7 from [1486] choose_direction::$20 = choose_direction::dist_left#0 < choose_direction::dist_min#7
Inversing boolean not [1499] choose_direction::$25 = choose_direction::dist_right#0 >= choose_direction::dist_min#8 from [1498] choose_direction::$24 = choose_direction::dist_right#0 < choose_direction::dist_min#8
Inversing boolean not [327] done_run::$9 = 0 == done_run::$8 from [326] done_run::$13 = 0 != done_run::$8
Inversing boolean not [330] done_run::$10 = 0 == music_play_next from [329] done_run::$14 = 0 != music_play_next
Inversing boolean not [404] splash_run::$26 = 0 == splash_run::$25 from [403] splash_run::$35 = 0 != splash_run::$25
Inversing boolean not [493] splash_run::$31 = 0 == splash_run::$30 from [492] splash_run::$36 = 0 != splash_run::$30
Inversing boolean not [496] splash_run::$32 = 0 == music_play_next from [495] splash_run::$37 = 0 != music_play_next
Inversing boolean not [616] level_show::$3 = TILES_TYPE[level_show::tile_left#0] != PILL from [615] level_show::$2 = TILES_TYPE[level_show::tile_left#0] == PILL
Inversing boolean not [625] level_show::$5 = TILES_TYPE[level_show::tile_right#0] != PILL from [624] level_show::$4 = TILES_TYPE[level_show::tile_right#0] == PILL
Inversing boolean not [692] init_level_tile_directions::$5 = TILES_TYPE[init_level_tile_directions::$3] == WALL from [691] init_level_tile_directions::$4 = TILES_TYPE[init_level_tile_directions::$3] != WALL
Inversing boolean not [706] init_level_tile_directions::$9 = TILES_TYPE[init_level_tile_directions::$7] == WALL from [705] init_level_tile_directions::$8 = TILES_TYPE[init_level_tile_directions::$7] != WALL
Inversing boolean not [719] init_level_tile_directions::$13 = TILES_TYPE[init_level_tile_directions::$11] == WALL from [718] init_level_tile_directions::$12 = TILES_TYPE[init_level_tile_directions::$11] != WALL
Inversing boolean not [732] init_level_tile_directions::$17 = TILES_TYPE[init_level_tile_directions::$15] == WALL from [731] init_level_tile_directions::$16 = TILES_TYPE[init_level_tile_directions::$15] != WALL
Inversing boolean not [836] game_logic::$1 = game_playable != 0 from [835] game_logic::$0 = game_playable == 0
Inversing boolean not [888] game_logic::$23 = ghosts_mode != FRIGHTENED from [887] game_logic::$22 = ghosts_mode == FRIGHTENED
Inversing boolean not [935] game_logic::$57 = ghosts_mode_count <= $32 from [934] game_logic::$56 = ghosts_mode_count > $32
Inversing boolean not [942] game_logic::$55 = ghosts_mode_count <= $96 from [941] game_logic::$54 = ghosts_mode_count > $96
Inversing boolean not [946] game_logic::$51 = ghosts_mode != FRIGHTENED from [945] game_logic::$50 = ghosts_mode == FRIGHTENED
Inversing boolean not [950] game_logic::$53 = ghosts_mode_count <= $32 from [949] game_logic::$52 = ghosts_mode_count > $32
Inversing boolean not [960] game_logic::$58 = 0 == game_logic::do_reverse#4 from [959] game_logic::$219 = 0 != game_logic::do_reverse#4
Inversing boolean not [990] game_logic::$74 = pill_count != 0 from [989] game_logic::$73 = pill_count == 0
Inversing boolean not [994] game_logic::$64 = TILES_TYPE[game_logic::tile_id#1] != POWERUP from [993] game_logic::$63 = TILES_TYPE[game_logic::tile_id#1] == POWERUP
Inversing boolean not [1071] game_logic::$124 = ghost4_respawn != 0 from [1070] game_logic::$123 = ghost4_respawn == 0
Inversing boolean not [1083] game_logic::$108 = ghost4_direction != UP from [1082] game_logic::$107 = ghost4_direction == UP
Inversing boolean not [1140] game_logic::$122 = ghost4_xfine != $61 from [1139] game_logic::$121 = ghost4_xfine == $61
Inversing boolean not [1149] game_logic::$145 = ghost3_respawn != 0 from [1148] game_logic::$144 = ghost3_respawn == 0
Inversing boolean not [1161] game_logic::$129 = ghost3_direction != UP from [1160] game_logic::$128 = ghost3_direction == UP
Inversing boolean not [1218] game_logic::$143 = ghost3_xfine != $61 from [1217] game_logic::$142 = ghost3_xfine == $61
Inversing boolean not [1227] game_logic::$166 = ghost2_respawn != 0 from [1226] game_logic::$165 = ghost2_respawn == 0
Inversing boolean not [1239] game_logic::$150 = ghost2_direction != UP from [1238] game_logic::$149 = ghost2_direction == UP
Inversing boolean not [1296] game_logic::$164 = ghost2_xfine != $61 from [1295] game_logic::$163 = ghost2_xfine == $61
Inversing boolean not [1305] game_logic::$187 = ghost1_respawn != 0 from [1304] game_logic::$186 = ghost1_respawn == 0
Inversing boolean not [1317] game_logic::$171 = ghost1_direction != UP from [1316] game_logic::$170 = ghost1_direction == UP
Inversing boolean not [1374] game_logic::$185 = ghost1_xfine != $61 from [1373] game_logic::$184 = ghost1_xfine == $61
Inversing boolean not [1389] game_logic::$192 = pacman_direction != UP from [1388] game_logic::$191 = pacman_direction == UP
Inversing boolean not [1417] game_logic::$203 = game_logic::joy_directions#0 == 0 from [1416] game_logic::$202 = game_logic::joy_directions#0 != 0
Inversing boolean not [1425] game_logic::$206 = game_logic::new_direction#0 == 0 from [1424] game_logic::$205 = game_logic::new_direction#0 != 0
Inversing boolean not [1431] game_logic::$209 = pacman_xfine != $61 from [1430] game_logic::$208 = pacman_xfine == $61
Inversing boolean not [1443] choose_direction::$3 = 0 == choose_direction::$2 from [1442] choose_direction::$26 = 0 != choose_direction::$2
Inversing boolean not [1448] choose_direction::$5 = 0 == choose_direction::$4 from [1447] choose_direction::$27 = 0 != choose_direction::$4
Inversing boolean not [1455] choose_direction::$13 = choose_direction::dist_up#0 >= choose_direction::dist_min#5 from [1454] choose_direction::$12 = choose_direction::dist_up#0 < choose_direction::dist_min#5
Inversing boolean not [1463] choose_direction::$7 = 0 == choose_direction::$6 from [1462] choose_direction::$28 = 0 != choose_direction::$6
Inversing boolean not [1470] choose_direction::$17 = choose_direction::dist_down#0 >= choose_direction::dist_min#6 from [1469] choose_direction::$16 = choose_direction::dist_down#0 < choose_direction::dist_min#6
Inversing boolean not [1478] choose_direction::$9 = 0 == choose_direction::$8 from [1477] choose_direction::$29 = 0 != choose_direction::$8
Inversing boolean not [1485] choose_direction::$21 = choose_direction::dist_left#0 >= choose_direction::dist_min#7 from [1484] choose_direction::$20 = choose_direction::dist_left#0 < choose_direction::dist_min#7
Inversing boolean not [1497] choose_direction::$25 = choose_direction::dist_right#0 >= choose_direction::dist_min#8 from [1496] choose_direction::$24 = choose_direction::dist_right#0 < choose_direction::dist_min#8
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)pill_count = gameplay_run::$4
Alias candidate removed (volatile)frame = irq_screen_top::$2
@ -7125,7 +7122,6 @@ Alias init_render_index::x_col#10 = init_render_index::x_col#9 init_render_index
Alias init_render_index::canvas#0 = init_render_index::$4
Alias init_render_index::ypos_inc_offset#2 = init_render_index::ypos_inc_offset#5
Alias render::ytile#0 = render::$0
Alias render::render_index_xcol#0 = render::$7
Alias render::canvas_offset#0 = render::$8
Alias render::canvas1#0 = render::$3
Alias render::canvas2#0 = render::$4
@ -7138,7 +7134,6 @@ Alias render::ypix#1 = render::ypix#2
Alias render::pixels#2 = render::pixels#5 render::pixels#3
Alias render_tiles::tile_left_pixels#0 = render_tiles::$1
Alias render_tiles::tile_right_pixels#0 = render_tiles::$3
Alias render_tiles::render_index_xcol#0 = render_tiles::$10
Alias render_tiles::canvas_offset#0 = render_tiles::$11
Alias render_tiles::canvas1#0 = render_tiles::$6
Alias render_tiles::canvas2#0 = render_tiles::$7
@ -7431,7 +7426,7 @@ Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values memset::return#0 memset::str#6
Identical Phi Values merge_code::raster_code#11 merge_code::raster_code#2
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [401] splash_run::$24 = splash_run::i#2 * 2
Identified duplicate assignment right side [399] splash_run::$24 = splash_run::i#2 * 2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition memcpy::$1 [7] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
Simple Condition memset::$1 [14] if(memset::num#5<=0) goto memset::@1
@ -7625,7 +7620,7 @@ Constant done_run::i1#0 = 0
Constant done_run::gfx#0 = WIN_GFX
Constant done_run::xcol#0 = 0
Constant done_run::ypos#0 = 0
Constant memset::str#0 = (void*) 16384
Constant memset::str#0 = (void*)(byte*) 16384
Constant memset::c#0 = 0
Constant memset::num#0 = $c00
Constant merge_code::dest_code#7 = RASTER_CODE
@ -7810,9 +7805,6 @@ Adding number conversion cast (unumber) 1 in if(ghosts_mode_count<(unumber)$96+1
Adding number conversion cast (unumber) $32+1 in if(ghosts_mode_count<$32+1) goto game_logic::@47
Adding number conversion cast (unumber) 1 in if(ghosts_mode_count<(unumber)$32+1) goto game_logic::@47
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast render::render_index_xcol#0 = (byte*)render::$9
Inlining cast render_tiles::render_index_xcol#0 = (byte*)render_tiles::$12
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 6
Simplifying constant integer cast $c
Simplifying constant integer cast $12
@ -8137,8 +8129,8 @@ Alias candidate removed (volatile)ghost1_direction = game_logic::$182
Inlining Noop Cast [8] memset::$4 = (byte*)memset::str#6 keeping memset::str#6
Inlining Noop Cast [10] memset::dst#0 = (byte*)memset::str#6 keeping memset::str#6
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [110] render::render_index_xcol#0 = (byte*)render::$9 keeping render::render_index_xcol#0
Inlining Noop Cast [132] render_tiles::render_index_xcol#0 = (byte*)render_tiles::$12 keeping render_tiles::render_index_xcol#0
Inlining Noop Cast [110] render::render_index_xcol#0 = (byte*)render::$7 keeping render::render_index_xcol#0
Inlining Noop Cast [132] render_tiles::render_index_xcol#0 = (byte*)render_tiles::$10 keeping render_tiles::render_index_xcol#0
Successful SSA optimization Pass2NopCastInlining
Rewriting multiplication to use shift [83] init_render_index::$9 = init_render_index::x_col#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [88] init_render_index::$10 = init_render_index::$11 * SIZEOF_WORD
@ -8350,7 +8342,7 @@ Constant inlined init_bobs_restore::$2 = 0
Constant inlined init_bobs_restore::$3 = >init_bobs_restore::CANVAS_HIDDEN
Constant inlined memset::str#2 = (void*)BANK_2
Constant inlined memset::str#1 = (void*)BANK_1+$2000
Constant inlined memset::str#0 = (void*) 16384
Constant inlined memset::str#0 = (void*)(byte*) 16384
Constant inlined memset::str#4 = (void*)INTRO_MUSIC_CRUNCHED_UPPER
Constant inlined memset::str#3 = (void*)BANK_1
Constant inlined game_logic::target_xtile1#1 = 2
@ -11281,7 +11273,7 @@ choose_direction::@10: scope:[choose_direction] from choose_direction::@1
void* memset(void* memset::str , byte memset::c , word memset::num)
memset: scope:[memset] from splash_run::@16 splash_run::@23 splash_run::@24 splash_run::@28 splash_run::@34
[776] memset::str#6 = phi( splash_run::@16/(void*) 16384, splash_run::@23/(void*)BANK_1+$2000, splash_run::@24/(void*)BANK_2, splash_run::@28/(void*)BANK_1, splash_run::@34/(void*)INTRO_MUSIC_CRUNCHED_UPPER )
[776] memset::str#6 = phi( splash_run::@16/(void*)(byte*) 16384, splash_run::@23/(void*)BANK_1+$2000, splash_run::@24/(void*)BANK_2, splash_run::@28/(void*)BANK_1, splash_run::@34/(void*)INTRO_MUSIC_CRUNCHED_UPPER )
[776] memset::num#5 = phi( splash_run::@16/$c00, splash_run::@23/$1fff, splash_run::@24/$3fff, splash_run::@28/$1fff, splash_run::@34/INTRO_MUSIC_CRUNCHED_SIZE )
[777] if(memset::num#5<=0) goto memset::@return
to:memset::@1
@ -18417,7 +18409,7 @@ splash_run: {
// Reset memory to avoid crashes
// [776] phi from splash_run::@16 to memset [phi:splash_run::@16->memset]
memset_from___b16:
// [776] phi memset::str#6 = (void*) 16384 [phi:splash_run::@16->memset#0] -- pvoz1=pvoc1
// [776] phi memset::str#6 = (void*)(byte*) 16384 [phi:splash_run::@16->memset#0] -- pvoz1=pvoc1
lda #<$4000
sta.z memset.str
lda #>$4000
@ -27788,11 +27780,11 @@ splash_run: {
// [513] *PROCPORT = PROCPORT_RAM_ALL -- _deref_pbuc1=vbuc2
lda #PROCPORT_RAM_ALL
sta PROCPORT
// memset(0x4000, 0, 0xc00)
// memset((char*)0x4000, 0, 0xc00)
// [514] call memset
// Reset memory to avoid crashes
// [776] phi from splash_run::@16 to memset [phi:splash_run::@16->memset]
// [776] phi memset::str#6 = (void*) 16384 [phi:splash_run::@16->memset#0] -- pvoz1=pvoc1
// [776] phi memset::str#6 = (void*)(byte*) 16384 [phi:splash_run::@16->memset#0] -- pvoz1=pvoc1
lda #<$4000
sta.z memset.str
lda #>$4000

View File

@ -5,7 +5,7 @@ CONTROL FLOW GRAPH SSA
void main()
main: scope:[main] from __start::@1
PLEX_SCREEN_PTR1#0 = ((byte*)) $400
PLEX_SCREEN_PTR1#0 = (byte*)$400
*IRQ = &irq
to:main::@return
main::@return: scope:[main] from main
@ -65,8 +65,6 @@ volatile byte idx loadstore
__interrupt(rom_sys_c64) void irq()
void main()
Inlining cast PLEX_SCREEN_PTR1#0 = (byte*)$400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (void()**) 788
Simplifying constant pointer cast (byte*) 1280
Simplifying constant pointer cast (byte*) 1024

View File

@ -1147,13 +1147,11 @@ Inferred type updated to byte in abs_u16::$1 = abs_u16::$0 & $80
Inferred type updated to byte in sgn_u16::$1 = sgn_u16::$0 & $80
Inferred type updated to byte in lines::$1 = lines::l#3 + 1
Inferred type updated to byte in lines::$2 = lines::l#3 + 1
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#4] w= bitmap_plot_ylo[bitmap_plot::y#4]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [2] memset::$1 = memset::num#2 <= 0 from [1] memset::$0 = memset::num#2 > 0
Inversing boolean not [29] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [28] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [49] bitmap_init::$9 = bitmap_init::$7 != 7 from [48] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [145] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [144] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [165] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [164] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Inversing boolean not [144] bitmap_line::$18 = bitmap_line::dy#3 >= bitmap_line::e#1 from [143] bitmap_line::$17 = bitmap_line::dy#3 < bitmap_line::e#1
Inversing boolean not [164] bitmap_line::$23 = bitmap_line::dx#5 >= bitmap_line::e1#1 from [163] bitmap_line::$22 = bitmap_line::dx#5 < bitmap_line::e1#1
Successful SSA optimization Pass2UnaryNotSimplification
Alias memset::return#0 = memset::str#2 memset::return#4 memset::return#1
Alias memset::str#3 = memset::str#4
@ -1180,7 +1178,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias bitmap_line::x#0 = bitmap_line::x1#1 bitmap_line::x1#4 bitmap_line::x#16 bitmap_line::x1#3 bitmap_line::x#10 bitmap_line::x1#2 bitmap_line::x#19 bitmap_line::x#18 bitmap_line::x#17 bitmap_line::x#3 bitmap_line::x#14 bitmap_line::x#11
Alias bitmap_line::y#0 = bitmap_line::y1#1 bitmap_line::y1#2 bitmap_line::y#16 bitmap_line::y#10 bitmap_line::y1#5 bitmap_line::y1#4 bitmap_line::y#19 bitmap_line::y1#3 bitmap_line::y#18 bitmap_line::y#17 bitmap_line::y#3 bitmap_line::y#14 bitmap_line::y#11
Alias abs_u16::w#0 = bitmap_line::$0
@ -1366,8 +1363,6 @@ Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [16] if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [28] if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [39] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
@ -1391,7 +1386,7 @@ Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [2] memset::$4 = (byte*)memset::str#3 keeping memset::str#3
Inlining Noop Cast [4] memset::dst#0 = (byte*)memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [35] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Rewriting division to use shift [63] bitmap_line::e1#0 = bitmap_line::dy#0 / 2
Rewriting division to use shift [64] bitmap_line::e#0 = bitmap_line::dx#0 / 2

View File

@ -1886,8 +1886,6 @@ Inferred type updated to byte in main::toD0181_$4 = main::toD0181_$3 / 4
Inferred type updated to byte in main::toD0181_$5 = main::toD0181_$4 & $f
Inferred type updated to byte in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Inferred type updated to signed word in render_sine::$5 = render_sine::sin2_val#0 + $a
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#2] w= bitmap_plot_ylo[bitmap_plot::y#2]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [9] divr16u::$4 = divr16u::$2 == 0 from [8] divr16u::$3 = divr16u::$2 != 0
Inversing boolean not [17] divr16u::$9 = divr16u::rem#6 < divr16u::divisor#2 from [16] divr16u::$8 = divr16u::rem#6 >= divr16u::divisor#2
Inversing boolean not [74] mul16u::$3 = mul16u::$1 == 0 from [73] mul16u::$2 = mul16u::$1 != 0
@ -1899,7 +1897,7 @@ Inversing boolean not [228] sin16s::$15 = sin16s::isUpper#2 == 0 from [227] sin1
Inversing boolean not [256] memset::$1 = memset::num#2 <= 0 from [255] memset::$0 = memset::num#2 > 0
Inversing boolean not [283] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [282] bitmap_init::$0 = bitmap_init::bits#1 == 0
Inversing boolean not [303] bitmap_init::$9 = bitmap_init::$7 != 7 from [302] bitmap_init::$8 = bitmap_init::$7 == 7
Inversing boolean not [442] render_sine::$9 = render_sine::xpos#1 != $140 from [441] render_sine::$8 = render_sine::xpos#1 == $140
Inversing boolean not [441] render_sine::$9 = render_sine::xpos#1 != $140 from [440] render_sine::$8 = render_sine::xpos#1 == $140
Successful SSA optimization Pass2UnaryNotSimplification
Alias divr16u::rem#0 = divr16u::$0 divr16u::rem#7
Alias divr16u::dividend#0 = divr16u::$6 divr16u::dividend#8
@ -2011,7 +2009,6 @@ Alias bitmap_gfx#1 = bitmap_gfx#7 bitmap_gfx#13
Alias bitmap_screen#1 = bitmap_screen#7 bitmap_screen#13
Alias bitmap_clear::col#0 = bitmap_clear::$1
Alias bitmap_gfx#14 = bitmap_gfx#8
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Alias main::vicSelectGfxBank1_gfx#0 = main::vicSelectGfxBank1_gfx#1 main::vicSelectGfxBank1_toDd001_gfx#0 main::vicSelectGfxBank1_toDd001_gfx#1
Alias bitmap_gfx#15 = bitmap_gfx#34 bitmap_gfx#35 bitmap_gfx#33 bitmap_gfx#32 bitmap_gfx#31 bitmap_gfx#27 bitmap_gfx#24 bitmap_gfx#20
Alias bitmap_screen#14 = bitmap_screen#33 bitmap_screen#34 bitmap_screen#32 bitmap_screen#31 bitmap_screen#30 bitmap_screen#26 bitmap_screen#23 bitmap_screen#19
@ -2224,8 +2221,6 @@ Adding number conversion cast (unumber) $10 in [13] if(divr16u::i#1!=$10) goto d
Adding number conversion cast (unumber) 0 in [148] if(bitmap_init::x#1!=0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in [160] if(bitmap_init::y#1!=0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [171] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 0
@ -2312,7 +2307,7 @@ Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::toD0181_return#0 = main::toD0181_$2|main::toD0181_$5
Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [62] sin16s_gen2::$8 = (signed word)sin16s_gen2::$7 keeping sin16s_gen2::$8
Inlining Noop Cast [152] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [152] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [102] sin16s::sinx#0 = (signed word)sin16s::usinx#1 keeping sin16s::usinx#1
Inlining Noop Cast [119] memset::$4 = (byte*)memset::str#3 keeping memset::str#3

View File

@ -1164,7 +1164,7 @@ screenlayer::@4: scope:[screenlayer] from screenlayer::@3
CONIO_SCREEN_BANK#88 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 )
vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 )
screenlayer::$1 = vera_layer_get_mapbase_offset::return#4
CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1
CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
@ -4837,7 +4837,6 @@ Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0
Inlining cast memcpy_in_vram::dest_bank#0 = (unumber)0
Inlining cast memcpy_in_vram::src_bank#0 = (unumber)0
Inlining cast gotoxy::x#2 = (unumber)0
Inlining cast CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
Inlining cast uctoa::max_digits#1 = (unumber)3
Inlining cast uctoa::max_digits#2 = (unumber)2
Inlining cast uctoa::max_digits#3 = (unumber)3

View File

@ -275,7 +275,7 @@ main: {
sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y+1
lda #<$64
sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y
// memcpy_to_vram((char)>VERA_SPRITE_ATTR, <VERA_SPRITE_ATTR, &SPRITE_ATTR, sizeof(SPRITE_ATTR))
// memcpy_to_vram((char)>VERA_SPRITE_ATTR, (char*)<VERA_SPRITE_ATTR, &SPRITE_ATTR, sizeof(SPRITE_ATTR))
jsr memcpy_to_vram
// *VERA_CTRL &= ~VERA_DCSEL
// Enable sprites

View File

@ -7,7 +7,7 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Setting inferred volatile on symbol affected by address-of kbhit::ch
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting struct to load/store in variable affected by address-of main::$8 = call memcpy_to_vram (byte)>VERA_SPRITE_ATTR <VERA_SPRITE_ATTR &main::SPRITE_ATTR main::$7
Setting struct to load/store in variable affected by address-of main::$8 = call memcpy_to_vram (byte)>VERA_SPRITE_ATTR (byte*)<VERA_SPRITE_ATTR &main::SPRITE_ATTR main::$7
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
@ -159,7 +159,7 @@ memcpy_bank_to_vram: scope:[memcpy_bank_to_vram] from main::@5 main::@6
memcpy_bank_to_vram::bank#0 = (byte)memcpy_bank_to_vram::$17
memcpy_bank_to_vram::$18 = < memcpy_bank_to_vram::beg#0
memcpy_bank_to_vram::$19 = memcpy_bank_to_vram::$18 & $1fff
memcpy_bank_to_vram::addr#0 = ((byte*)) memcpy_bank_to_vram::$19
memcpy_bank_to_vram::addr#0 = (byte*)memcpy_bank_to_vram::$19
memcpy_bank_to_vram::addr#1 = memcpy_bank_to_vram::addr#0 + $a000
*((byte*)VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A) = (byte)memcpy_bank_to_vram::bank#0
memcpy_bank_to_vram::pos#0 = memcpy_bank_to_vram::beg#0
@ -196,7 +196,7 @@ memcpy_bank_to_vram::@4: scope:[memcpy_bank_to_vram] from memcpy_bank_to_vram::
memcpy_bank_to_vram::bank#2 = phi( memcpy_bank_to_vram::@2/memcpy_bank_to_vram::bank#3 )
memcpy_bank_to_vram::bank#1 = ++ memcpy_bank_to_vram::bank#2
*((byte*)VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A) = (byte)memcpy_bank_to_vram::bank#1
memcpy_bank_to_vram::addr#3 = ((byte*)) $a000
memcpy_bank_to_vram::addr#3 = (byte*)$a000
to:memcpy_bank_to_vram::@3
memcpy_bank_to_vram::@return: scope:[memcpy_bank_to_vram] from memcpy_bank_to_vram::@1
return
@ -275,7 +275,7 @@ load_to_bank::@2: scope:[load_to_bank] from load_to_bank::@1
load_to_bank::bank#0 = (byte)load_to_bank::$12
load_to_bank::$13 = < load_to_bank::address#1
load_to_bank::$14 = load_to_bank::$13 & $1fff
load_to_bank::addr#0 = ((byte*)) load_to_bank::$14
load_to_bank::addr#0 = (byte*)load_to_bank::$14
load_to_bank::addr#1 = load_to_bank::addr#0 + $a000
*((byte*)VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A) = (byte)load_to_bank::bank#0
load::address = load_to_bank::addr#1
@ -1411,7 +1411,7 @@ screenlayer::@4: scope:[screenlayer] from screenlayer::@3
CONIO_SCREEN_BANK#60 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 )
vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 )
screenlayer::$1 = vera_layer_get_mapbase_offset::return#4
CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1
CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
@ -1553,7 +1553,7 @@ main::@7: scope:[main] from main::@6
*((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y) = $64
main::$7 = SIZEOF_STRUCT_VERA_SPRITE
memcpy_to_vram::vbank#0 = (byte)>VERA_SPRITE_ATTR
memcpy_to_vram::vdest#0 = (void*)<VERA_SPRITE_ATTR
memcpy_to_vram::vdest#0 = (void*)(byte*)<VERA_SPRITE_ATTR
memcpy_to_vram::src#0 = (void*)&main::SPRITE_ATTR
memcpy_to_vram::num#0 = main::$7
call memcpy_to_vram
@ -2923,9 +2923,6 @@ Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (unumber) 2 in memcpy_bank_to_vram::src#1 = ((unumber)) main::BANK_SPRITE+(unumber)$20-2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast memcpy_to_vram::s#0 = (byte*)memcpy_to_vram::src#1
Inlining cast memcpy_bank_to_vram::addr#0 = (byte*)memcpy_bank_to_vram::$19
Inlining cast memcpy_bank_to_vram::addr#3 = (byte*)$a000
Inlining cast load_to_bank::addr#0 = (byte*)load_to_bank::$14
Inlining cast load::verify = (unumber)0
Inlining cast vera_layer_rowshift[vera_layer_mode_tile::layer#1] = (unumber)6
Inlining cast vera_layer_rowskip[vera_layer_mode_tile::$13] = (unumber)$40
@ -2960,7 +2957,6 @@ Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0
Inlining cast memcpy_in_vram::dest_bank#0 = (unumber)0
Inlining cast memcpy_in_vram::src_bank#0 = (unumber)0
Inlining cast gotoxy::x#2 = (unumber)0
Inlining cast CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
Inlining cast vera_layer_set_text_color_mode::layer#2 = (unumber)1
Inlining cast screenlayer::layer#1 = (unumber)1
Inlining cast load_to_bank::device#0 = (unumber)8
@ -3559,7 +3555,7 @@ Constant memcpy_bank_to_vram::src#1 = main::BANK_SPRITE+$20-2
Constant memcpy_bank_to_vram::num#1 = (unumber)$40*$20
Constant memcpy_to_vram::num#0 = SIZEOF_STRUCT_VERA_SPRITE
Constant memcpy_to_vram::vbank#0 = (byte)>VERA_SPRITE_ATTR
Constant memcpy_to_vram::vdest#0 = (void*)<VERA_SPRITE_ATTR
Constant memcpy_to_vram::vdest#0 = (void*)(byte*)<VERA_SPRITE_ATTR
Constant memcpy_to_vram::src#0 = (void*)&main::SPRITE_ATTR
Constant CONIO_SCREEN_TEXT#6 = DEFAULT_SCREEN
Constant CONIO_SCREEN_BANK#6 = 0
@ -9750,7 +9746,7 @@ constant void* memcpy_to_vram::src#0 src = (void*)&main::SPRITE_ATTR
byte memcpy_to_vram::vbank
constant byte memcpy_to_vram::vbank#0 vbank = (byte)>VERA_SPRITE_ATTR
void* memcpy_to_vram::vdest
constant void* memcpy_to_vram::vdest#0 vdest = (void*)<VERA_SPRITE_ATTR
constant void* memcpy_to_vram::vdest#0 vdest = (void*)(byte*)<VERA_SPRITE_ATTR
void screenlayer(byte screenlayer::layer)
word~ screenlayer::$2 zp[2]:30 202.0
byte~ screenlayer::$3 reg byte a 202.0
@ -10432,7 +10428,7 @@ main: {
sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y+1
lda #<$64
sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y
// memcpy_to_vram((char)>VERA_SPRITE_ATTR, <VERA_SPRITE_ATTR, &SPRITE_ATTR, sizeof(SPRITE_ATTR))
// memcpy_to_vram((char)>VERA_SPRITE_ATTR, (char*)<VERA_SPRITE_ATTR, &SPRITE_ATTR, sizeof(SPRITE_ATTR))
// [49] call memcpy_to_vram
jsr memcpy_to_vram
// main::@8

View File

@ -298,7 +298,7 @@ constant void* memcpy_to_vram::src#0 src = (void*)&main::SPRITE_ATTR
byte memcpy_to_vram::vbank
constant byte memcpy_to_vram::vbank#0 vbank = (byte)>VERA_SPRITE_ATTR
void* memcpy_to_vram::vdest
constant void* memcpy_to_vram::vdest#0 vdest = (void*)<VERA_SPRITE_ATTR
constant void* memcpy_to_vram::vdest#0 vdest = (void*)(byte*)<VERA_SPRITE_ATTR
void screenlayer(byte screenlayer::layer)
word~ screenlayer::$2 zp[2]:30 202.0
byte~ screenlayer::$3 reg byte a 202.0

View File

@ -288,7 +288,7 @@ main: {
// Copy 8* sprite attributes to VRAM
.label vram_sprite_attr = $a
.label s = 9
// memcpy_to_vram((char)>SPRITE_PIXELS_VRAM, <SPRITE_PIXELS_VRAM, SPRITE_PIXELS, 64*64)
// memcpy_to_vram((char)>SPRITE_PIXELS_VRAM, (char*)<SPRITE_PIXELS_VRAM, SPRITE_PIXELS, 64*64)
// Copy sprite data to VRAM
lda #<$40*$40
sta.z memcpy_to_vram.num
@ -304,7 +304,7 @@ main: {
lda #>SPRITE_PIXELS_VRAM&$ffff
sta.z memcpy_to_vram.vdest+1
jsr memcpy_to_vram
// memcpy_to_vram((char)>VERA_PALETTE, <VERA_PALETTE, SPRITE_PIXELS+64*64, 0x200)
// memcpy_to_vram((char)>VERA_PALETTE, (char*)<VERA_PALETTE, SPRITE_PIXELS+64*64, 0x200)
// Copy sprite palette to VRAM
lda #<$200
sta.z memcpy_to_vram.num

View File

@ -125,7 +125,7 @@ memcpy_to_vram: scope:[memcpy_to_vram] from irq_vsync::@6 main main::@2 main::@
[55] memcpy_to_vram::num#4 = phi( irq_vsync::@6/4, main/(word)$40*$40, main::@2/SIZEOF_STRUCT_VERA_SPRITE, main::@5/$200 )
[55] memcpy_to_vram::src#4 = phi( irq_vsync::@6/(void*)&SPRITE_ATTR+2, main/(void*)SPRITE_PIXELS, main::@2/(void*)&SPRITE_ATTR, main::@5/(void*)SPRITE_PIXELS+(word)$40*$40 )
[55] memcpy_to_vram::vbank#4 = phi( irq_vsync::@6/irq_vsync::vram_sprite_attr_bank, main/0, main::@2/(byte)>VERA_SPRITE_ATTR, main::@5/(byte)>VERA_PALETTE )
[55] memcpy_to_vram::vdest#4 = phi( irq_vsync::@6/memcpy_to_vram::vdest#3, main/(void*)<SPRITE_PIXELS_VRAM, main::@2/memcpy_to_vram::vdest#2, main::@5/(void*)<VERA_PALETTE )
[55] memcpy_to_vram::vdest#4 = phi( irq_vsync::@6/memcpy_to_vram::vdest#3, main/(void*)(byte*)<SPRITE_PIXELS_VRAM, main::@2/memcpy_to_vram::vdest#2, main::@5/(void*)(byte*)<VERA_PALETTE )
[56] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[57] memcpy_to_vram::$0 = < memcpy_to_vram::vdest#4
[58] *VERA_ADDRX_L = memcpy_to_vram::$0

View File

@ -53,14 +53,14 @@ memcpy_to_vram::@return: scope:[memcpy_to_vram] from memcpy_to_vram::@1
void main()
main: scope:[main] from __start::@1
memcpy_to_vram::vbank#0 = (byte)>SPRITE_PIXELS_VRAM
memcpy_to_vram::vdest#0 = (void*)<SPRITE_PIXELS_VRAM
memcpy_to_vram::vdest#0 = (void*)(byte*)<SPRITE_PIXELS_VRAM
memcpy_to_vram::src#0 = (void*)SPRITE_PIXELS
memcpy_to_vram::num#0 = $40*$40
call memcpy_to_vram
to:main::@5
main::@5: scope:[main] from main
memcpy_to_vram::vbank#1 = (byte)>VERA_PALETTE
memcpy_to_vram::vdest#1 = (void*)<VERA_PALETTE
memcpy_to_vram::vdest#1 = (void*)(byte*)<VERA_PALETTE
memcpy_to_vram::src#1 = (void*)SPRITE_PIXELS+$40*$40
memcpy_to_vram::num#1 = $200
call memcpy_to_vram
@ -514,11 +514,11 @@ Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [20] memcpy_to_vram::num#0 = (unumber)$40*$40
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memcpy_to_vram::vbank#0 = (byte)>SPRITE_PIXELS_VRAM
Constant memcpy_to_vram::vdest#0 = (void*)<SPRITE_PIXELS_VRAM
Constant memcpy_to_vram::vdest#0 = (void*)(byte*)<SPRITE_PIXELS_VRAM
Constant memcpy_to_vram::src#0 = (void*)SPRITE_PIXELS
Constant memcpy_to_vram::num#0 = (unumber)$40*$40
Constant memcpy_to_vram::vbank#1 = (byte)>VERA_PALETTE
Constant memcpy_to_vram::vdest#1 = (void*)<VERA_PALETTE
Constant memcpy_to_vram::vdest#1 = (void*)(byte*)<VERA_PALETTE
Constant memcpy_to_vram::src#1 = (void*)SPRITE_PIXELS+(word)$40*$40
Constant memcpy_to_vram::num#1 = $200
Constant main::vram_sprite_attr#0 = (byte*)<VERA_SPRITE_ATTR
@ -568,8 +568,8 @@ Inlining constant with var siblings irq_vsync::s#0
Constant inlined memcpy_to_vram::num#0 = (word)$40*$40
Constant inlined main::s#0 = 0
Constant inlined memcpy_to_vram::src#3 = (void*)&SPRITE_ATTR+2
Constant inlined memcpy_to_vram::vdest#0 = (void*)<SPRITE_PIXELS_VRAM
Constant inlined memcpy_to_vram::vdest#1 = (void*)<VERA_PALETTE
Constant inlined memcpy_to_vram::vdest#0 = (void*)(byte*)<SPRITE_PIXELS_VRAM
Constant inlined memcpy_to_vram::vdest#1 = (void*)(byte*)<VERA_PALETTE
Constant inlined irq_vsync::vram_sprite_pos#0 = (byte*)<VERA_SPRITE_ATTR+2
Constant inlined irq_vsync::s#0 = 0
Constant inlined irq_vsync::$6 = SIZEOF_STRUCT_VERA_SPRITE
@ -770,7 +770,7 @@ memcpy_to_vram: scope:[memcpy_to_vram] from irq_vsync::@6 main main::@2 main::@
[55] memcpy_to_vram::num#4 = phi( irq_vsync::@6/4, main/(word)$40*$40, main::@2/SIZEOF_STRUCT_VERA_SPRITE, main::@5/$200 )
[55] memcpy_to_vram::src#4 = phi( irq_vsync::@6/(void*)&SPRITE_ATTR+2, main/(void*)SPRITE_PIXELS, main::@2/(void*)&SPRITE_ATTR, main::@5/(void*)SPRITE_PIXELS+(word)$40*$40 )
[55] memcpy_to_vram::vbank#4 = phi( irq_vsync::@6/irq_vsync::vram_sprite_attr_bank, main/0, main::@2/(byte)>VERA_SPRITE_ATTR, main::@5/(byte)>VERA_PALETTE )
[55] memcpy_to_vram::vdest#4 = phi( irq_vsync::@6/memcpy_to_vram::vdest#3, main/(void*)<SPRITE_PIXELS_VRAM, main::@2/memcpy_to_vram::vdest#2, main::@5/(void*)<VERA_PALETTE )
[55] memcpy_to_vram::vdest#4 = phi( irq_vsync::@6/memcpy_to_vram::vdest#3, main/(void*)(byte*)<SPRITE_PIXELS_VRAM, main::@2/memcpy_to_vram::vdest#2, main::@5/(void*)(byte*)<VERA_PALETTE )
[56] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[57] memcpy_to_vram::$0 = < memcpy_to_vram::vdest#4
[58] *VERA_ADDRX_L = memcpy_to_vram::$0
@ -1451,7 +1451,7 @@ main: {
sta.z memcpy_to_vram.src+1
// [55] phi memcpy_to_vram::vbank#4 = 0 [phi:main->memcpy_to_vram#2] -- vbuxx=vbuc1
ldx #0
// [55] phi memcpy_to_vram::vdest#4 = (void*)<SPRITE_PIXELS_VRAM [phi:main->memcpy_to_vram#3] -- pvoz1=pvoc1
// [55] phi memcpy_to_vram::vdest#4 = (void*)(byte*)<SPRITE_PIXELS_VRAM [phi:main->memcpy_to_vram#3] -- pvoz1=pvoc1
lda #<SPRITE_PIXELS_VRAM&$ffff
sta.z memcpy_to_vram.vdest
lda #>SPRITE_PIXELS_VRAM&$ffff
@ -1478,7 +1478,7 @@ main: {
sta.z memcpy_to_vram.src+1
// [55] phi memcpy_to_vram::vbank#4 = (byte)>VERA_PALETTE [phi:main::@5->memcpy_to_vram#2] -- vbuxx=vbuc1
ldx #VERA_PALETTE>>$10
// [55] phi memcpy_to_vram::vdest#4 = (void*)<VERA_PALETTE [phi:main::@5->memcpy_to_vram#3] -- pvoz1=pvoc1
// [55] phi memcpy_to_vram::vdest#4 = (void*)(byte*)<VERA_PALETTE [phi:main::@5->memcpy_to_vram#3] -- pvoz1=pvoc1
lda #<VERA_PALETTE&$ffff
sta.z memcpy_to_vram.vdest
lda #>VERA_PALETTE&$ffff
@ -2302,7 +2302,7 @@ main: {
// Copy 8* sprite attributes to VRAM
.label vram_sprite_attr = $a
.label s = 9
// memcpy_to_vram((char)>SPRITE_PIXELS_VRAM, <SPRITE_PIXELS_VRAM, SPRITE_PIXELS, 64*64)
// memcpy_to_vram((char)>SPRITE_PIXELS_VRAM, (char*)<SPRITE_PIXELS_VRAM, SPRITE_PIXELS, 64*64)
// [37] call memcpy_to_vram
// Copy sprite data to VRAM
// [55] phi from main to memcpy_to_vram [phi:main->memcpy_to_vram]
@ -2318,7 +2318,7 @@ main: {
sta.z memcpy_to_vram.src+1
// [55] phi memcpy_to_vram::vbank#4 = 0 [phi:main->memcpy_to_vram#2] -- vbuxx=vbuc1
ldx #0
// [55] phi memcpy_to_vram::vdest#4 = (void*)<SPRITE_PIXELS_VRAM [phi:main->memcpy_to_vram#3] -- pvoz1=pvoc1
// [55] phi memcpy_to_vram::vdest#4 = (void*)(byte*)<SPRITE_PIXELS_VRAM [phi:main->memcpy_to_vram#3] -- pvoz1=pvoc1
lda #<SPRITE_PIXELS_VRAM&$ffff
sta.z memcpy_to_vram.vdest
lda #>SPRITE_PIXELS_VRAM&$ffff
@ -2326,7 +2326,7 @@ main: {
jsr memcpy_to_vram
// [38] phi from main to main::@5 [phi:main->main::@5]
// main::@5
// memcpy_to_vram((char)>VERA_PALETTE, <VERA_PALETTE, SPRITE_PIXELS+64*64, 0x200)
// memcpy_to_vram((char)>VERA_PALETTE, (char*)<VERA_PALETTE, SPRITE_PIXELS+64*64, 0x200)
// [39] call memcpy_to_vram
// Copy sprite palette to VRAM
// [55] phi from main::@5 to memcpy_to_vram [phi:main::@5->memcpy_to_vram]
@ -2342,7 +2342,7 @@ main: {
sta.z memcpy_to_vram.src+1
// [55] phi memcpy_to_vram::vbank#4 = (byte)>VERA_PALETTE [phi:main::@5->memcpy_to_vram#2] -- vbuxx=vbuc1
ldx #VERA_PALETTE>>$10
// [55] phi memcpy_to_vram::vdest#4 = (void*)<VERA_PALETTE [phi:main::@5->memcpy_to_vram#3] -- pvoz1=pvoc1
// [55] phi memcpy_to_vram::vdest#4 = (void*)(byte*)<VERA_PALETTE [phi:main::@5->memcpy_to_vram#3] -- pvoz1=pvoc1
lda #<VERA_PALETTE&$ffff
sta.z memcpy_to_vram.vdest
lda #>VERA_PALETTE&$ffff

View File

@ -1284,7 +1284,7 @@ screenlayer::@4: scope:[screenlayer] from screenlayer::@3
CONIO_SCREEN_BANK#113 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 )
vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 )
screenlayer::$1 = vera_layer_get_mapbase_offset::return#4
CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1
CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
@ -3918,7 +3918,6 @@ Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0
Inlining cast memcpy_in_vram::dest_bank#0 = (unumber)0
Inlining cast memcpy_in_vram::src_bank#0 = (unumber)0
Inlining cast gotoxy::x#2 = (unumber)0
Inlining cast CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
Inlining cast vera_layer_get_tilebase_address::layer#0 = (unumber)1
Inlining cast vera_layer_mode_tile::layer#1 = (unumber)0
Inlining cast vera_layer_mode_tile::mapbase_address#2 = (unumber)$10000

View File

@ -1408,7 +1408,7 @@ screenlayer::@4: scope:[screenlayer] from screenlayer::@3
CONIO_SCREEN_BANK#189 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 )
vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 )
screenlayer::$1 = vera_layer_get_mapbase_offset::return#4
CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1
CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
@ -5799,7 +5799,6 @@ Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0
Inlining cast memcpy_in_vram::dest_bank#0 = (unumber)0
Inlining cast memcpy_in_vram::src_bank#0 = (unumber)0
Inlining cast gotoxy::x#2 = (unumber)0
Inlining cast CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
Inlining cast uctoa::max_digits#1 = (unumber)3
Inlining cast uctoa::max_digits#2 = (unumber)2
Inlining cast uctoa::max_digits#3 = (unumber)3

View File

@ -210,7 +210,7 @@ main: {
.label __40 = $13
.label color = 5
.label x = 3
// memcpy_in_vram(1, 0xF000, VERA_INC_1, 0, 0xF800, VERA_INC_1, 256*8)
// memcpy_in_vram(1, (char*)0xF000, VERA_INC_1, 0, (char*)0xF800, VERA_INC_1, 256*8)
// Before we configure the bitmap pane into vera memory we need to re-arrange a few things!
// It is better to load all in bank 0, but then there is an issue.
// So the default CX16 character set is located in bank 0, at address 0xF800.

View File

@ -432,8 +432,8 @@ void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest
memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2 main
[221] memcpy_in_vram::num#3 = phi( insertup::@2/memcpy_in_vram::num#0, main/$100*8 )
[221] memcpy_in_vram::dest_bank#2 = phi( insertup::@2/0, main/1 )
[221] memcpy_in_vram::dest#2 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*) 61440 )
[221] memcpy_in_vram::src#2 = phi( insertup::@2/memcpy_in_vram::src#3, main/(void*) 63488 )
[221] memcpy_in_vram::dest#2 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*)(byte*) 61440 )
[221] memcpy_in_vram::src#2 = phi( insertup::@2/memcpy_in_vram::src#3, main/(void*)(byte*) 63488 )
[222] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[223] memcpy_in_vram::$0 = < memcpy_in_vram::src#2
[224] *VERA_ADDRX_L = memcpy_in_vram::$0

View File

@ -1475,7 +1475,7 @@ screenlayer::@4: scope:[screenlayer] from screenlayer::@3
CONIO_SCREEN_BANK#94 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 )
vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 )
screenlayer::$1 = vera_layer_get_mapbase_offset::return#4
CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1
CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
@ -1820,7 +1820,7 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear
bitmap_clear::$4 = < bitmap_clear::$3
bitmap_clear::vbank#0 = bitmap_clear::$4
bitmap_clear::$5 = < __bitmap_address
bitmap_clear::vdest#0 = ((void*)) bitmap_clear::$5
bitmap_clear::vdest#0 = (void*)bitmap_clear::$5
memset_vram::vbank#0 = bitmap_clear::vbank#0
memset_vram::vdest#0 = bitmap_clear::vdest#0
memset_vram::data#0 = 0
@ -2501,10 +2501,10 @@ main: scope:[main] from __start::@1
CONIO_SCREEN_TEXT#64 = phi( __start::@1/CONIO_SCREEN_TEXT#36 )
CONIO_SCREEN_BANK#55 = phi( __start::@1/CONIO_SCREEN_BANK#30 )
memcpy_in_vram::dest_bank#1 = 1
memcpy_in_vram::dest#1 = (void*)$f000
memcpy_in_vram::dest#1 = (void*)(byte*)$f000
memcpy_in_vram::dest_increment#1 = VERA_INC_1
memcpy_in_vram::src_bank#1 = 0
memcpy_in_vram::src#1 = (void*)$f800
memcpy_in_vram::src#1 = (void*)(byte*)$f800
memcpy_in_vram::src_increment#1 = VERA_INC_1
memcpy_in_vram::num#1 = $100*8
call memcpy_in_vram
@ -5723,8 +5723,6 @@ Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0
Inlining cast memcpy_in_vram::dest_bank#0 = (unumber)0
Inlining cast memcpy_in_vram::src_bank#0 = (unumber)0
Inlining cast gotoxy::x#2 = (unumber)0
Inlining cast CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
Inlining cast bitmap_clear::vdest#0 = (void*)bitmap_clear::$5
Inlining cast memset_vram::data#0 = (unumber)0
Inlining cast memcpy_in_vram::dest_bank#1 = (unumber)1
Inlining cast memcpy_in_vram::src_bank#1 = (unumber)0
@ -5909,9 +5907,9 @@ Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant pointer cast (void*) 61440
Simplifying constant pointer cast (byte*) 61440
Simplifying constant integer cast 0
Simplifying constant pointer cast (void*) 63488
Simplifying constant pointer cast (byte*) 63488
Simplifying constant integer cast 1
Simplifying constant integer cast $14000
Simplifying constant integer cast $1f000
@ -6781,10 +6779,10 @@ Constant bitmap_line::yd#0 = 0
Constant divr16u::quotient#0 = 0
Constant divr16u::i#0 = 0
Constant memcpy_in_vram::dest_bank#1 = 1
Constant memcpy_in_vram::dest#1 = (void*) 61440
Constant memcpy_in_vram::dest#1 = (void*)(byte*) 61440
Constant memcpy_in_vram::dest_increment#1 = VERA_INC_1
Constant memcpy_in_vram::src_bank#1 = 0
Constant memcpy_in_vram::src#1 = (void*) 63488
Constant memcpy_in_vram::src#1 = (void*)(byte*) 63488
Constant memcpy_in_vram::src_increment#1 = VERA_INC_1
Constant memcpy_in_vram::num#1 = (unumber)$100*8
Constant vera_layer_mode_tile::layer#1 = 1
@ -7340,7 +7338,7 @@ Constant inlined main::textcolor3_color#0 = WHITE
Constant inlined vera_layer_set_tilebase::layer#1 = vera_layer_mode_bitmap::layer#0
Constant inlined vera_layer_mode_tile::mapheight#0 = vera_layer_mode_text::mapheight#0
Constant inlined vera_layer_mode_tile::mapheight#1 = $40
Constant inlined memcpy_in_vram::dest#1 = (void*) 61440
Constant inlined memcpy_in_vram::dest#1 = (void*)(byte*) 61440
Constant inlined memcpy_in_vram::dest_increment#0 = VERA_INC_1
Constant inlined memcpy_in_vram::dest_increment#1 = VERA_INC_1
Constant inlined vera_layer_mode_bitmap::$1 = 0
@ -7378,7 +7376,7 @@ Constant inlined vera_layer_mode_tile::config#3 = VERA_LAYER_COLOR_DEPTH_4BPP
Constant inlined vera_layer_mode_tile::config#4 = VERA_LAYER_COLOR_DEPTH_8BPP
Constant inlined main::s6 = main::s4
Constant inlined vera_display_get_hscale::s#0 = 1
Constant inlined memcpy_in_vram::src#1 = (void*) 63488
Constant inlined memcpy_in_vram::src#1 = (void*)(byte*) 63488
Constant inlined screenlayer::layer#0 = 1
Constant inlined screenlayer::layer#1 = 1
Constant inlined screenlayer::layer#2 = 1
@ -8554,8 +8552,8 @@ void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest
memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2 main
[221] memcpy_in_vram::num#3 = phi( insertup::@2/memcpy_in_vram::num#0, main/$100*8 )
[221] memcpy_in_vram::dest_bank#2 = phi( insertup::@2/0, main/1 )
[221] memcpy_in_vram::dest#2 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*) 61440 )
[221] memcpy_in_vram::src#2 = phi( insertup::@2/memcpy_in_vram::src#3, main/(void*) 63488 )
[221] memcpy_in_vram::dest#2 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*)(byte*) 61440 )
[221] memcpy_in_vram::src#2 = phi( insertup::@2/memcpy_in_vram::src#3, main/(void*)(byte*) 63488 )
[222] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[223] memcpy_in_vram::$0 = < memcpy_in_vram::src#2
[224] *VERA_ADDRX_L = memcpy_in_vram::$0
@ -13479,12 +13477,12 @@ main: {
sta.z memcpy_in_vram.num+1
// [221] phi memcpy_in_vram::dest_bank#2 = 1 [phi:main->memcpy_in_vram#1] -- vbuyy=vbuc1
ldy #1
// [221] phi memcpy_in_vram::dest#2 = (void*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
// [221] phi memcpy_in_vram::dest#2 = (void*)(byte*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
lda #<$f000
sta.z memcpy_in_vram.dest
lda #>$f000
sta.z memcpy_in_vram.dest+1
// [221] phi memcpy_in_vram::src#2 = (void*) 63488 [phi:main->memcpy_in_vram#3] -- pvoz1=pvoc1
// [221] phi memcpy_in_vram::src#2 = (void*)(byte*) 63488 [phi:main->memcpy_in_vram#3] -- pvoz1=pvoc1
lda #<$f800
sta.z memcpy_in_vram.src
lda #>$f800
@ -20326,7 +20324,7 @@ main: {
.label __40 = $13
.label color = 5
.label x = 3
// memcpy_in_vram(1, 0xF000, VERA_INC_1, 0, 0xF800, VERA_INC_1, 256*8)
// memcpy_in_vram(1, (char*)0xF000, VERA_INC_1, 0, (char*)0xF800, VERA_INC_1, 256*8)
// [38] call memcpy_in_vram
// Before we configure the bitmap pane into vera memory we need to re-arrange a few things!
// It is better to load all in bank 0, but then there is an issue.
@ -20344,12 +20342,12 @@ main: {
sta.z memcpy_in_vram.num+1
// [221] phi memcpy_in_vram::dest_bank#2 = 1 [phi:main->memcpy_in_vram#1] -- vbuyy=vbuc1
ldy #1
// [221] phi memcpy_in_vram::dest#2 = (void*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
// [221] phi memcpy_in_vram::dest#2 = (void*)(byte*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
lda #<$f000
sta.z memcpy_in_vram.dest
lda #>$f000
sta.z memcpy_in_vram.dest+1
// [221] phi memcpy_in_vram::src#2 = (void*) 63488 [phi:main->memcpy_in_vram#3] -- pvoz1=pvoc1
// [221] phi memcpy_in_vram::src#2 = (void*)(byte*) 63488 [phi:main->memcpy_in_vram#3] -- pvoz1=pvoc1
lda #<$f800
sta.z memcpy_in_vram.src
lda #>$f800

View File

@ -189,7 +189,7 @@ main: {
.label r = 7
.label column1 = $c
.label r1 = $b
// memcpy_in_vram(1, 0xF000, VERA_INC_1, 0, 0xF800, VERA_INC_1, 256*8)
// memcpy_in_vram(1, (char*)0xF000, VERA_INC_1, 0, (char*)0xF800, VERA_INC_1, 256*8)
// Before we can load the tiles into memory we need to re-arrange a few things!
// The amount of tiles is 256, the color depth is 256, so each tile is 256 bytes!
// That is 65356 bytes of memory, which is 64K. Yup! One memory bank in VRAM.
@ -300,9 +300,9 @@ main: {
jsr memcpy_to_vram
lda #1
sta.z t
lda #<$100
lda #<0+$100
sta.z tilebase
lda #>$100
lda #>0+$100
sta.z tilebase+1
__b1:
ldx #0
@ -533,7 +533,7 @@ main: {
// *VERA_DC_VIDEO &= ~vera_layer_enable[layer]
and VERA_DC_VIDEO
sta VERA_DC_VIDEO
// memcpy_in_vram(0, 0xF800, VERA_INC_1, 1, 0xF000, VERA_INC_1, 256*8)
// memcpy_in_vram(0, (char*)0xF800, VERA_INC_1, 1, (char*)0xF000, VERA_INC_1, 256*8)
lda #<$100*8
sta.z memcpy_in_vram.num
lda #>$100*8

View File

@ -100,7 +100,7 @@ main::@22: scope:[main] from main::@21
to:main::@1
main::@1: scope:[main] from main::@22 main::@23
[48] main::t#5 = phi( main::@22/1, main::@23/main::t#1 )
[48] main::tilebase#7 = phi( main::@22/$100, main::@23/main::tilebase#2 )
[48] main::tilebase#7 = phi( main::@22/(byte*) 0+$100, main::@23/main::tilebase#2 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[49] main::p#2 = phi( main::@1/0, main::@2/main::p#1 )
@ -428,9 +428,9 @@ void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest
memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2 main main::@17
[214] memcpy_in_vram::num#4 = phi( insertup::@2/memcpy_in_vram::num#0, main/$100*8, main::@17/$100*8 )
[214] memcpy_in_vram::dest_bank#3 = phi( insertup::@2/0, main/1, main::@17/0 )
[214] memcpy_in_vram::dest#3 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*) 61440, main::@17/(void*) 63488 )
[214] memcpy_in_vram::dest#3 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*)(byte*) 61440, main::@17/(void*)(byte*) 63488 )
[214] memcpy_in_vram::src_bank#3 = phi( insertup::@2/0, main/0, main::@17/1 )
[214] memcpy_in_vram::src#3 = phi( insertup::@2/memcpy_in_vram::src#4, main/(void*) 63488, main::@17/(void*) 61440 )
[214] memcpy_in_vram::src#3 = phi( insertup::@2/memcpy_in_vram::src#4, main/(void*)(byte*) 63488, main::@17/(void*)(byte*) 61440 )
[215] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[216] memcpy_in_vram::$0 = < memcpy_in_vram::src#3
[217] *VERA_ADDRX_L = memcpy_in_vram::$0
@ -656,7 +656,7 @@ clrscr::@5: scope:[clrscr] from clrscr::@4
void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num)
memcpy_to_vram: scope:[memcpy_to_vram] from main::@22 main::@3
[338] memcpy_to_vram::vdest#2 = phi( main::@22/(void*)0, main::@3/memcpy_to_vram::vdest#1 )
[338] memcpy_to_vram::vdest#2 = phi( main::@22/(void*)(byte*) 0, main::@3/memcpy_to_vram::vdest#1 )
[339] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[340] memcpy_to_vram::$0 = < memcpy_to_vram::vdest#2
[341] *VERA_ADDRX_L = memcpy_to_vram::$0

View File

@ -1397,7 +1397,7 @@ screenlayer::@4: scope:[screenlayer] from screenlayer::@3
CONIO_SCREEN_BANK#86 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 )
vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 )
screenlayer::$1 = vera_layer_get_mapbase_offset::return#4
CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1
CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
@ -1482,10 +1482,10 @@ main: scope:[main] from __start::@1
CONIO_SCREEN_TEXT#52 = phi( __start::@1/CONIO_SCREEN_TEXT#35 )
CONIO_SCREEN_BANK#47 = phi( __start::@1/CONIO_SCREEN_BANK#30 )
memcpy_in_vram::dest_bank#1 = 1
memcpy_in_vram::dest#1 = (void*)$f000
memcpy_in_vram::dest#1 = (void*)(byte*)$f000
memcpy_in_vram::dest_increment#1 = VERA_INC_1
memcpy_in_vram::src_bank#1 = 0
memcpy_in_vram::src#1 = (void*)$f800
memcpy_in_vram::src#1 = (void*)(byte*)$f800
memcpy_in_vram::src_increment#1 = VERA_INC_1
memcpy_in_vram::num#1 = $100*8
call memcpy_in_vram
@ -1568,7 +1568,7 @@ main::@26: scope:[main] from main::@17
main::@27: scope:[main] from main::@26
CONIO_SCREEN_BANK#109 = phi( main::@26/CONIO_SCREEN_BANK#111 )
CONIO_SCREEN_TEXT#115 = phi( main::@26/CONIO_SCREEN_TEXT#117 )
main::tilebase#0 = 0
main::tilebase#0 = (byte*)0
memcpy_to_vram::vbank#0 = 0
memcpy_to_vram::vdest#0 = (void*)main::tilebase#0
memcpy_to_vram::src#0 = (void*)main::tiles
@ -1897,10 +1897,10 @@ main::@18: scope:[main] from main::vera_layer_hide1
CONIO_SCREEN_TEXT#62 = phi( main::vera_layer_hide1/CONIO_SCREEN_TEXT#76 )
CONIO_SCREEN_BANK#55 = phi( main::vera_layer_hide1/CONIO_SCREEN_BANK#62 )
memcpy_in_vram::dest_bank#2 = 0
memcpy_in_vram::dest#2 = (void*)$f800
memcpy_in_vram::dest#2 = (void*)(byte*)$f800
memcpy_in_vram::dest_increment#2 = VERA_INC_1
memcpy_in_vram::src_bank#2 = 1
memcpy_in_vram::src#2 = (void*)$f000
memcpy_in_vram::src#2 = (void*)(byte*)$f000
memcpy_in_vram::src_increment#2 = VERA_INC_1
memcpy_in_vram::num#2 = $100*8
call memcpy_in_vram
@ -2653,15 +2653,15 @@ word main::tile#6
word main::tile#7
word main::tile#8
word main::tile#9
word main::tilebase
word main::tilebase#0
word main::tilebase#1
word main::tilebase#2
word main::tilebase#3
word main::tilebase#4
word main::tilebase#5
word main::tilebase#6
word main::tilebase#7
byte* main::tilebase
byte* main::tilebase#0
byte* main::tilebase#1
byte* main::tilebase#2
byte* main::tilebase#3
byte* main::tilebase#4
byte* main::tilebase#5
byte* main::tilebase#6
byte* main::tilebase#7
constant byte* main::tiles[$100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
byte~ main::vera_layer_hide1_$0
byte main::vera_layer_hide1_layer
@ -3711,7 +3711,6 @@ Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0
Inlining cast memcpy_in_vram::dest_bank#0 = (unumber)0
Inlining cast memcpy_in_vram::src_bank#0 = (unumber)0
Inlining cast gotoxy::x#2 = (unumber)0
Inlining cast CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1
Inlining cast memcpy_in_vram::dest_bank#1 = (unumber)1
Inlining cast memcpy_in_vram::src_bank#1 = (unumber)0
Inlining cast memcpy_in_vram::num#1 = (unumber)$100*8
@ -3897,9 +3896,9 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant pointer cast (void*) 61440
Simplifying constant pointer cast (byte*) 61440
Simplifying constant integer cast 0
Simplifying constant pointer cast (void*) 63488
Simplifying constant pointer cast (byte*) 63488
Simplifying constant integer cast 1
Simplifying constant integer cast $10000
Simplifying constant integer cast $1f000
@ -3917,6 +3916,7 @@ Simplifying constant integer cast $40
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast 8
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast $100
@ -3978,9 +3978,9 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant pointer cast (void*) 63488
Simplifying constant pointer cast (byte*) 63488
Simplifying constant integer cast 1
Simplifying constant pointer cast (void*) 61440
Simplifying constant pointer cast (byte*) 61440
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $f800
@ -4573,10 +4573,10 @@ Constant memcpy_in_vram::src_increment#0 = VERA_INC_1
Constant gotoxy::x#2 = 0
Constant cputs::c#0 = 0
Constant memcpy_in_vram::dest_bank#1 = 1
Constant memcpy_in_vram::dest#1 = (void*) 61440
Constant memcpy_in_vram::dest#1 = (void*)(byte*) 61440
Constant memcpy_in_vram::dest_increment#1 = VERA_INC_1
Constant memcpy_in_vram::src_bank#1 = 0
Constant memcpy_in_vram::src#1 = (void*) 63488
Constant memcpy_in_vram::src#1 = (void*)(byte*) 63488
Constant memcpy_in_vram::src_increment#1 = VERA_INC_1
Constant memcpy_in_vram::num#1 = (unumber)$100*8
Constant vera_layer_mode_tile::layer#1 = 1
@ -4598,7 +4598,7 @@ Constant vera_layer_mode_tile::mapheight#2 = $40
Constant vera_layer_mode_tile::tilewidth#2 = $10
Constant vera_layer_mode_tile::tileheight#2 = $10
Constant vera_layer_mode_tile::color_depth#2 = 8
Constant main::tilebase#0 = 0
Constant main::tilebase#0 = (byte*) 0
Constant memcpy_to_vram::vbank#0 = 0
Constant memcpy_to_vram::src#0 = (void*)main::tiles
Constant memcpy_to_vram::num#0 = $100
@ -4669,10 +4669,10 @@ Constant vera_tile_area::vflip#5 = 0
Constant vera_tile_area::offset#5 = 0
Constant main::vera_layer_hide1_layer#0 = 0
Constant memcpy_in_vram::dest_bank#2 = 0
Constant memcpy_in_vram::dest#2 = (void*) 63488
Constant memcpy_in_vram::dest#2 = (void*)(byte*) 63488
Constant memcpy_in_vram::dest_increment#2 = VERA_INC_1
Constant memcpy_in_vram::src_bank#2 = 1
Constant memcpy_in_vram::src#2 = (void*) 61440
Constant memcpy_in_vram::src#2 = (void*)(byte*) 61440
Constant memcpy_in_vram::src_increment#2 = VERA_INC_1
Constant memcpy_in_vram::num#2 = (unumber)$100*8
Constant vera_layer_mode_tile::layer#3 = 1
@ -4735,7 +4735,6 @@ Simplifying expression containing zero vera_layer_mode_tile::config#17 in [111]
Simplifying expression containing zero vera_layer_mode_tile::config#21 in [132] vera_layer_mode_tile::config#9 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_32
Simplifying expression containing zero vera_layer_mode_tile::tilebase#1 in [168] vera_layer_mode_tile::tilebase#2 = vera_layer_mode_tile::tilebase#1 | VERA_TILEBASE_WIDTH_8
Simplifying expression containing zero vera_layer_mode_tile::tilebase#12 in [173] vera_layer_mode_tile::tilebase#4 = vera_layer_mode_tile::tilebase#12 | VERA_TILEBASE_HEIGHT_8
Simplifying expression containing zero $100 in [552] main::tilebase#1 = main::tilebase#0 + $100
Simplifying expression containing zero vera_layer_enable in [627] *VERA_DC_VIDEO = *VERA_DC_VIDEO | vera_layer_enable[main::vera_layer_show1_layer#0]
Simplifying expression containing zero vera_layer_enable in [688] main::vera_layer_hide1_$0 = ~ vera_layer_enable[main::vera_layer_hide1_layer#0]
Successful SSA optimization PassNSimplifyExpressionWithZero
@ -4808,13 +4807,14 @@ Identical Phi Values vera_layer_set_text_color_mode::layer#2 vera_layer_set_text
Identical Phi Values vera_layer_set_text_color_mode::color_mode#2 vera_layer_set_text_color_mode::color_mode#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [41] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0 * SIZEOF_POINTER
Constant right-side identified [412] main::tilebase#1 = main::tilebase#0 + $100
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0*SIZEOF_POINTER
Constant vera_layer_mode_tile::config#1 = VERA_LAYER_COLOR_DEPTH_1BPP
Constant vera_layer_mode_tile::config#2 = VERA_LAYER_COLOR_DEPTH_2BPP
Constant vera_layer_mode_tile::config#3 = VERA_LAYER_COLOR_DEPTH_4BPP
Constant vera_layer_mode_tile::config#4 = VERA_LAYER_COLOR_DEPTH_8BPP
Constant main::tilebase#1 = $100
Constant main::tilebase#1 = main::tilebase#0+$100
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero *vera_layer_set_text_color_mode::addr#0 in [44] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#0
Successful SSA optimization PassNSimplifyExpressionWithZero
@ -5027,7 +5027,7 @@ Constant inlined vera_layer_set_textcolor::color#0 = WHITE
Constant inlined cputs::s#4 = main::s3
Constant inlined cputs::s#1 = main::s
Constant inlined cputs::s#2 = main::s1
Constant inlined memcpy_to_vram::vdest#0 = (void*)0
Constant inlined memcpy_to_vram::vdest#0 = (void*)(byte*) 0
Constant inlined vera_tile_area::layer#3 = 0
Constant inlined vera_tile_area::layer#4 = 0
Constant inlined clrscr::l#0 = 0
@ -5042,8 +5042,8 @@ Constant inlined vera_tile_area::y#0 = 0
Constant inlined vera_tile_area::y#2 = 0
Constant inlined memcpy_to_vram::num#0 = $100
Constant inlined vera_tile_area::tileindex#4 = 0
Constant inlined main::tilebase#1 = $100
Constant inlined main::tilebase#0 = 0
Constant inlined main::tilebase#1 = (byte*) 0+$100
Constant inlined main::tilebase#0 = (byte*) 0
Constant inlined memcpy_in_vram::src_increment#1 = VERA_INC_1
Constant inlined memcpy_in_vram::src_increment#2 = VERA_INC_1
Constant inlined vera_layer_mode_tile::layer#0 = vera_layer_mode_text::layer#0
@ -5123,8 +5123,8 @@ Constant inlined vera_layer_mode_tile::mapheight#4 = $80
Constant inlined vera_layer_mode_tile::mapheight#0 = vera_layer_mode_text::mapheight#0
Constant inlined vera_layer_mode_tile::mapheight#1 = $40
Constant inlined vera_layer_mode_tile::mapheight#2 = $40
Constant inlined memcpy_in_vram::dest#1 = (void*) 61440
Constant inlined memcpy_in_vram::dest#2 = (void*) 63488
Constant inlined memcpy_in_vram::dest#1 = (void*)(byte*) 61440
Constant inlined memcpy_in_vram::dest#2 = (void*)(byte*) 63488
Constant inlined vera_tile_area::w#0 = $28
Constant inlined memcpy_in_vram::dest_increment#0 = VERA_INC_1
Constant inlined memcpy_in_vram::dest_increment#1 = VERA_INC_1
@ -5178,8 +5178,8 @@ Constant inlined vera_tile_area::h#1 = 1
Constant inlined vera_layer_mode_tile::config#4 = VERA_LAYER_COLOR_DEPTH_8BPP
Constant inlined vera_tile_area::h#2 = $1e
Constant inlined vera_tile_area::h#3 = 2
Constant inlined memcpy_in_vram::src#2 = (void*) 61440
Constant inlined memcpy_in_vram::src#1 = (void*) 63488
Constant inlined memcpy_in_vram::src#2 = (void*)(byte*) 61440
Constant inlined memcpy_in_vram::src#1 = (void*)(byte*) 63488
Constant inlined screenlayer::layer#0 = 1
Constant inlined screenlayer::layer#1 = 1
Constant inlined screenlayer::layer#2 = 1
@ -5730,7 +5730,7 @@ main::@22: scope:[main] from main::@21
to:main::@1
main::@1: scope:[main] from main::@22 main::@23
[48] main::t#5 = phi( main::@22/1, main::@23/main::t#1 )
[48] main::tilebase#7 = phi( main::@22/$100, main::@23/main::tilebase#2 )
[48] main::tilebase#7 = phi( main::@22/(byte*) 0+$100, main::@23/main::tilebase#2 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[49] main::p#2 = phi( main::@1/0, main::@2/main::p#1 )
@ -6058,9 +6058,9 @@ void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest
memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2 main main::@17
[214] memcpy_in_vram::num#4 = phi( insertup::@2/memcpy_in_vram::num#0, main/$100*8, main::@17/$100*8 )
[214] memcpy_in_vram::dest_bank#3 = phi( insertup::@2/0, main/1, main::@17/0 )
[214] memcpy_in_vram::dest#3 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*) 61440, main::@17/(void*) 63488 )
[214] memcpy_in_vram::dest#3 = phi( insertup::@2/memcpy_in_vram::dest#0, main/(void*)(byte*) 61440, main::@17/(void*)(byte*) 63488 )
[214] memcpy_in_vram::src_bank#3 = phi( insertup::@2/0, main/0, main::@17/1 )
[214] memcpy_in_vram::src#3 = phi( insertup::@2/memcpy_in_vram::src#4, main/(void*) 63488, main::@17/(void*) 61440 )
[214] memcpy_in_vram::src#3 = phi( insertup::@2/memcpy_in_vram::src#4, main/(void*)(byte*) 63488, main::@17/(void*)(byte*) 61440 )
[215] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[216] memcpy_in_vram::$0 = < memcpy_in_vram::src#3
[217] *VERA_ADDRX_L = memcpy_in_vram::$0
@ -6286,7 +6286,7 @@ clrscr::@5: scope:[clrscr] from clrscr::@4
void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num)
memcpy_to_vram: scope:[memcpy_to_vram] from main::@22 main::@3
[338] memcpy_to_vram::vdest#2 = phi( main::@22/(void*)0, main::@3/memcpy_to_vram::vdest#1 )
[338] memcpy_to_vram::vdest#2 = phi( main::@22/(void*)(byte*) 0, main::@3/memcpy_to_vram::vdest#1 )
[339] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[340] memcpy_to_vram::$0 = < memcpy_to_vram::vdest#2
[341] *VERA_ADDRX_L = memcpy_to_vram::$0
@ -6839,9 +6839,9 @@ word main::tile#13 350.5
word main::tile#4 2002.0
word main::tile#6 517.3333333333334
word main::tile#8 517.3333333333334
word main::tilebase
word main::tilebase#2 67.33333333333333
word main::tilebase#7 28.857142857142858
byte* main::tilebase
byte* main::tilebase#2 67.33333333333333
byte* main::tilebase#7 28.857142857142858
byte~ main::vera_layer_hide1_$0 22.0
byte main::vera_layer_hide1_layer
byte main::vera_layer_show1_layer
@ -9098,14 +9098,14 @@ main: {
// [214] phi memcpy_in_vram::dest_bank#3 = 1 [phi:main->memcpy_in_vram#1] -- vbuz1=vbuc1
lda #1
sta.z memcpy_in_vram.dest_bank
// [214] phi memcpy_in_vram::dest#3 = (void*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::dest#3 = (void*)(byte*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
lda #<$f000
sta.z memcpy_in_vram.dest
lda #>$f000
sta.z memcpy_in_vram.dest+1
// [214] phi memcpy_in_vram::src_bank#3 = 0 [phi:main->memcpy_in_vram#3] -- vbuyy=vbuc1
ldy #0
// [214] phi memcpy_in_vram::src#3 = (void*) 63488 [phi:main->memcpy_in_vram#4] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::src#3 = (void*)(byte*) 63488 [phi:main->memcpy_in_vram#4] -- pvoz1=pvoc1
lda #<$f800
sta.z memcpy_in_vram.src
lda #>$f800
@ -9253,7 +9253,7 @@ main: {
// [47] call memcpy_to_vram
// [338] phi from main::@22 to memcpy_to_vram [phi:main::@22->memcpy_to_vram]
memcpy_to_vram_from___b22:
// [338] phi memcpy_to_vram::vdest#2 = (void*)0 [phi:main::@22->memcpy_to_vram#0] -- pvoz1=pvoc1
// [338] phi memcpy_to_vram::vdest#2 = (void*)(byte*) 0 [phi:main::@22->memcpy_to_vram#0] -- pvoz1=pvoc1
lda #<0
sta.z memcpy_to_vram.vdest
lda #>0
@ -9264,10 +9264,10 @@ main: {
// [48] phi main::t#5 = 1 [phi:main::@22->main::@1#0] -- vbuz1=vbuc1
lda #1
sta.z t
// [48] phi main::tilebase#7 = $100 [phi:main::@22->main::@1#1] -- vwuz1=vwuc1
lda #<$100
// [48] phi main::tilebase#7 = (byte*) 0+$100 [phi:main::@22->main::@1#1] -- pbuz1=pbuc1
lda #<0+$100
sta.z tilebase
lda #>$100
lda #>0+$100
sta.z tilebase+1
jmp __b1
// [48] phi from main::@23 to main::@1 [phi:main::@23->main::@1]
@ -9313,7 +9313,7 @@ main: {
jmp __b23
// main::@23
__b23:
// [55] main::tilebase#2 = main::tilebase#7 + $100 -- vwuz1=vwuz1_plus_vwuc1
// [55] main::tilebase#2 = main::tilebase#7 + $100 -- pbuz1=pbuz1_plus_vwuc1
clc
lda.z tilebase
adc #<$100
@ -9779,14 +9779,14 @@ main: {
// [214] phi memcpy_in_vram::dest_bank#3 = 0 [phi:main::@17->memcpy_in_vram#1] -- vbuz1=vbuc1
lda #0
sta.z memcpy_in_vram.dest_bank
// [214] phi memcpy_in_vram::dest#3 = (void*) 63488 [phi:main::@17->memcpy_in_vram#2] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::dest#3 = (void*)(byte*) 63488 [phi:main::@17->memcpy_in_vram#2] -- pvoz1=pvoc1
lda #<$f800
sta.z memcpy_in_vram.dest
lda #>$f800
sta.z memcpy_in_vram.dest+1
// [214] phi memcpy_in_vram::src_bank#3 = 1 [phi:main::@17->memcpy_in_vram#3] -- vbuyy=vbuc1
ldy #1
// [214] phi memcpy_in_vram::src#3 = (void*) 61440 [phi:main::@17->memcpy_in_vram#4] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::src#3 = (void*)(byte*) 61440 [phi:main::@17->memcpy_in_vram#4] -- pvoz1=pvoc1
lda #<$f000
sta.z memcpy_in_vram.src
lda #>$f000
@ -12890,9 +12890,9 @@ word main::tile#13 tile zp[2]:8 350.5
word main::tile#4 tile zp[2]:8 2002.0
word main::tile#6 tile zp[2]:8 517.3333333333334
word main::tile#8 tile zp[2]:8 517.3333333333334
word main::tilebase
word main::tilebase#2 tilebase zp[2]:3 67.33333333333333
word main::tilebase#7 tilebase zp[2]:3 28.857142857142858
byte* main::tilebase
byte* main::tilebase#2 tilebase zp[2]:3 67.33333333333333
byte* main::tilebase#7 tilebase zp[2]:3 28.857142857142858
constant byte* main::tiles[$100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
byte~ main::vera_layer_hide1_$0 reg byte a 22.0
byte main::vera_layer_hide1_layer
@ -13640,7 +13640,7 @@ main: {
.label r = 7
.label column1 = $c
.label r1 = $b
// memcpy_in_vram(1, 0xF000, VERA_INC_1, 0, 0xF800, VERA_INC_1, 256*8)
// memcpy_in_vram(1, (char*)0xF000, VERA_INC_1, 0, (char*)0xF800, VERA_INC_1, 256*8)
// [33] call memcpy_in_vram
// Before we can load the tiles into memory we need to re-arrange a few things!
// The amount of tiles is 256, the color depth is 256, so each tile is 256 bytes!
@ -13662,14 +13662,14 @@ main: {
// [214] phi memcpy_in_vram::dest_bank#3 = 1 [phi:main->memcpy_in_vram#1] -- vbuz1=vbuc1
lda #1
sta.z memcpy_in_vram.dest_bank
// [214] phi memcpy_in_vram::dest#3 = (void*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::dest#3 = (void*)(byte*) 61440 [phi:main->memcpy_in_vram#2] -- pvoz1=pvoc1
lda #<$f000
sta.z memcpy_in_vram.dest
lda #>$f000
sta.z memcpy_in_vram.dest+1
// [214] phi memcpy_in_vram::src_bank#3 = 0 [phi:main->memcpy_in_vram#3] -- vbuyy=vbuc1
ldy #0
// [214] phi memcpy_in_vram::src#3 = (void*) 63488 [phi:main->memcpy_in_vram#4] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::src#3 = (void*)(byte*) 63488 [phi:main->memcpy_in_vram#4] -- pvoz1=pvoc1
lda #<$f800
sta.z memcpy_in_vram.src
lda #>$f800
@ -13797,7 +13797,7 @@ main: {
// memcpy_to_vram(0, tilebase, tiles, 256)
// [47] call memcpy_to_vram
// [338] phi from main::@22 to memcpy_to_vram [phi:main::@22->memcpy_to_vram]
// [338] phi memcpy_to_vram::vdest#2 = (void*)0 [phi:main::@22->memcpy_to_vram#0] -- pvoz1=pvoc1
// [338] phi memcpy_to_vram::vdest#2 = (void*)(byte*) 0 [phi:main::@22->memcpy_to_vram#0] -- pvoz1=pvoc1
lda #<0
sta.z memcpy_to_vram.vdest
sta.z memcpy_to_vram.vdest+1
@ -13806,10 +13806,10 @@ main: {
// [48] phi main::t#5 = 1 [phi:main::@22->main::@1#0] -- vbuz1=vbuc1
lda #1
sta.z t
// [48] phi main::tilebase#7 = $100 [phi:main::@22->main::@1#1] -- vwuz1=vwuc1
lda #<$100
// [48] phi main::tilebase#7 = (byte*) 0+$100 [phi:main::@22->main::@1#1] -- pbuz1=pbuc1
lda #<0+$100
sta.z tilebase
lda #>$100
lda #>0+$100
sta.z tilebase+1
// [48] phi from main::@23 to main::@1 [phi:main::@23->main::@1]
// [48] phi main::t#5 = main::t#1 [phi:main::@23->main::@1#0] -- register_copy
@ -13847,7 +13847,7 @@ main: {
jsr memcpy_to_vram
// main::@23
// tilebase+=256
// [55] main::tilebase#2 = main::tilebase#7 + $100 -- vwuz1=vwuz1_plus_vwuc1
// [55] main::tilebase#2 = main::tilebase#7 + $100 -- pbuz1=pbuz1_plus_vwuc1
clc
lda.z tilebase
adc #<$100
@ -14230,7 +14230,7 @@ main: {
sta VERA_DC_VIDEO
// [123] phi from main::vera_layer_hide1 to main::@17 [phi:main::vera_layer_hide1->main::@17]
// main::@17
// memcpy_in_vram(0, 0xF800, VERA_INC_1, 1, 0xF000, VERA_INC_1, 256*8)
// memcpy_in_vram(0, (char*)0xF800, VERA_INC_1, 1, (char*)0xF000, VERA_INC_1, 256*8)
// [124] call memcpy_in_vram
// [214] phi from main::@17 to memcpy_in_vram [phi:main::@17->memcpy_in_vram]
// [214] phi memcpy_in_vram::num#4 = $100*8 [phi:main::@17->memcpy_in_vram#0] -- vwuz1=vwuc1
@ -14241,14 +14241,14 @@ main: {
// [214] phi memcpy_in_vram::dest_bank#3 = 0 [phi:main::@17->memcpy_in_vram#1] -- vbuz1=vbuc1
lda #0
sta.z memcpy_in_vram.dest_bank
// [214] phi memcpy_in_vram::dest#3 = (void*) 63488 [phi:main::@17->memcpy_in_vram#2] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::dest#3 = (void*)(byte*) 63488 [phi:main::@17->memcpy_in_vram#2] -- pvoz1=pvoc1
lda #<$f800
sta.z memcpy_in_vram.dest
lda #>$f800
sta.z memcpy_in_vram.dest+1
// [214] phi memcpy_in_vram::src_bank#3 = 1 [phi:main::@17->memcpy_in_vram#3] -- vbuyy=vbuc1
ldy #1
// [214] phi memcpy_in_vram::src#3 = (void*) 61440 [phi:main::@17->memcpy_in_vram#4] -- pvoz1=pvoc1
// [214] phi memcpy_in_vram::src#3 = (void*)(byte*) 61440 [phi:main::@17->memcpy_in_vram#4] -- pvoz1=pvoc1
lda #<$f000
sta.z memcpy_in_vram.src
lda #>$f000

View File

@ -222,9 +222,9 @@ word main::tile#13 tile zp[2]:8 350.5
word main::tile#4 tile zp[2]:8 2002.0
word main::tile#6 tile zp[2]:8 517.3333333333334
word main::tile#8 tile zp[2]:8 517.3333333333334
word main::tilebase
word main::tilebase#2 tilebase zp[2]:3 67.33333333333333
word main::tilebase#7 tilebase zp[2]:3 28.857142857142858
byte* main::tilebase
byte* main::tilebase#2 tilebase zp[2]:3 67.33333333333333
byte* main::tilebase#7 tilebase zp[2]:3 28.857142857142858
constant byte* main::tiles[$100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
byte~ main::vera_layer_hide1_$0 reg byte a 22.0
byte main::vera_layer_hide1_layer

View File

@ -153,7 +153,7 @@ main: {
// open sideborder
lda #1
sta VICIV+OFFSET_STRUCT_MEGA65_VICIV_SIDBDRWD_LO
// memcpy_dma4(1, 0x0000, 0, upperCodeData, MUSIC_END-MUSIC)
// memcpy_dma4(1, (void*)0x0000, 0, upperCodeData, MUSIC_END-MUSIC)
// Transfer banked code/data to upper memory ($10000)
jsr memcpy_dma4
// memoryRemapBlock(0x40, 0x100)

View File

@ -1984,7 +1984,7 @@ main: {
// open sideborder
lda #1
sta VICIV+OFFSET_STRUCT_MEGA65_VICIV_SIDBDRWD_LO
// memcpy_dma4(1, 0x0000, 0, upperCodeData, MUSIC_END-MUSIC)
// memcpy_dma4(1, (void*)0x0000, 0, upperCodeData, MUSIC_END-MUSIC)
// [18] call memcpy_dma4
// Transfer banked code/data to upper memory ($10000)
jsr memcpy_dma4

View File

@ -170,7 +170,7 @@ main: {
lda #>$2d*$19*2
sta.z memset_dma.num+1
jsr memset_dma
// memset_dma256(0xff,0x08,0x0000, WHITE, 45*25*2)
// memset_dma256(0xff,0x08,(void*)0x0000, WHITE, 45*25*2)
// Fill the colours with WHITE - directly into $ff80000
jsr memset_dma256
// memset_dma(CHARSET, 0x55, 45*32*8)

View File

@ -2384,7 +2384,7 @@ main: {
jsr memset_dma
// [29] phi from main::@12 to main::@13 [phi:main::@12->main::@13]
// main::@13
// memset_dma256(0xff,0x08,0x0000, WHITE, 45*25*2)
// memset_dma256(0xff,0x08,(void*)0x0000, WHITE, 45*25*2)
// [30] call memset_dma256
// Fill the colours with WHITE - directly into $ff80000
jsr memset_dma256

View File

@ -27,7 +27,7 @@ main: {
lda #>$400
sta.z sc+1
__b1:
// for(byte* sc = $400;sc<$400+1000;sc++)
// for(byte* sc = (byte*)$400;sc<$400+1000;sc++)
lda.z sc+1
cmp #>$400+$3e8
bcc __b2
@ -120,7 +120,7 @@ main: {
lda #' '
ldy #0
sta (sc),y
// for(byte* sc = $400;sc<$400+1000;sc++)
// for(byte* sc = (byte*)$400;sc<$400+1000;sc++)
inc.z sc
bne !+
inc.z sc+1

View File

@ -32,7 +32,7 @@ main::line1: scope:[main] from main::@3
main::line1_ch#4 = phi( main::@3/main::line1_ch#0 )
main::line1_ysize#3 = phi( main::@3/main::line1_ysize#0 )
main::line1_xpos#1 = phi( main::@3/main::line1_xpos#0 )
cur_line#0 = ((byte*)) $400
cur_line#0 = (byte*)$400
main::line1_pos#0 = (word){ main::line1_xpos#1, 0 }
main::line1_i#0 = 0
to:main::line1_@1
@ -91,7 +91,7 @@ main::line2: scope:[main] from main::@4
main::line2_ch#4 = phi( main::@4/main::line2_ch#0 )
main::line2_ysize#3 = phi( main::@4/main::line2_ysize#0 )
main::line2_xpos#1 = phi( main::@4/main::line2_xpos#0 )
cur_line#2 = ((byte*)) $400
cur_line#2 = (byte*)$400
main::line2_pos#0 = (word){ main::line2_xpos#1, 0 }
main::line2_i#0 = 0
to:main::line2_@1
@ -306,11 +306,9 @@ Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast main::line1_xpos#0 = (unumber)2
Inlining cast main::line1_xadd#0 = (unumber)$40
Inlining cast main::line1_ysize#0 = (unumber)$a
Inlining cast cur_line#0 = (byte*)$400
Inlining cast main::line2_xpos#0 = (unumber)4
Inlining cast main::line2_xadd#0 = (unumber)$80
Inlining cast main::line2_ysize#0 = (unumber)$f
Inlining cast cur_line#2 = (byte*)$400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 2
@ -962,7 +960,7 @@ main: {
sta.z sc+1
// main::@1
__b1:
// for(byte* sc = $400;sc<$400+1000;sc++)
// for(byte* sc = (byte*)$400;sc<$400+1000;sc++)
// [2] if(main::sc#2<$400+$3e8) goto main::@2 -- pbuz1_lt_vwuc1_then_la1
lda.z sc+1
cmp #>$400+$3e8
@ -1100,7 +1098,7 @@ main: {
lda #' '
ldy #0
sta (sc),y
// for(byte* sc = $400;sc<$400+1000;sc++)
// for(byte* sc = (byte*)$400;sc<$400+1000;sc++)
// [21] main::sc#1 = ++ main::sc#2 -- pbuz1=_inc_pbuz1
inc.z sc
bne !+

View File

@ -31,35 +31,30 @@ Successful SSA optimization Pass2FixInlineConstructors
Simplifying constant integer cast 4
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Adding pointer type conversion cast (byte*) main::$0 in main::$0 = 4 w= 0
Successful SSA optimization PassNAddTypeConversionAssignment
Alias main::screen#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [0] main::$1 = 4 w= 0
Constant right-side identified [0] main::$0 = 4 w= 0
Successful SSA optimization Pass2ConstantRValueConsolidation
Simplifying expression containing zero 4*$100 in [0] main::$1 = 4*$100+0
Simplifying expression containing zero 4*$100 in [0] main::$0 = 4*$100+0
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 4*$100 in [0] main::$1 = 4*$100
Adding number conversion cast (unumber) $100 in [0] main::$1 = ((unumber)) 4*$100
Adding number conversion cast (unumber) 4*$100 in [0] main::$0 = 4*$100
Adding number conversion cast (unumber) $100 in [0] main::$0 = ((unumber)) 4*$100
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [0] main::$1 = (unumber)4*(unumber)$100
Inlining cast [1] main::screen#0 = (byte*)main::$1
Inlining cast [0] main::$0 = (unumber)4*(unumber)$100
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 4*(unumber)$100
Simplifying constant integer cast $100
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (word) $100
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant main::$1 = 4*$100
Constant main::$0 = 4*$100
Successful SSA optimization Pass2ConstantIdentification
Constant main::screen#0 = (byte*)main::$1
Constant main::screen#0 = (byte*)main::$0
Successful SSA optimization Pass2ConstantIdentification
Constant inlined main::$1 = 4*$100
Constant inlined main::$0 = 4*$100
Successful SSA optimization Pass2ConstantInlining
CALL GRAPH

View File

@ -78,10 +78,6 @@ Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) $18
Successful SSA optimization PassNFinalizeNumberTypeConversions
Adding pointer type conversion cast (byte*) puta::$0 in puta::$0 = puta::ph#2 w= puta::pl#2
Successful SSA optimization PassNAddTypeConversionAssignment
Alias puta::screen#0 = puta::$0
Successful SSA optimization Pass2AliasElimination
Constant puta::ph#0 = 4
Constant puta::pl#0 = 0
Constant puta::ph#1 = 5
@ -92,9 +88,7 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Inlining cast [5] puta::screen#0 = (byte*)puta::$1
Successful SSA optimization Pass2InlineCast
Inlining Noop Cast [5] puta::screen#0 = (byte*)puta::$1 keeping puta::screen#0
Inlining Noop Cast [5] puta::screen#0 = (byte*)puta::$0 keeping puta::screen#0
Successful SSA optimization Pass2NopCastInlining
Inlining constant with var siblings puta::ph#0
Inlining constant with var siblings puta::pl#0

View File

@ -40,18 +40,15 @@ Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Adding pointer type conversion cast (byte*) main::$3 in main::$3 = 4 w= 0
Successful SSA optimization PassNAddTypeConversionAssignment
Alias main::$1 = main::$3
Alias main::$2 = main::$4
Alias main::screen#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [0] main::$5 = 4 w= 0
Constant right-side identified [0] main::$3 = 4 w= 0
Constant right-side identified [2] main::$2 = 0 w= $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Simplifying constant evaluating to zero 0*$100 in [2] main::$2 = 0*$100+$28
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero 4*$100 in [0] main::$5 = 4*$100+0
Simplifying expression containing zero 4*$100 in [0] main::$3 = 4*$100+0
Simplifying expression containing zero $28 in [2] main::$2 = 0+$28
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure __start
@ -59,27 +56,26 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 4*$100 in [0] main::$5 = 4*$100
Adding number conversion cast (unumber) $100 in [0] main::$5 = ((unumber)) 4*$100
Adding number conversion cast (unumber) 4*$100 in [0] main::$3 = 4*$100
Adding number conversion cast (unumber) $100 in [0] main::$3 = ((unumber)) 4*$100
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [0] main::$5 = (unumber)4*(unumber)$100
Inlining cast [1] main::$1 = (byte*)main::$5
Inlining cast [0] main::$3 = (unumber)4*(unumber)$100
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 4*(unumber)$100
Simplifying constant integer cast $100
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (word) $100
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant main::$5 = 4*$100
Constant main::$3 = 4*$100
Constant main::$2 = $28
Successful SSA optimization Pass2ConstantIdentification
Constant main::$1 = (byte*)main::$5
Constant main::$1 = (byte*)main::$3
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] main::screen#0 = main::$1 + main::$2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::screen#0 = main::$1+main::$2
Successful SSA optimization Pass2ConstantIdentification
Constant inlined main::$5 = 4*$100
Constant inlined main::$3 = 4*$100
Constant inlined main::$1 = (byte*)4*$100
Constant inlined main::$2 = $28
Successful SSA optimization Pass2ConstantInlining

View File

@ -46,18 +46,12 @@ Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Adding pointer type conversion cast (byte*) main::$0 in main::$0 = *(main::PTR+1) w= *main::PTR
Successful SSA optimization PassNAddTypeConversionAssignment
Alias main::ptr#0 = main::$0
Successful SSA optimization Pass2AliasElimination
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Inlining cast [3] main::ptr#0 = (byte*)main::$1
Successful SSA optimization Pass2InlineCast
Inlining Noop Cast [3] main::ptr#0 = (byte*)main::$1 keeping main::ptr#0
Inlining Noop Cast [3] main::ptr#0 = (byte*)main::$0 keeping main::ptr#0
Successful SSA optimization Pass2NopCastInlining
CALL GRAPH

View File

@ -26,7 +26,7 @@ __start: {
rts
}
init_2: {
// SCREEN = 0x0400
// SCREEN = (char*)0x0400
lda #<$400
sta.z SCREEN
lda #>$400

View File

@ -12,7 +12,7 @@ init_1::@return: scope:[init_1] from init_1
void init_2()
init_2: scope:[init_2] from __start::@2
SCREEN = ((byte*)) $400
SCREEN = (byte*)$400
to:init_2::@return
init_2::@return: scope:[init_2] from init_2
return
@ -67,8 +67,6 @@ void main()
void print()
volatile byte sym loadstore
Inlining cast SCREEN = (byte*)$400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Adding NOP phi() at start of __start
@ -383,7 +381,7 @@ __start: {
}
// init_2
init_2: {
// SCREEN = 0x0400
// SCREEN = (char*)0x0400
// [9] SCREEN = (byte*) 1024 -- pbuz1=pbuc1
lda #<$400
sta.z SCREEN

View File

@ -1188,9 +1188,6 @@ Inferred type updated to byte in bitmap_init::$3 = bitmap_init::y#2 & 7
Inferred type updated to byte in bitmap_init::$5 = bitmap_init::$3 | bitmap_init::$4
Inferred type updated to byte in bitmap_init::$7 = bitmap_init::y#2 & 7
Inferred type updated to word in bitmap_plot::$0 = bitmap_plot::x#1 & $fff8
Adding pointer type conversion cast (byte*) bitmap_clear::$2 in bitmap_clear::$2 = bitmap_plot_yhi[0] w= bitmap_plot_ylo[0]
Adding pointer type conversion cast (byte*) bitmap_plot::$2 in bitmap_plot::$2 = bitmap_plot_yhi[bitmap_plot::y#1] w= bitmap_plot_ylo[bitmap_plot::y#1]
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [9] divr16u::$4 = divr16u::$2 == 0 from [8] divr16u::$3 = divr16u::$2 != 0
Inversing boolean not [17] divr16u::$9 = divr16u::rem#5 < divr16u::divisor#1 from [16] divr16u::$8 = divr16u::rem#5 >= divr16u::divisor#1
Inversing boolean not [231] bitmap_init::$1 = bitmap_init::bits#1 != 0 from [230] bitmap_init::$0 = bitmap_init::bits#1 == 0
@ -1252,10 +1249,8 @@ Alias bitmap_init::bitmap#1 = bitmap_init::bitmap#2 bitmap_init::yoffs#0
Alias bitmap_init::yoffs#2 = bitmap_init::yoffs#3
Alias bitmap_init::y#2 = bitmap_init::y#4
Alias bitmap_init::yoffs#1 = bitmap_init::$10
Alias bitmap_clear::bitmap#0 = bitmap_clear::$2
Alias bitmap_clear::y#2 = bitmap_clear::y#3
Alias bitmap_clear::bitmap#1 = bitmap_clear::bitmap#4
Alias bitmap_plot::plotter#0 = bitmap_plot::$2
Successful SSA optimization Pass2AliasElimination
Alias divr16u::dividend#2 = divr16u::dividend#3
Alias divr16u::quotient#3 = divr16u::quotient#6
@ -1371,8 +1366,8 @@ Resolved ranged comparison value [203] if(bitmap_clear::y#1!=rangelast(0,$27)) g
Simplifying constant evaluating to zero (word)divr16s::dividend#0 in
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero (byte*)CIA2 in [67] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = main::vicSelectGfxBank1_toDd001_return#0
Simplifying expression containing zero bitmap_plot_yhi in [190] bitmap_clear::$3 = bitmap_plot_yhi[0] w= bitmap_plot_ylo[0]
Simplifying expression containing zero bitmap_plot_ylo in [190] bitmap_clear::$3 = *bitmap_plot_yhi w= bitmap_plot_ylo[0]
Simplifying expression containing zero bitmap_plot_yhi in [190] bitmap_clear::$2 = bitmap_plot_yhi[0] w= bitmap_plot_ylo[0]
Simplifying expression containing zero bitmap_plot_ylo in [190] bitmap_clear::$2 = *bitmap_plot_yhi w= bitmap_plot_ylo[0]
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
@ -1398,9 +1393,6 @@ Adding number conversion cast (unumber) 0 in [139] if(bitmap_init::y#1!=0) goto
Adding number conversion cast (unumber) $c8 in [149] if(bitmap_clear::x#1!=$c8) goto bitmap_clear::@2
Adding number conversion cast (unumber) $28 in [151] if(bitmap_clear::y#1!=$28) goto bitmap_clear::@1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast [143] bitmap_clear::bitmap#0 = (byte*)bitmap_clear::$3
Inlining cast [154] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $10
Simplifying constant integer cast SIZE-1+(unumber)1
Simplifying constant integer cast 1
@ -1470,8 +1462,8 @@ Inlining Noop Cast [17] divr16s::remu#1 = (word)divr16s::$7 keeping divr16s::rem
Inlining Noop Cast [22] divr16s::divisoru#1 = (word)divr16s::$8 keeping divr16s::divisoru#1
Inlining Noop Cast [67] point_init::abs16s1_return#0 = (word)point_init::abs16s1_$1 keeping point_init::abs16s1_return#0
Inlining Noop Cast [72] point_init::abs16s2_return#0 = (word)point_init::abs16s2_$1 keeping point_init::abs16s2_return#0
Inlining Noop Cast [125] bitmap_clear::bitmap#0 = (byte*)bitmap_clear::$3 keeping bitmap_clear::bitmap#0
Inlining Noop Cast [136] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$3 keeping bitmap_plot::plotter#0
Inlining Noop Cast [125] bitmap_clear::bitmap#0 = (byte*)bitmap_clear::$2 keeping bitmap_clear::bitmap#0
Inlining Noop Cast [136] bitmap_plot::plotter#0 = (byte*)bitmap_plot::$2 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [18] divr16s::remu#2 = (word)divr16s::rem#0 keeping divr16s::rem#0
Inlining Noop Cast [24] divr16s::divisoru#2 = (word)divr16s::divisor#0 keeping divr16s::divisor#0

View File

@ -24,7 +24,7 @@ main::@1: scope:[main] from main main::@7
[7] print_char_cursor#48 = phi( main/print_screen#0, main::@7/print_char_cursor#28 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@5
[8] root#22 = phi( main::@1/(struct node*) 0, main::@5/root#12 )
[8] root#22 = phi( main::@1/(struct node*)(void*) 0, main::@5/root#12 )
[8] free_#24 = phi( main::@1/0, main::@5/free_#14 )
[8] main::i#2 = phi( main::@1/0, main::@5/main::i#1 )
[9] prepend::x#0 = main::i#2

View File

@ -146,7 +146,7 @@ end::@return: scope:[end] from end::@3
void init()
init: scope:[init] from main::@1
free_#0 = 0
root#0 = ((struct node*)) 0
root#0 = ((struct node*)) (void*)0
to:init::@return
init::@return: scope:[init] from init
root#10 = phi( init/root#0 )
@ -723,14 +723,14 @@ Adding number conversion cast (unumber) 0 in free_#0 = 0
Adding number conversion cast (unumber) 0 in sum::s#1 = 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast free_#0 = (unumber)0
Inlining cast root#0 = (struct node*)0
Inlining cast root#0 = (struct node*)(void*)0
Inlining cast sum::s#1 = (unumber)0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast $28
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant pointer cast (struct node*) 0
Simplifying constant pointer cast (void*) 0
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
@ -855,8 +855,10 @@ Simple Condition sum::$4 [71] if((struct node*)0!=sum::current#3) goto sum::@2
Simple Condition main::$4 [92] if(main::i#1!=rangelast(0,$bb7)) goto main::@2
Simple Condition main::$7 [101] if(main::c#1!=rangelast(0,4)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [42] root#0 = (struct node*)(void*) 0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant free_#0 = 0
Constant root#0 = (struct node*) 0
Constant root#0 = (struct node*)(void*) 0
Constant alloc::result#0 = (struct node*) 0
Constant prepend::new#0 = (struct node*) 0
Constant sum::current#0 = (struct node*) 0
@ -929,7 +931,7 @@ Constant inlined main::i#0 = 0
Constant inlined main::c#0 = 0
Constant inlined free_#0 = 0
Constant inlined sum::s#1 = 0
Constant inlined root#0 = (struct node*) 0
Constant inlined root#0 = (struct node*)(void*) 0
Successful SSA optimization Pass2ConstantInlining
Eliminating unused constant SIZEOF_STRUCT_NODE
Successful SSA optimization PassNEliminateUnusedVars
@ -1039,7 +1041,7 @@ main::@1: scope:[main] from main main::@7
[7] print_char_cursor#48 = phi( main/print_screen#0, main::@7/print_char_cursor#28 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@5
[8] root#22 = phi( main::@1/(struct node*) 0, main::@5/root#12 )
[8] root#22 = phi( main::@1/(struct node*)(void*) 0, main::@5/root#12 )
[8] free_#24 = phi( main::@1/0, main::@5/free_#14 )
[8] main::i#2 = phi( main::@1/0, main::@5/main::i#1 )
[9] prepend::x#0 = main::i#2
@ -1547,7 +1549,7 @@ main: {
__b1:
// [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
__b2_from___b1:
// [8] phi root#22 = (struct node*) 0 [phi:main::@1->main::@2#0] -- pssz1=pssc1
// [8] phi root#22 = (struct node*)(void*) 0 [phi:main::@1->main::@2#0] -- pssz1=pssc1
lda #<0
sta.z root
lda #>0
@ -2192,7 +2194,7 @@ main: {
// main::@1
__b1:
// [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
// [8] phi root#22 = (struct node*) 0 [phi:main::@1->main::@2#0] -- pssz1=pssc1
// [8] phi root#22 = (struct node*)(void*) 0 [phi:main::@1->main::@2#0] -- pssz1=pssc1
lda #<0
sta.z root
sta.z root+1

View File

@ -18,7 +18,7 @@ __start: {
rts
}
main: {
// test(h1, 0xD800, 0xC000)
// test(h1, (char*)0xD800, (char*)0xC000)
lda.z h1
sta.z test.videoMem
lda.z h1+1

View File

@ -27,7 +27,7 @@ void test(byte* test::videoMem , byte* test::colorMem , byte* test::other)
test: scope:[test] from main
[8] test::dst = (byte*) 0
[9] test::diff#1 = test::colorMem#0 - test::videoMem#0
[10] test::$1 = test::other#0 + (word)(byte*)test::diff#1
[10] test::$1 = test::other#0 + test::diff#1
[11] test::dst = test::$1
[12] *test::dst = 1
asm { ldy#0 lda#1 sta(dst),y }

View File

@ -8,10 +8,10 @@ test: scope:[test] from main
test::other#1 = phi( main/test::other#0 )
test::videoMem#1 = phi( main/test::videoMem#0 )
test::colorMem#1 = phi( main/test::colorMem#0 )
test::diff#0 = (byte*) 0
test::diff#0 = 0
test::dst = (byte*) 0
test::$0 = test::colorMem#1 - test::videoMem#1
test::diff#1 = ((byte*)) test::$0
test::diff#1 = test::$0
test::$2 = (word)test::diff#1
test::$1 = test::other#1 + test::$2
test::dst = test::$1
@ -61,9 +61,9 @@ word~ test::$2
byte* test::colorMem
byte* test::colorMem#0
byte* test::colorMem#1
byte* test::diff
byte* test::diff#0
byte* test::diff#1
word test::diff
word test::diff#0
word test::diff#1
byte* volatile test::dst loadstore
byte* test::other
byte* test::other#0
@ -75,9 +75,9 @@ byte* test::videoMem#1
Adding number conversion cast (unumber) 1 in test::dst[0] = 1
Adding number conversion cast (unumber) 0 in test::dst[0] = ((unumber)) 1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast test::diff#1 = (byte*)test::$0
Inlining cast test::dst[(unumber)0] = (unumber)1
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast test::diff#1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 55296
@ -87,24 +87,22 @@ Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias candidate removed (volatile)test::dst = test::$1
Alias test::diff#1 = test::$0 test::$2
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)test::dst = test::$1
Identical Phi Values test::colorMem#1 test::colorMem#0
Identical Phi Values test::videoMem#1 test::videoMem#0
Identical Phi Values test::other#1 test::other#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant test::diff#0 = (byte*) 0
Constant test::diff#0 = 0
Constant test::colorMem#0 = (byte*) 55296
Constant test::other#0 = (byte*) 49152
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero test::dst in [8] test::dst[0] = 1
Simplifying expression containing zero test::dst in [6] test::dst[0] = 1
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant test::diff#0
Successful SSA optimization PassNEliminateUnusedVars
Alias candidate removed (volatile)test::dst = test::$1
Inlining Noop Cast [2] test::diff#1 = (byte*)test::$0 keeping test::diff#1
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [3] test::$2 = (word)(byte*)test::diff#1 keeping (byte*)test::diff#1
Successful SSA optimization Pass2NopCastInlining
Alias candidate removed (volatile)test::dst = test::$1
Alias candidate removed (volatile)test::dst = test::$1
Alias candidate removed (volatile)test::dst = test::$1
Adding NOP phi() at start of __start
@ -152,7 +150,7 @@ void test(byte* test::videoMem , byte* test::colorMem , byte* test::other)
test: scope:[test] from main
[8] test::dst = (byte*) 0
[9] test::diff#1 = test::colorMem#0 - test::videoMem#0
[10] test::$1 = test::other#0 + (word)(byte*)test::diff#1
[10] test::$1 = test::other#0 + test::diff#1
[11] test::dst = test::$1
[12] *test::dst = 1
asm { ldy#0 lda#1 sta(dst),y }
@ -169,8 +167,8 @@ void main()
void test(byte* test::videoMem , byte* test::colorMem , byte* test::other)
byte*~ test::$1 202.0
byte* test::colorMem
byte* test::diff
word test::diff#1 101.0
word test::diff
word test::diff#1 202.0
byte* volatile test::dst loadstore 151.5
byte* test::other
byte* test::videoMem
@ -198,7 +196,7 @@ Statement [1] h1 = (byte*) 0 [ h1 ] ( [ h1 ] { } ) always clobbers reg byte a
Statement [5] test::videoMem#0 = h1 [ test::videoMem#0 ] ( main:3 [ test::videoMem#0 ] { { test::videoMem#0 = h1 } } ) always clobbers reg byte a
Statement [8] test::dst = (byte*) 0 [ test::videoMem#0 ] ( main:3::test:6 [ test::videoMem#0 ] { { test::videoMem#0 = h1 } } ) always clobbers reg byte a
Statement [9] test::diff#1 = test::colorMem#0 - test::videoMem#0 [ test::diff#1 ] ( main:3::test:6 [ test::diff#1 ] { { test::videoMem#0 = h1 } } ) always clobbers reg byte a
Statement [10] test::$1 = test::other#0 + (word)(byte*)test::diff#1 [ test::$1 ] ( main:3::test:6 [ test::$1 ] { { test::videoMem#0 = h1 } } ) always clobbers reg byte a
Statement [10] test::$1 = test::other#0 + test::diff#1 [ test::$1 ] ( main:3::test:6 [ test::$1 ] { { test::videoMem#0 = h1 } } ) always clobbers reg byte a
Statement [11] test::dst = test::$1 [ test::dst ] ( main:3::test:6 [ test::dst ] { { test::videoMem#0 = h1 } } ) always clobbers reg byte a
Statement [12] *test::dst = 1 [ test::dst ] ( main:3::test:6 [ test::dst ] { { test::videoMem#0 = h1 } } ) always clobbers reg byte a reg byte y
Statement asm { ldy#0 lda#1 sta(dst),y } always clobbers reg byte a reg byte y
@ -209,12 +207,12 @@ Potential registers zp[2]:8 [ test::diff#1 ] : zp[2]:8 ,
Potential registers zp[2]:10 [ test::$1 ] : zp[2]:10 ,
REGISTER UPLIFT SCOPES
Uplift Scope [test] 202: zp[2]:10 [ test::$1 ] 151.5: zp[2]:6 [ test::dst ] 101: zp[2]:8 [ test::diff#1 ] 56: zp[2]:4 [ test::videoMem#0 ]
Uplift Scope [test] 202: zp[2]:8 [ test::diff#1 ] 202: zp[2]:10 [ test::$1 ] 151.5: zp[2]:6 [ test::dst ] 56: zp[2]:4 [ test::videoMem#0 ]
Uplift Scope [] 6.5: zp[2]:2 [ h1 ]
Uplift Scope [main]
Uplift Scope [__start]
Uplifting [test] best 172 combination zp[2]:10 [ test::$1 ] zp[2]:6 [ test::dst ] zp[2]:8 [ test::diff#1 ] zp[2]:4 [ test::videoMem#0 ]
Uplifting [test] best 172 combination zp[2]:8 [ test::diff#1 ] zp[2]:10 [ test::$1 ] zp[2]:6 [ test::dst ] zp[2]:4 [ test::videoMem#0 ]
Uplifting [] best 172 combination zp[2]:2 [ h1 ]
Uplifting [main] best 172 combination
Uplifting [__start] best 172 combination
@ -297,7 +295,7 @@ test: {
lda #>colorMem
sbc.z diff+1
sta.z diff+1
// [10] test::$1 = test::other#0 + (word)(byte*)test::diff#1 -- pbuz1=pbuc1_plus_vwuz1
// [10] test::$1 = test::other#0 + test::diff#1 -- pbuz1=pbuc1_plus_vwuz1
clc
lda.z __1
adc #<other
@ -355,8 +353,8 @@ void test(byte* test::videoMem , byte* test::colorMem , byte* test::other)
byte*~ test::$1 zp[2]:4 202.0
byte* test::colorMem
constant byte* test::colorMem#0 colorMem = (byte*) 55296
byte* test::diff
word test::diff#1 diff zp[2]:4 101.0
word test::diff
word test::diff#1 diff zp[2]:4 202.0
byte* volatile test::dst loadstore zp[2]:6 151.5
byte* test::other
constant byte* test::other#0 other = (byte*) 49152
@ -403,7 +401,7 @@ __start: {
}
// main
main: {
// test(h1, 0xD800, 0xC000)
// test(h1, (char*)0xD800, (char*)0xC000)
// [5] test::videoMem#0 = h1 -- pbuz1=pbuz2
lda.z h1
sta.z test.videoMem
@ -441,7 +439,7 @@ test: {
sbc.z diff+1
sta.z diff+1
// other + ((unsigned int)diff)
// [10] test::$1 = test::other#0 + (word)(byte*)test::diff#1 -- pbuz1=pbuc1_plus_vwuz1
// [10] test::$1 = test::other#0 + test::diff#1 -- pbuz1=pbuc1_plus_vwuz1
clc
lda.z __1
adc #<other

View File

@ -5,8 +5,8 @@ void test(byte* test::videoMem , byte* test::colorMem , byte* test::other)
byte*~ test::$1 zp[2]:4 202.0
byte* test::colorMem
constant byte* test::colorMem#0 colorMem = (byte*) 55296
byte* test::diff
word test::diff#1 diff zp[2]:4 101.0
word test::diff
word test::diff#1 diff zp[2]:4 202.0
byte* volatile test::dst loadstore zp[2]:6 151.5
byte* test::other
constant byte* test::other#0 other = (byte*) 49152

View File

@ -286,7 +286,7 @@ initEntry: {
.label __7 = $c
.label __17 = $e
.label entry = 4
// 0x1111+n
// (byte*)0x1111+n
txa
clc
adc #<$1111
@ -294,14 +294,14 @@ initEntry: {
lda #>$1111
adc #0
sta.z __1+1
// *entryBufDisk(entry) = 0x1111+n
// *entryBufDisk(entry) = (byte*)0x1111+n
ldy #0
lda.z __1
sta (entry),y
iny
lda.z __1+1
sta (entry),y
// 0x2222+n
// (byte*)0x2222+n
txa
clc
adc #<$2222
@ -309,7 +309,7 @@ initEntry: {
lda #>$2222
adc #0
sta.z __3+1
// *entryBufEdit(entry) = 0x2222+n
// *entryBufEdit(entry) = (byte*)0x2222+n
ldy #2
lda.z __3
sta (entry),y
@ -331,15 +331,16 @@ initEntry: {
iny
lda.z __5+1
sta (entry),y
// 0x4444+n
// (word*)0x4444+n
txa
asl
clc
adc #<$4444
sta.z __7
lda #>$4444
adc #0
sta.z __7+1
// *entryTsOrder(entry) = 0x4444+n
// *entryTsOrder(entry) = (word*)0x4444+n
ldy #6
lda.z __7
sta (entry),y

View File

@ -160,15 +160,15 @@ initEntry::entryBufDisk1: scope:[initEntry] from initEntry
[75] phi()
to:initEntry::@1
initEntry::@1: scope:[initEntry] from initEntry::entryBufDisk1
[76] initEntry::$1 = $1111 + initEntry::n#10
[77] *((byte**)initEntry::entry#10) = (byte*)initEntry::$1
[76] initEntry::$1 = (byte*) 4369 + initEntry::n#10
[77] *((byte**)initEntry::entry#10) = initEntry::$1
to:initEntry::entryBufEdit1
initEntry::entryBufEdit1: scope:[initEntry] from initEntry::@1
[78] phi()
to:initEntry::@2
initEntry::@2: scope:[initEntry] from initEntry::entryBufEdit1
[79] initEntry::$3 = $2222 + initEntry::n#10
[80] ((byte**)initEntry::entry#10)[2] = (byte*)initEntry::$3
[79] initEntry::$3 = (byte*) 8738 + initEntry::n#10
[80] ((byte**)initEntry::entry#10)[2] = initEntry::$3
to:initEntry::entryTsLen1
initEntry::entryTsLen1: scope:[initEntry] from initEntry::@2
[81] phi()
@ -181,401 +181,402 @@ initEntry::entryTsOrder1: scope:[initEntry] from initEntry::@3
[84] phi()
to:initEntry::@4
initEntry::@4: scope:[initEntry] from initEntry::entryTsOrder1
[85] initEntry::$7 = $4444 + initEntry::n#10
[86] ((word**)initEntry::entry#10)[6] = (word*)initEntry::$7
[85] initEntry::$26 = initEntry::n#10 << 1
[86] initEntry::$7 = (word*) 17476 + initEntry::$26
[87] ((word**)initEntry::entry#10)[6] = initEntry::$7
to:initEntry::entryTLastLink1
initEntry::entryTLastLink1: scope:[initEntry] from initEntry::@4
[87] phi()
[88] phi()
to:initEntry::@5
initEntry::@5: scope:[initEntry] from initEntry::entryTLastLink1
[88] initEntry::$9 = $55 + initEntry::n#10
[89] initEntry::entry#10[8] = initEntry::$9
[89] initEntry::$9 = $55 + initEntry::n#10
[90] initEntry::entry#10[8] = initEntry::$9
to:initEntry::entrySLastLink1
initEntry::entrySLastLink1: scope:[initEntry] from initEntry::@5
[90] phi()
[91] phi()
to:initEntry::@6
initEntry::@6: scope:[initEntry] from initEntry::entrySLastLink1
[91] initEntry::$11 = $66 + initEntry::n#10
[92] initEntry::entry#10[9] = initEntry::$11
[92] initEntry::$11 = $66 + initEntry::n#10
[93] initEntry::entry#10[9] = initEntry::$11
to:initEntry::entryBFlag1
initEntry::entryBFlag1: scope:[initEntry] from initEntry::@6
[93] phi()
[94] phi()
to:initEntry::@7
initEntry::@7: scope:[initEntry] from initEntry::entryBFlag1
[94] initEntry::$13 = $77 + initEntry::n#10
[95] initEntry::entry#10[$a] = initEntry::$13
[95] initEntry::$13 = $77 + initEntry::n#10
[96] initEntry::entry#10[$a] = initEntry::$13
to:initEntry::entryBError1
initEntry::entryBError1: scope:[initEntry] from initEntry::@7
[96] phi()
[97] phi()
to:initEntry::@8
initEntry::@8: scope:[initEntry] from initEntry::entryBError1
[97] initEntry::$15 = $88 + initEntry::n#10
[98] initEntry::entry#10[$b] = initEntry::$15
[98] initEntry::$15 = $88 + initEntry::n#10
[99] initEntry::entry#10[$b] = initEntry::$15
to:initEntry::entryUCross1
initEntry::entryUCross1: scope:[initEntry] from initEntry::@8
[99] phi()
[100] phi()
to:initEntry::@9
initEntry::@9: scope:[initEntry] from initEntry::entryUCross1
[100] initEntry::$17 = $9999 + initEntry::n#10
[101] ((word*)initEntry::entry#10)[$c] = initEntry::$17
[101] initEntry::$17 = $9999 + initEntry::n#10
[102] ((word*)initEntry::entry#10)[$c] = initEntry::$17
to:initEntry::entryBAddrLo1
initEntry::entryBAddrLo1: scope:[initEntry] from initEntry::@9
[102] phi()
[103] phi()
to:initEntry::@10
initEntry::@10: scope:[initEntry] from initEntry::entryBAddrLo1
[103] initEntry::$19 = $aa + initEntry::n#10
[104] initEntry::entry#10[$e] = initEntry::$19
[104] initEntry::$19 = $aa + initEntry::n#10
[105] initEntry::entry#10[$e] = initEntry::$19
to:initEntry::entryBAddrHi1
initEntry::entryBAddrHi1: scope:[initEntry] from initEntry::@10
[105] phi()
[106] phi()
to:initEntry::@11
initEntry::@11: scope:[initEntry] from initEntry::entryBAddrHi1
[106] initEntry::$21 = $bb + initEntry::n#10
[107] initEntry::entry#10[$f] = initEntry::$21
[107] initEntry::$21 = $bb + initEntry::n#10
[108] initEntry::entry#10[$f] = initEntry::$21
to:initEntry::entryTHi1
initEntry::entryTHi1: scope:[initEntry] from initEntry::@11
[108] phi()
[109] phi()
to:initEntry::@12
initEntry::@12: scope:[initEntry] from initEntry::entryTHi1
[109] initEntry::$23 = $cc + initEntry::n#10
[110] initEntry::entry#10[$10] = initEntry::$23
[110] initEntry::$23 = $cc + initEntry::n#10
[111] initEntry::entry#10[$10] = initEntry::$23
to:initEntry::entryTLo1
initEntry::entryTLo1: scope:[initEntry] from initEntry::@12
[111] phi()
[112] phi()
to:initEntry::@13
initEntry::@13: scope:[initEntry] from initEntry::entryTLo1
[112] initEntry::$25 = $dd + initEntry::n#10
[113] initEntry::entry#10[$11] = initEntry::$25
[113] initEntry::$25 = $dd + initEntry::n#10
[114] initEntry::entry#10[$11] = initEntry::$25
to:initEntry::@return
initEntry::@return: scope:[initEntry] from initEntry::@13
[114] return
[115] return
to:@return
void print_cls()
print_cls: scope:[print_cls] from main::@2 main::@4 main::@9
[115] phi()
[116] call memset
[116] phi()
[117] call memset
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls
[117] return
[118] return
to:@return
void print_str(byte* print_str::str)
print_str: scope:[print_str] from main::@10 main::@15 main::@17 main::@22 printEntry printEntry::@15 printEntry::@17 printEntry::@19 printEntry::@21 printEntry::@23 printEntry::@25 printEntry::@27 printEntry::@29 printEntry::@31 printEntry::@33 printEntry::@35 printEntry::@37
[118] print_char_cursor#167 = phi( main::@10/print_screen#0, main::@15/print_char_cursor#209, main::@17/print_screen#0, main::@22/print_char_cursor#210, printEntry/print_char_cursor#211, printEntry::@15/print_char_cursor#212, printEntry::@17/print_char_cursor#213, printEntry::@19/print_char_cursor#214, printEntry::@21/print_char_cursor#215, printEntry::@23/print_char_cursor#216, printEntry::@25/print_char_cursor#217, printEntry::@27/print_char_cursor#218, printEntry::@29/print_char_cursor#219, printEntry::@31/print_char_cursor#220, printEntry::@33/print_char_cursor#221, printEntry::@35/print_char_cursor#222, printEntry::@37/print_char_cursor#223 )
[118] print_str::str#21 = phi( main::@10/main::str, main::@15/main::str1, main::@17/main::str2, main::@22/main::str1, printEntry/printEntry::str, printEntry::@15/printEntry::str1, printEntry::@17/printEntry::str2, printEntry::@19/printEntry::str3, printEntry::@21/printEntry::str4, printEntry::@23/printEntry::str5, printEntry::@25/printEntry::str6, printEntry::@27/printEntry::str7, printEntry::@29/printEntry::str8, printEntry::@31/printEntry::str9, printEntry::@33/printEntry::str10, printEntry::@35/printEntry::str11, printEntry::@37/printEntry::str12 )
[119] print_char_cursor#167 = phi( main::@10/print_screen#0, main::@15/print_char_cursor#209, main::@17/print_screen#0, main::@22/print_char_cursor#210, printEntry/print_char_cursor#211, printEntry::@15/print_char_cursor#212, printEntry::@17/print_char_cursor#213, printEntry::@19/print_char_cursor#214, printEntry::@21/print_char_cursor#215, printEntry::@23/print_char_cursor#216, printEntry::@25/print_char_cursor#217, printEntry::@27/print_char_cursor#218, printEntry::@29/print_char_cursor#219, printEntry::@31/print_char_cursor#220, printEntry::@33/print_char_cursor#221, printEntry::@35/print_char_cursor#222, printEntry::@37/print_char_cursor#223 )
[119] print_str::str#21 = phi( main::@10/main::str, main::@15/main::str1, main::@17/main::str2, main::@22/main::str1, printEntry/printEntry::str, printEntry::@15/printEntry::str1, printEntry::@17/printEntry::str2, printEntry::@19/printEntry::str3, printEntry::@21/printEntry::str4, printEntry::@23/printEntry::str5, printEntry::@25/printEntry::str6, printEntry::@27/printEntry::str7, printEntry::@29/printEntry::str8, printEntry::@31/printEntry::str9, printEntry::@33/printEntry::str10, printEntry::@35/printEntry::str11, printEntry::@37/printEntry::str12 )
to:print_str::@1
print_str::@1: scope:[print_str] from print_str print_str::@3
[119] print_char_cursor#1 = phi( print_str/print_char_cursor#167, print_str::@3/print_char_cursor#10 )
[119] print_str::str#18 = phi( print_str/print_str::str#21, print_str::@3/print_str::str#0 )
[120] if(0!=*print_str::str#18) goto print_str::@2
[120] print_char_cursor#1 = phi( print_str/print_char_cursor#167, print_str::@3/print_char_cursor#10 )
[120] print_str::str#18 = phi( print_str/print_str::str#21, print_str::@3/print_str::str#0 )
[121] if(0!=*print_str::str#18) goto print_str::@2
to:print_str::@return
print_str::@return: scope:[print_str] from print_str::@1
[121] return
[122] return
to:@return
print_str::@2: scope:[print_str] from print_str::@1
[122] print_char::ch#0 = *print_str::str#18
[123] call print_char
[123] print_char::ch#0 = *print_str::str#18
[124] call print_char
to:print_str::@3
print_str::@3: scope:[print_str] from print_str::@2
[124] print_str::str#0 = ++ print_str::str#18
[125] print_str::str#0 = ++ print_str::str#18
to:print_str::@1
void print_ln()
print_ln: scope:[print_ln] from main::@11 main::@12 main::@14 main::@18 main::@19 main::@21 printEntry::@14 printEntry::@16 printEntry::@18 printEntry::@20 printEntry::@22 printEntry::@24 printEntry::@26 printEntry::@28 printEntry::@30 printEntry::@32 printEntry::@34 printEntry::@36 printEntry::@38
[125] print_char_cursor#146 = phi( main::@11/print_char_cursor#1, main::@12/print_char_cursor#227, main::@14/print_char_cursor#228, main::@18/print_char_cursor#1, main::@19/print_char_cursor#230, main::@21/print_char_cursor#231, printEntry::@14/print_char_cursor#10, printEntry::@16/print_char_cursor#10, printEntry::@18/print_char_cursor#10, printEntry::@20/print_char_cursor#10, printEntry::@22/print_char_cursor#10, printEntry::@24/print_char_cursor#10, printEntry::@26/print_char_cursor#10, printEntry::@28/print_char_cursor#10, printEntry::@30/print_char_cursor#10, printEntry::@32/print_char_cursor#10, printEntry::@34/print_char_cursor#10, printEntry::@36/print_char_cursor#10, printEntry::@38/print_char_cursor#10 )
[125] print_line_cursor#65 = phi( main::@11/print_screen#0, main::@12/print_line_cursor#155, main::@14/print_line_cursor#156, main::@18/print_screen#0, main::@19/print_line_cursor#157, main::@21/print_line_cursor#158, printEntry::@14/print_line_cursor#159, printEntry::@16/print_line_cursor#160, printEntry::@18/print_line_cursor#161, printEntry::@20/print_line_cursor#162, printEntry::@22/print_line_cursor#163, printEntry::@24/print_line_cursor#164, printEntry::@26/print_line_cursor#165, printEntry::@28/print_line_cursor#166, printEntry::@30/print_line_cursor#167, printEntry::@32/print_line_cursor#168, printEntry::@34/print_line_cursor#169, printEntry::@36/print_line_cursor#170, printEntry::@38/print_line_cursor#171 )
[126] print_char_cursor#146 = phi( main::@11/print_char_cursor#1, main::@12/print_char_cursor#227, main::@14/print_char_cursor#228, main::@18/print_char_cursor#1, main::@19/print_char_cursor#230, main::@21/print_char_cursor#231, printEntry::@14/print_char_cursor#10, printEntry::@16/print_char_cursor#10, printEntry::@18/print_char_cursor#10, printEntry::@20/print_char_cursor#10, printEntry::@22/print_char_cursor#10, printEntry::@24/print_char_cursor#10, printEntry::@26/print_char_cursor#10, printEntry::@28/print_char_cursor#10, printEntry::@30/print_char_cursor#10, printEntry::@32/print_char_cursor#10, printEntry::@34/print_char_cursor#10, printEntry::@36/print_char_cursor#10, printEntry::@38/print_char_cursor#10 )
[126] print_line_cursor#65 = phi( main::@11/print_screen#0, main::@12/print_line_cursor#155, main::@14/print_line_cursor#156, main::@18/print_screen#0, main::@19/print_line_cursor#157, main::@21/print_line_cursor#158, printEntry::@14/print_line_cursor#159, printEntry::@16/print_line_cursor#160, printEntry::@18/print_line_cursor#161, printEntry::@20/print_line_cursor#162, printEntry::@22/print_line_cursor#163, printEntry::@24/print_line_cursor#164, printEntry::@26/print_line_cursor#165, printEntry::@28/print_line_cursor#166, printEntry::@30/print_line_cursor#167, printEntry::@32/print_line_cursor#168, printEntry::@34/print_line_cursor#169, printEntry::@36/print_line_cursor#170, printEntry::@38/print_line_cursor#171 )
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@2
[126] print_line_cursor#33 = phi( print_ln/print_line_cursor#65, print_ln::@2/print_line_cursor#173 )
[127] print_line_cursor#0 = print_line_cursor#33 + $28
[128] if(print_line_cursor#0<print_char_cursor#146) goto print_ln::@2
[127] print_line_cursor#33 = phi( print_ln/print_line_cursor#65, print_ln::@2/print_line_cursor#173 )
[128] print_line_cursor#0 = print_line_cursor#33 + $28
[129] if(print_line_cursor#0<print_char_cursor#146) goto print_ln::@2
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[129] return
[130] return
to:@return
print_ln::@2: scope:[print_ln] from print_ln::@1
[130] print_line_cursor#173 = print_line_cursor#0
[131] print_line_cursor#173 = print_line_cursor#0
to:print_ln::@1
void printEntry(byte* printEntry::entry)
printEntry: scope:[printEntry] from main::@13 main::@20
[131] printEntry::entry#10 = phi( main::@13/printEntry::entry#0, main::@20/printEntry::entry#1 )
[132] print_char_cursor#211 = print_line_cursor#0
[133] call print_str
[132] printEntry::entry#10 = phi( main::@13/printEntry::entry#0, main::@20/printEntry::entry#1 )
[133] print_char_cursor#211 = print_line_cursor#0
[134] call print_str
to:printEntry::entryBufDisk1
printEntry::entryBufDisk1: scope:[printEntry] from printEntry
[134] phi()
[135] phi()
to:printEntry::@1
printEntry::@1: scope:[printEntry] from printEntry::entryBufDisk1
[135] print_uint::w#7 = (word)*((byte**)printEntry::entry#10)
[136] call print_uint
[136] print_uint::w#7 = (word)*((byte**)printEntry::entry#10)
[137] call print_uint
to:printEntry::@14
printEntry::@14: scope:[printEntry] from printEntry::@1
[137] print_line_cursor#159 = print_line_cursor#0
[138] call print_ln
[138] print_line_cursor#159 = print_line_cursor#0
[139] call print_ln
to:printEntry::@15
printEntry::@15: scope:[printEntry] from printEntry::@14
[139] print_char_cursor#212 = print_line_cursor#0
[140] call print_str
[140] print_char_cursor#212 = print_line_cursor#0
[141] call print_str
to:printEntry::entryBufEdit1
printEntry::entryBufEdit1: scope:[printEntry] from printEntry::@15
[141] phi()
[142] phi()
to:printEntry::@2
printEntry::@2: scope:[printEntry] from printEntry::entryBufEdit1
[142] print_uint::w#8 = (word)((byte**)printEntry::entry#10)[2]
[143] call print_uint
[143] print_uint::w#8 = (word)((byte**)printEntry::entry#10)[2]
[144] call print_uint
to:printEntry::@16
printEntry::@16: scope:[printEntry] from printEntry::@2
[144] print_line_cursor#160 = print_line_cursor#0
[145] call print_ln
[145] print_line_cursor#160 = print_line_cursor#0
[146] call print_ln
to:printEntry::@17
printEntry::@17: scope:[printEntry] from printEntry::@16
[146] print_char_cursor#213 = print_line_cursor#0
[147] call print_str
[147] print_char_cursor#213 = print_line_cursor#0
[148] call print_str
to:printEntry::entryTsLen1
printEntry::entryTsLen1: scope:[printEntry] from printEntry::@17
[148] phi()
[149] phi()
to:printEntry::@3
printEntry::@3: scope:[printEntry] from printEntry::entryTsLen1
[149] print_uint::w#2 = ((word*)printEntry::entry#10)[4]
[150] call print_uint
[150] print_uint::w#2 = ((word*)printEntry::entry#10)[4]
[151] call print_uint
to:printEntry::@18
printEntry::@18: scope:[printEntry] from printEntry::@3
[151] print_line_cursor#161 = print_line_cursor#0
[152] call print_ln
[152] print_line_cursor#161 = print_line_cursor#0
[153] call print_ln
to:printEntry::@19
printEntry::@19: scope:[printEntry] from printEntry::@18
[153] print_char_cursor#214 = print_line_cursor#0
[154] call print_str
[154] print_char_cursor#214 = print_line_cursor#0
[155] call print_str
to:printEntry::entryTsOrder1
printEntry::entryTsOrder1: scope:[printEntry] from printEntry::@19
[155] phi()
[156] phi()
to:printEntry::@4
printEntry::@4: scope:[printEntry] from printEntry::entryTsOrder1
[156] print_uint::w#10 = (word)((word**)printEntry::entry#10)[6]
[157] call print_uint
[157] print_uint::w#10 = (word)((word**)printEntry::entry#10)[6]
[158] call print_uint
to:printEntry::@20
printEntry::@20: scope:[printEntry] from printEntry::@4
[158] print_line_cursor#162 = print_line_cursor#0
[159] call print_ln
[159] print_line_cursor#162 = print_line_cursor#0
[160] call print_ln
to:printEntry::@21
printEntry::@21: scope:[printEntry] from printEntry::@20
[160] print_char_cursor#215 = print_line_cursor#0
[161] call print_str
[161] print_char_cursor#215 = print_line_cursor#0
[162] call print_str
to:printEntry::entryTLastLink1
printEntry::entryTLastLink1: scope:[printEntry] from printEntry::@21
[162] phi()
[163] phi()
to:printEntry::@5
printEntry::@5: scope:[printEntry] from printEntry::entryTLastLink1
[163] print_uchar::b#2 = printEntry::entry#10[8]
[164] call print_uchar
[164] print_uchar::b#2 = printEntry::entry#10[8]
[165] call print_uchar
to:printEntry::@22
printEntry::@22: scope:[printEntry] from printEntry::@5
[165] print_line_cursor#163 = print_line_cursor#0
[166] call print_ln
[166] print_line_cursor#163 = print_line_cursor#0
[167] call print_ln
to:printEntry::@23
printEntry::@23: scope:[printEntry] from printEntry::@22
[167] print_char_cursor#216 = print_line_cursor#0
[168] call print_str
[168] print_char_cursor#216 = print_line_cursor#0
[169] call print_str
to:printEntry::entrySLastLink1
printEntry::entrySLastLink1: scope:[printEntry] from printEntry::@23
[169] phi()
[170] phi()
to:printEntry::@6
printEntry::@6: scope:[printEntry] from printEntry::entrySLastLink1
[170] print_uchar::b#3 = printEntry::entry#10[9]
[171] call print_uchar
[171] print_uchar::b#3 = printEntry::entry#10[9]
[172] call print_uchar
to:printEntry::@24
printEntry::@24: scope:[printEntry] from printEntry::@6
[172] print_line_cursor#164 = print_line_cursor#0
[173] call print_ln
[173] print_line_cursor#164 = print_line_cursor#0
[174] call print_ln
to:printEntry::@25
printEntry::@25: scope:[printEntry] from printEntry::@24
[174] print_char_cursor#217 = print_line_cursor#0
[175] call print_str
[175] print_char_cursor#217 = print_line_cursor#0
[176] call print_str
to:printEntry::entryBFlag1
printEntry::entryBFlag1: scope:[printEntry] from printEntry::@25
[176] phi()
[177] phi()
to:printEntry::@7
printEntry::@7: scope:[printEntry] from printEntry::entryBFlag1
[177] print_uchar::b#4 = printEntry::entry#10[$a]
[178] call print_uchar
[178] print_uchar::b#4 = printEntry::entry#10[$a]
[179] call print_uchar
to:printEntry::@26
printEntry::@26: scope:[printEntry] from printEntry::@7
[179] print_line_cursor#165 = print_line_cursor#0
[180] call print_ln
[180] print_line_cursor#165 = print_line_cursor#0
[181] call print_ln
to:printEntry::@27
printEntry::@27: scope:[printEntry] from printEntry::@26
[181] print_char_cursor#218 = print_line_cursor#0
[182] call print_str
[182] print_char_cursor#218 = print_line_cursor#0
[183] call print_str
to:printEntry::entryBError1
printEntry::entryBError1: scope:[printEntry] from printEntry::@27
[183] phi()
[184] phi()
to:printEntry::@8
printEntry::@8: scope:[printEntry] from printEntry::entryBError1
[184] print_uchar::b#5 = printEntry::entry#10[$b]
[185] call print_uchar
[185] print_uchar::b#5 = printEntry::entry#10[$b]
[186] call print_uchar
to:printEntry::@28
printEntry::@28: scope:[printEntry] from printEntry::@8
[186] print_line_cursor#166 = print_line_cursor#0
[187] call print_ln
[187] print_line_cursor#166 = print_line_cursor#0
[188] call print_ln
to:printEntry::@29
printEntry::@29: scope:[printEntry] from printEntry::@28
[188] print_char_cursor#219 = print_line_cursor#0
[189] call print_str
[189] print_char_cursor#219 = print_line_cursor#0
[190] call print_str
to:printEntry::entryUCross1
printEntry::entryUCross1: scope:[printEntry] from printEntry::@29
[190] phi()
[191] phi()
to:printEntry::@9
printEntry::@9: scope:[printEntry] from printEntry::entryUCross1
[191] print_uint::w#4 = ((word*)printEntry::entry#10)[$c]
[192] call print_uint
[192] print_uint::w#4 = ((word*)printEntry::entry#10)[$c]
[193] call print_uint
to:printEntry::@30
printEntry::@30: scope:[printEntry] from printEntry::@9
[193] print_line_cursor#167 = print_line_cursor#0
[194] call print_ln
[194] print_line_cursor#167 = print_line_cursor#0
[195] call print_ln
to:printEntry::@31
printEntry::@31: scope:[printEntry] from printEntry::@30
[195] print_char_cursor#220 = print_line_cursor#0
[196] call print_str
[196] print_char_cursor#220 = print_line_cursor#0
[197] call print_str
to:printEntry::entryBAddrLo1
printEntry::entryBAddrLo1: scope:[printEntry] from printEntry::@31
[197] phi()
[198] phi()
to:printEntry::@10
printEntry::@10: scope:[printEntry] from printEntry::entryBAddrLo1
[198] print_uchar::b#6 = printEntry::entry#10[$e]
[199] call print_uchar
[199] print_uchar::b#6 = printEntry::entry#10[$e]
[200] call print_uchar
to:printEntry::@32
printEntry::@32: scope:[printEntry] from printEntry::@10
[200] print_line_cursor#168 = print_line_cursor#0
[201] call print_ln
[201] print_line_cursor#168 = print_line_cursor#0
[202] call print_ln
to:printEntry::@33
printEntry::@33: scope:[printEntry] from printEntry::@32
[202] print_char_cursor#221 = print_line_cursor#0
[203] call print_str
[203] print_char_cursor#221 = print_line_cursor#0
[204] call print_str
to:printEntry::entryBAddrHi1
printEntry::entryBAddrHi1: scope:[printEntry] from printEntry::@33
[204] phi()
[205] phi()
to:printEntry::@11
printEntry::@11: scope:[printEntry] from printEntry::entryBAddrHi1
[205] print_uchar::b#7 = printEntry::entry#10[$f]
[206] call print_uchar
[206] print_uchar::b#7 = printEntry::entry#10[$f]
[207] call print_uchar
to:printEntry::@34
printEntry::@34: scope:[printEntry] from printEntry::@11
[207] print_line_cursor#169 = print_line_cursor#0
[208] call print_ln
[208] print_line_cursor#169 = print_line_cursor#0
[209] call print_ln
to:printEntry::@35
printEntry::@35: scope:[printEntry] from printEntry::@34
[209] print_char_cursor#222 = print_line_cursor#0
[210] call print_str
[210] print_char_cursor#222 = print_line_cursor#0
[211] call print_str
to:printEntry::entryTHi1
printEntry::entryTHi1: scope:[printEntry] from printEntry::@35
[211] phi()
[212] phi()
to:printEntry::@12
printEntry::@12: scope:[printEntry] from printEntry::entryTHi1
[212] print_uchar::b#8 = printEntry::entry#10[$10]
[213] call print_uchar
[213] print_uchar::b#8 = printEntry::entry#10[$10]
[214] call print_uchar
to:printEntry::@36
printEntry::@36: scope:[printEntry] from printEntry::@12
[214] print_line_cursor#170 = print_line_cursor#0
[215] call print_ln
[215] print_line_cursor#170 = print_line_cursor#0
[216] call print_ln
to:printEntry::@37
printEntry::@37: scope:[printEntry] from printEntry::@36
[216] print_char_cursor#223 = print_line_cursor#0
[217] call print_str
[217] print_char_cursor#223 = print_line_cursor#0
[218] call print_str
to:printEntry::entryTLo1
printEntry::entryTLo1: scope:[printEntry] from printEntry::@37
[218] phi()
[219] phi()
to:printEntry::@13
printEntry::@13: scope:[printEntry] from printEntry::entryTLo1
[219] print_uchar::b#9 = printEntry::entry#10[$11]
[220] call print_uchar
[220] print_uchar::b#9 = printEntry::entry#10[$11]
[221] call print_uchar
to:printEntry::@38
printEntry::@38: scope:[printEntry] from printEntry::@13
[221] print_line_cursor#171 = print_line_cursor#0
[222] call print_ln
[222] print_line_cursor#171 = print_line_cursor#0
[223] call print_ln
to:printEntry::@return
printEntry::@return: scope:[printEntry] from printEntry::@38
[223] return
[224] return
to:@return
byte keyboard_key_pressed(byte keyboard_key_pressed::key)
keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@1 main::@3
[224] phi()
[225] call keyboard_matrix_read
[226] keyboard_matrix_read::return#2 = keyboard_matrix_read::return#0
[225] phi()
[226] call keyboard_matrix_read
[227] keyboard_matrix_read::return#2 = keyboard_matrix_read::return#0
to:keyboard_key_pressed::@1
keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_pressed
[227] keyboard_key_pressed::$2 = keyboard_matrix_read::return#2
[228] keyboard_key_pressed::return#0 = keyboard_key_pressed::$2 & *(keyboard_matrix_col_bitmask+keyboard_key_pressed::colidx#0)
[228] keyboard_key_pressed::$2 = keyboard_matrix_read::return#2
[229] keyboard_key_pressed::return#0 = keyboard_key_pressed::$2 & *(keyboard_matrix_col_bitmask+keyboard_key_pressed::colidx#0)
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1
[229] return
[230] return
to:@return
void* memset(void* memset::str , byte memset::c , word memset::num)
memset: scope:[memset] from print_cls
[230] phi()
[231] phi()
to:memset::@1
memset::@1: scope:[memset] from memset memset::@2
[231] memset::dst#2 = phi( memset/(byte*)memset::str#0, memset::@2/memset::dst#1 )
[232] if(memset::dst#2!=memset::end#0) goto memset::@2
[232] memset::dst#2 = phi( memset/(byte*)memset::str#0, memset::@2/memset::dst#1 )
[233] if(memset::dst#2!=memset::end#0) goto memset::@2
to:memset::@return
memset::@return: scope:[memset] from memset::@1
[233] return
[234] return
to:@return
memset::@2: scope:[memset] from memset::@1
[234] *memset::dst#2 = memset::c#0
[235] memset::dst#1 = ++ memset::dst#2
[235] *memset::dst#2 = memset::c#0
[236] memset::dst#1 = ++ memset::dst#2
to:memset::@1
void print_char(byte print_char::ch)
print_char: scope:[print_char] from print_str::@2 print_uchar print_uchar::@1
[236] print_char_cursor#83 = phi( print_str::@2/print_char_cursor#1, print_uchar/print_char_cursor#148, print_uchar::@1/print_char_cursor#10 )
[236] print_char::ch#3 = phi( print_str::@2/print_char::ch#0, print_uchar/print_char::ch#1, print_uchar::@1/print_char::ch#2 )
[237] *print_char_cursor#83 = print_char::ch#3
[238] print_char_cursor#10 = ++ print_char_cursor#83
[237] print_char_cursor#83 = phi( print_str::@2/print_char_cursor#1, print_uchar/print_char_cursor#148, print_uchar::@1/print_char_cursor#10 )
[237] print_char::ch#3 = phi( print_str::@2/print_char::ch#0, print_uchar/print_char::ch#1, print_uchar::@1/print_char::ch#2 )
[238] *print_char_cursor#83 = print_char::ch#3
[239] print_char_cursor#10 = ++ print_char_cursor#83
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[239] return
[240] return
to:@return
void print_uint(word print_uint::w)
print_uint: scope:[print_uint] from printEntry::@1 printEntry::@2 printEntry::@3 printEntry::@4 printEntry::@9
[240] print_uint::w#5 = phi( printEntry::@1/print_uint::w#7, printEntry::@2/print_uint::w#8, printEntry::@3/print_uint::w#2, printEntry::@4/print_uint::w#10, printEntry::@9/print_uint::w#4 )
[241] print_uchar::b#0 = > print_uint::w#5
[242] call print_uchar
[241] print_uint::w#5 = phi( printEntry::@1/print_uint::w#7, printEntry::@2/print_uint::w#8, printEntry::@3/print_uint::w#2, printEntry::@4/print_uint::w#10, printEntry::@9/print_uint::w#4 )
[242] print_uchar::b#0 = > print_uint::w#5
[243] call print_uchar
to:print_uint::@1
print_uint::@1: scope:[print_uint] from print_uint
[243] print_uchar::b#1 = < print_uint::w#5
[244] call print_uchar
[244] print_uchar::b#1 = < print_uint::w#5
[245] call print_uchar
to:print_uint::@return
print_uint::@return: scope:[print_uint] from print_uint::@1
[245] return
[246] return
to:@return
void print_uchar(byte print_uchar::b)
print_uchar: scope:[print_uchar] from printEntry::@10 printEntry::@11 printEntry::@12 printEntry::@13 printEntry::@5 printEntry::@6 printEntry::@7 printEntry::@8 print_uint print_uint::@1
[246] print_char_cursor#148 = phi( printEntry::@10/print_char_cursor#1, printEntry::@11/print_char_cursor#1, printEntry::@12/print_char_cursor#1, printEntry::@13/print_char_cursor#1, printEntry::@5/print_char_cursor#1, printEntry::@6/print_char_cursor#1, printEntry::@7/print_char_cursor#1, printEntry::@8/print_char_cursor#1, print_uint/print_char_cursor#1, print_uint::@1/print_char_cursor#10 )
[246] print_uchar::b#10 = phi( printEntry::@10/print_uchar::b#6, printEntry::@11/print_uchar::b#7, printEntry::@12/print_uchar::b#8, printEntry::@13/print_uchar::b#9, printEntry::@5/print_uchar::b#2, printEntry::@6/print_uchar::b#3, printEntry::@7/print_uchar::b#4, printEntry::@8/print_uchar::b#5, print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
[247] print_uchar::$0 = print_uchar::b#10 >> 4
[248] print_char::ch#1 = print_hextab[print_uchar::$0]
[249] call print_char
[247] print_char_cursor#148 = phi( printEntry::@10/print_char_cursor#1, printEntry::@11/print_char_cursor#1, printEntry::@12/print_char_cursor#1, printEntry::@13/print_char_cursor#1, printEntry::@5/print_char_cursor#1, printEntry::@6/print_char_cursor#1, printEntry::@7/print_char_cursor#1, printEntry::@8/print_char_cursor#1, print_uint/print_char_cursor#1, print_uint::@1/print_char_cursor#10 )
[247] print_uchar::b#10 = phi( printEntry::@10/print_uchar::b#6, printEntry::@11/print_uchar::b#7, printEntry::@12/print_uchar::b#8, printEntry::@13/print_uchar::b#9, printEntry::@5/print_uchar::b#2, printEntry::@6/print_uchar::b#3, printEntry::@7/print_uchar::b#4, printEntry::@8/print_uchar::b#5, print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
[248] print_uchar::$0 = print_uchar::b#10 >> 4
[249] print_char::ch#1 = print_hextab[print_uchar::$0]
[250] call print_char
to:print_uchar::@1
print_uchar::@1: scope:[print_uchar] from print_uchar
[250] print_uchar::$2 = print_uchar::b#10 & $f
[251] print_char::ch#2 = print_hextab[print_uchar::$2]
[252] call print_char
[251] print_uchar::$2 = print_uchar::b#10 & $f
[252] print_char::ch#2 = print_hextab[print_uchar::$2]
[253] call print_char
to:print_uchar::@return
print_uchar::@return: scope:[print_uchar] from print_uchar::@1
[253] return
[254] return
to:@return
byte keyboard_matrix_read(byte keyboard_matrix_read::rowid)
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
[254] *((byte*)CIA1) = *(keyboard_matrix_row_bitmask+keyboard_key_pressed::rowidx#0)
[255] keyboard_matrix_read::return#0 = ~ *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B)
[255] *((byte*)CIA1) = *(keyboard_matrix_row_bitmask+keyboard_key_pressed::rowidx#0)
[256] keyboard_matrix_read::return#0 = ~ *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B)
to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
[256] return
[257] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@ constant byte RADIX::OCTAL = 8
constant const byte SIZEOF_ENTRY = $12
constant byte* files[(word)MAX_FILES*SIZEOF_ENTRY] = { fill( (word)MAX_FILES*SIZEOF_ENTRY, 0) }
void initEntry(byte* initEntry::entry , byte initEntry::n)
word~ initEntry::$1 zp[2]:8 11.0
byte*~ initEntry::$1 zp[2]:8 22.0
byte~ initEntry::$11 reg byte a 22.0
byte~ initEntry::$13 reg byte a 22.0
byte~ initEntry::$15 reg byte a 22.0
@ -20,14 +20,15 @@ byte~ initEntry::$19 reg byte a 22.0
byte~ initEntry::$21 reg byte a 22.0
byte~ initEntry::$23 reg byte a 22.0
byte~ initEntry::$25 reg byte a 22.0
word~ initEntry::$3 zp[2]:16 11.0
byte~ initEntry::$26 reg byte a 22.0
byte*~ initEntry::$3 zp[2]:16 22.0
word~ initEntry::$5 zp[2]:10 22.0
word~ initEntry::$7 zp[2]:12 11.0
word*~ initEntry::$7 zp[2]:12 22.0
byte~ initEntry::$9 reg byte a 22.0
byte* initEntry::entry
byte* initEntry::entry#0 entry zp[2]:4 4.0
byte* initEntry::entry#1 entry zp[2]:4 4.0
byte* initEntry::entry#10 entry zp[2]:4 2.3589743589743586
byte* initEntry::entry#10 entry zp[2]:4 2.3
byte* initEntry::entryBAddrHi1_entry
byte* initEntry::entryBAddrHi1_return
byte* initEntry::entryBAddrLo1_entry
@ -55,7 +56,7 @@ word** initEntry::entryTsOrder1_return
byte* initEntry::entryUCross1_entry
word* initEntry::entryUCross1_return
byte initEntry::n
byte initEntry::n#10 reg byte x 3.7631578947368434
byte initEntry::n#10 reg byte x 3.6666666666666656
void keyboard_init()
byte keyboard_key_pressed(byte keyboard_key_pressed::key)
byte~ keyboard_key_pressed::$2 reg byte a 202.0
@ -270,6 +271,7 @@ reg byte a [ main::$22 ]
reg byte a [ mul8u::$1 ]
zp[2]:8 [ initEntry::$1 print_uint::w#5 print_uint::w#7 print_uint::w#8 print_uint::w#2 print_uint::w#10 print_uint::w#4 ]
zp[2]:10 [ initEntry::$5 print_char_cursor#83 print_char_cursor#146 print_char_cursor#1 print_char_cursor#167 print_char_cursor#209 print_char_cursor#210 print_char_cursor#211 print_char_cursor#212 print_char_cursor#213 print_char_cursor#214 print_char_cursor#215 print_char_cursor#216 print_char_cursor#217 print_char_cursor#218 print_char_cursor#219 print_char_cursor#220 print_char_cursor#221 print_char_cursor#222 print_char_cursor#223 print_char_cursor#10 print_char_cursor#227 print_char_cursor#228 print_char_cursor#230 print_char_cursor#231 print_char_cursor#148 memset::dst#2 memset::dst#1 ]
reg byte a [ initEntry::$26 ]
zp[2]:12 [ initEntry::$7 ]
reg byte a [ initEntry::$9 ]
reg byte a [ initEntry::$11 ]

View File

@ -54,7 +54,7 @@ main: {
.label s = 8
.label i_1 = 4
.label __33 = $1b
// *D018 = toD018(SCREEN, 0x1800)
// *D018 = toD018(SCREEN, (char*)0x1800)
//Show lower case font
lda #toD0181_return
sta D018

View File

@ -5971,7 +5971,7 @@ main: {
// [1] phi from main to main::toD0181 [phi:main->main::toD0181]
// main::toD0181
// main::@14
// *D018 = toD018(SCREEN, 0x1800)
// *D018 = toD018(SCREEN, (char*)0x1800)
// [2] *D018 = main::toD0181_return#0 -- _deref_pbuc1=vbuc2
//Show lower case font
lda #toD0181_return

View File

@ -217,7 +217,7 @@ memchr::@2: scope:[memchr] from memchr::@1
if(memchr::$2) goto memchr::@4
to:memchr::@5
memchr::@3: scope:[memchr] from memchr::@1
memchr::return#0 = ((void*)) 0
memchr::return#0 = (void*)0
to:memchr::@return
memchr::@4: scope:[memchr] from memchr::@2
memchr::c#5 = phi( memchr::@2/memchr::c#2 )
@ -2314,7 +2314,6 @@ Inlining cast memcpy::src#0 = (byte*)memcpy::source#2
Inlining cast memcpy::dst#0 = (byte*)memcpy::destination#2
Inlining cast memset::dst#0 = (byte*)memset::str#3
Inlining cast memchr::ptr#0 = (byte*)memchr::str#2
Inlining cast memchr::return#0 = (void*)0
Inlining cast memchr::return#1 = (void*)memchr::ptr#4
Inlining cast utoa::max_digits#1 = (unumber)5
Inlining cast utoa::max_digits#2 = (unumber)4

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