[fpc-devel] Re. z370 Cross Compilation, Pass 2 of ....
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sun Sep 1 20:48:20 CEST 2013
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
More information about the fpc-devel
mailing list