It looks like the stack swap code no longer runs since the switch to sections. I uploaded a self-contained example to reproduce it with UAE:
http://bszili.morphos.me/stuff/stacktest-sect.zip
When I run it it prints free stack: 3806, which sounds about right for a default 4096 stack.
I used the previous test program without modifications:
#include <proto/exec.h>
#include <stdio.h>
extern void __stkinit(void);
void * __x = __stkinit;
unsigned long __stack = (32*1024);
int main(void)
{
struct Task *task = FindTask(NULL);
if ((ULONG)task->tc_SPUpper >= (ULONG)task->tc_SPReg && (ULONG)task->tc_SPReg >= (ULONG)task->tc_SPLower)
printf("free stack: %u\n", (ULONG)task->tc_SPReg - (ULONG)task->tc_SPLower);
else
printf("stack pointer is out of bounds\n");
return 0;
}
It's built with m68k-amigaos-gcc -noixemul -o stacktest stacktest.c.
It looks like the stack swap code no longer runs since the switch to sections. I uploaded a self-contained example to reproduce it with UAE: http://bszili.morphos.me/stuff/stacktest-sect.zip When I run it it prints
free stack: 3806
, which sounds about right for a default 4096 stack.I used the previous test program without modifications:
It's built with
m68k-amigaos-gcc -noixemul -o stacktest stacktest.c
.