From d6c870112cf0a330938d14859be838908d0fae10 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 28 Mar 2018 12:57:58 -0700 Subject: [PATCH 1/2] Revert "Fix for strings in non ENTER/LEAVE functions" This reverts commit fb0ef9848b87a9114df0f1985cbd77b50f099c1d. --- Platform/Apple/tools/PLASMA/src/plvm02.s | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Platform/Apple/tools/PLASMA/src/plvm02.s b/Platform/Apple/tools/PLASMA/src/plvm02.s index 13cdc8b3..d965d23f 100644 --- a/Platform/Apple/tools/PLASMA/src/plvm02.s +++ b/Platform/Apple/tools/PLASMA/src/plvm02.s @@ -1340,16 +1340,7 @@ LEAVEX INY ;+INC_IP STA IFPL PLA STA IFPH - STA ALTRDOFF - LDA PSR - PHA - PLP - RTS -RETX LDA IFPL - STA PPL - LDA IFPH - STA PPH - STA ALTRDOFF +RETX STA ALTRDOFF LDA PSR PHA PLP From 1528d5f7aa8e5c6d6828947b9e136352f9111d75 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 28 Mar 2018 13:00:58 -0700 Subject: [PATCH 2/2] Always output ENTER/LEAVE for functions (no zero locals optimization) --- Platform/Apple/tools/PLASMA/src/codegen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Platform/Apple/tools/PLASMA/src/codegen.c b/Platform/Apple/tools/PLASMA/src/codegen.c index 5fb6f882..166d8ec7 100644 --- a/Platform/Apple/tools/PLASMA/src/codegen.c +++ b/Platform/Apple/tools/PLASMA/src/codegen.c @@ -824,10 +824,10 @@ void emit_ical(void) void emit_leave(void) { emit_pending_seq(); - if (localsize) + //if (localsize) printf("\t%s\t$5A,$%02X\t\t\t; LEAVE\t%d\n", DB, localsize, localsize); - else - printf("\t%s\t$5C\t\t\t; RET\n", DB); + //else + // printf("\t%s\t$5C\t\t\t; RET\n", DB); } void emit_ret(void) { @@ -836,7 +836,7 @@ void emit_ret(void) } void emit_enter(int cparams) { - if (localsize) + //if (localsize) printf("\t%s\t$58,$%02X,$%02X\t\t; ENTER\t%d,%d\n", DB, localsize, cparams, localsize, cparams); } void emit_start(void)