Skip to content

Commit

Permalink
- Adds extra message when there's not enough ROM space for proc tramp…
Browse files Browse the repository at this point in the history
…olines and optimizations are disabled, suggetsing to turn them on. The 240p test Suite had an issue when optimizations were disabled.
  • Loading branch information
ArtemioUrbina committed Nov 15, 2023
1 parent 5b32bff commit 542afc7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mkit/as/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ do_call(int *ip)
/* don't increase ROM size until we need a trampoline */
if (call_bank > bank_limit) {
fatal_error("Not enough ROM space for proc trampolines!");
if (asm_opt[OPT_OPTIMIZE] == 0) {
printf("Procedure optimization is currently disabled, use \"-O\" to enable.\n\n");
}
return;
}
max_bank = call_bank;
Expand All @@ -77,6 +80,9 @@ do_call(int *ip)
/* check that the new trampoline won't overrun the bank */
if (((call_ptr + 17) & 0xE000) != (call_1st & 0xE000)) {
error("No more space in bank for .proc trampoline!");
if (asm_opt[OPT_OPTIMIZE] == 0) {
printf("Procedure optimization is currently disabled, use \"-O\" to enable.\n\n");
}
return;
}

Expand Down

0 comments on commit 542afc7

Please sign in to comment.