- Updated test cases

This commit is contained in:
Flight_Control 2023-04-14 08:00:31 +02:00
parent 70012690dd
commit 663a439c34
2 changed files with 14 additions and 7 deletions

View File

@ -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

View File

@ -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