1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-08-11 02:25:17 +00:00

Fixed tests. #328

This commit is contained in:
Jesper Gravgaard
2019-09-26 15:05:50 +02:00
parent b83ab7d402
commit a450da9123
3 changed files with 6 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ Updating memory variable reference *((const byte*) idx_ptr)
CONTROL FLOW GRAPH SSA CONTROL FLOW GRAPH SSA
@begin: scope:[] from @begin: scope:[] from
*((const byte*) idx_ptr) ← (number) 0 *((const byte*) idx_ptr) ← (byte) 0
(byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) SCREEN#0 ← ((byte*)) (number) $400
to:@1 to:@1
@@ -57,16 +57,10 @@ SYMBOL TABLE SSA
(byte) main::i#1 (byte) main::i#1
(byte) main::i#2 (byte) main::i#2
Adding number conversion cast (unumber) 0 in *((const byte*) idx_ptr) ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast *((const byte*) idx_ptr) ← (unumber)(number) 0
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024 Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$0 [8] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 Simple Condition (bool~) main::$0 [8] if((byte) main::i#1!=rangelast(0,5)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024 Constant (const byte*) SCREEN#0 = (byte*) 1024
@@ -377,7 +371,7 @@ Score: 323
.label SCREEN = $400 .label SCREEN = $400
// @begin // @begin
bbegin: bbegin:
// idx=0 // idx
// [0] *((const byte*) idx_ptr) ← (byte) 0 -- _deref_pbuc1=vbuc2 // [0] *((const byte*) idx_ptr) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0 lda #0
sta idx_ptr sta idx_ptr

View File

@@ -1,5 +1,5 @@
// Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store) // Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store)
// Test a pointer // Test a pointer to a memory variable
.pc = $801 "Basic" .pc = $801 "Basic"
:BasicUpstart(bbegin) :BasicUpstart(bbegin)
.pc = $80d "Program" .pc = $80d "Program"

View File

@@ -154,7 +154,7 @@ INITIAL ASM
Target platform is c64basic / MOS6502X Target platform is c64basic / MOS6502X
// File Comments // File Comments
// Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store) // Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store)
// Test a pointer // Test a pointer to a memory variable
// Upstart // Upstart
.pc = $801 "Basic" .pc = $801 "Basic"
:BasicUpstart(bbegin) :BasicUpstart(bbegin)
@@ -254,7 +254,7 @@ Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ idx_p#0 ]
ASSEMBLER BEFORE OPTIMIZATION ASSEMBLER BEFORE OPTIMIZATION
// File Comments // File Comments
// Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store) // Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store)
// Test a pointer // Test a pointer to a memory variable
// Upstart // Upstart
.pc = $801 "Basic" .pc = $801 "Basic"
:BasicUpstart(bbegin) :BasicUpstart(bbegin)
@@ -376,7 +376,7 @@ Score: 399
// File Comments // File Comments
// Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store) // Test declaring a variable as "memory", meaning it will be stored in memory and accessed through an implicit pointer (using load/store)
// Test a pointer // Test a pointer to a memory variable
// Upstart // Upstart
.pc = $801 "Basic" .pc = $801 "Basic"
:BasicUpstart(bbegin) :BasicUpstart(bbegin)