The new regression test lonesha256.c (originally added as test for a now fixed gbz80 bug) passes for all targets except ds390. I do not know if this is a bug in the ds390 port vs. a limitation (e..g lack of memory). This should be investigated and the bug fixed (or if there is no bug, a comment should be added to teh test on why it is disabled for ds390).
If I did not miscalculate it, lonesha256 should have 676B of local variables.
const uint32_t K[64]makes up 256B, but this could be made global, since it's constant.Without it there would still be 420B of local variables, so still enough to have the >128B situation.
gbz80 still fails for test #4, which is not part of the regression test, and already failed that one with sdcc 4.0.0 before this regression was introduced. It's suspected that's also due to overflowing WRAM and gameboy has twice as much working RAM as DS80C390.
But I can't see yet how this function would overflow 4KiB or even 8KiB of RAM