Mark Morgan Lloyd schrieb:
So at the very least, we have to consistently simulate a stack- apart
from anything else, that's mandated by Pascal's use of recursion. But we
don't necessarily have to use the same calling convention for Linux and
for "classic" OSes (i.e. including those which are freely-available,
running on Hercules etc.).
See my note on the OS specific/supplied debugger.
Question (to save me digging into the manuals right now): where a recent
machine uses the dedicated stack instructions, is the stack pointer one
of the standard registers? In other words, can push/pop operations be
trivially and exactly simulated for older hardware?
You mean thread safety?
As long as only one thread is running, the push/pop instructions must
not be atomic.
Multiple threads introduce many more problems, because their return
stacks must never get mixed. Furthermore each thread must have its own
stack, again no conflicts.
DoDi
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel