Subject: Re: RFC: Change SWI number base?
To: None <Richard.Earnshaw@arm.com>
From: Ben Harris <email@example.com>
Date: 01/04/2002 12:46:27
On Fri, 4 Jan 2002, Richard Earnshaw wrote:
> Yes, but at the other end, we currently have to read the instruction,
> extract the call number, test whether it is zero (and if so do some
> shuffling), check the range and then switch to the call value. If we
> *know* that a netbsd-elf image always puts the syscall number in r0, then
> we can eliminate all of the decoding and skip straight to the range check.
We'd still need to look at the SWI number, since we need to check for IMB
and suchlike, so the only win is that you can drop the checks for
SYS_syscall (and probably SYS___syscall, if you convert it to SYS_syscall
in userland). On the down side, you increase the number of syscalls for
which you need to copyin some arguments from the stack.
> So we pay a small price in the userland code for a large performance gain
> inside the kernel...
I think "large" may be an overstatement. Testing it shouldn't be hard,
Ben Harris <firstname.lastname@example.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>