From 663a439c34f8fe5c31a2f5f38abffa7de41d5190 Mon Sep 17 00:00:00 2001 From: Flight_Control Date: Fri, 14 Apr 2023 08:00:31 +0200 Subject: [PATCH] - Updated test cases --- .../ref/call-banked-phi-case-3-near-1.asm | 1 + .../ref/call-banked-phi-case-3-near-1.log | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/test/ref/call-banked-phi-case-3-near-1.asm b/src/test/ref/call-banked-phi-case-3-near-1.asm index f3e8aa08d..39b32a2d9 100644 --- a/src/test/ref/call-banked-phi-case-3-near-1.asm +++ b/src/test/ref/call-banked-phi-case-3-near-1.asm @@ -69,6 +69,7 @@ plus: { } .segment Code // char min(char a, char b) +// banked : bank area='cx16_ram', bank=1 min: { .label return = plus.a+plus.b rts diff --git a/src/test/ref/call-banked-phi-case-3-near-1.log b/src/test/ref/call-banked-phi-case-3-near-1.log index fde569cc1..ee40560bd 100644 --- a/src/test/ref/call-banked-phi-case-3-near-1.log +++ b/src/test/ref/call-banked-phi-case-3-near-1.log @@ -220,10 +220,10 @@ Uplift Scope [plus] Uplift Scope [min] Uplift Scope [] -Uplifting [main] best 90 combination -Uplifting [plus] best 90 combination -Uplifting [min] best 90 combination -Uplifting [] best 90 combination +Uplifting [main] best 93 combination +Uplifting [plus] best 93 combination +Uplifting [min] best 93 combination +Uplifting [] best 93 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -277,9 +277,10 @@ main: { // [1] call plus // [4] phi from main to plus [phi:main->plus] -- call_phi_close_cx16_ram plus_from_main: + lda.z 0 + pha lda #1 sta.z 0 - pha jsr plus pla sta.z 0 @@ -298,6 +299,7 @@ main: { .segment RAM_Bank1 // plus // char plus(char a, char b) +// banked : bank area='cx16_ram', bank=1 plus: { .label a = '0' .label b = 7 @@ -314,6 +316,7 @@ plus: { .segment Code // min // char min(char a, char b) +// banked : bank area='cx16_ram', bank=1 min: { .label return = plus.a+plus.b jmp __breturn @@ -356,7 +359,7 @@ char plus::return FINAL ASSEMBLER -Score: 51 +Score: 54 // File Comments /** @@ -409,9 +412,10 @@ main: { // plus('0', 7) // [1] call plus // [4] phi from main to plus [phi:main->plus] -- call_phi_close_cx16_ram + lda.z 0 + pha lda #1 sta.z 0 - pha jsr plus pla sta.z 0 @@ -428,6 +432,7 @@ main: { .segment RAM_Bank1 // plus // char plus(char a, char b) +// banked : bank area='cx16_ram', bank=1 plus: { .label a = '0' .label b = 7 @@ -443,6 +448,7 @@ plus: { .segment Code // min // char min(char a, char b) +// banked : bank area='cx16_ram', bank=1 min: { .label return = plus.a+plus.b // min::@return