68000: make fork a special case
authorAlan Cox <alan@linux.intel.com>
Wed, 19 Oct 2016 19:59:20 +0000 (20:59 +0100)
committerAlan Cox <alan@linux.intel.com>
Wed, 19 Oct 2016 19:59:20 +0000 (20:59 +0100)
commite02753a50275ac94a7fbda6dfbcbc84bc44adb6e
tree07b62eeb56afd5ea0dd82fad150b79bf29da8a01
parent8ab7217212af0e49cb18bb06e82ac9f2f428e76c
68000: make fork a special case

By defining _fork() as trashing all registers we can implement multiple udata
pointer based 68K platforms without having to save the CPU registers on syscall
entry. Instead the child does a direct supervisor a7 fixup and rte to user space
with d0/d1 correct. The rest is handled by the wrapper.

Now this isn't perfect and we probably need to adjust the rules a bit if
anyone is doing clever register resident relative code because if you take a
signal handler just at the wrong moment.

I guess as we have to save A5, you'll have to use A5 8) for Amiga style
resident code if we ever get that far.
Library/libs/fuzix68000/syscall__fork.S
Library/tools/syscall_68000.c