[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [f-cpu] Manual 0.2.6
On Thu, Jul 25, 2002 at 01:52:17PM +0200, Yann Guidon wrote:
[...]
> > > 7.1.7 `syscall'/`trap':
> > > It's still not clear what the difference is.
> > > I suppose both instructions perform an SRB.
> the difference is that "syscall" uses CPU cycles in a shared library
> or something like that, on behalf of the calling task. A trap is
> used for exceptional conditions, not common functions.
> But that old question could still change a bit...
Shared library calls usually are ordinary function calls.
Two different instructions only make sense if one of them
- doesn't switch to supervisor mode
- doesn't perform an SRB
(that is, works in the context of the caller). But how are you going
to return from it? `rte' won't work because it assumes that a context
switch has been performed. The only form that would make sense is
syscall imm16, r1
which performs
r1 := pc + 4
pc := table_from_some_SR[imm16]
(plus range checking) but nothing else.
--
Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
"All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu in the body. http://f-cpu.seul.org/