On Mon, Sep 06, 1999 at 12:33:56PM +0100, Nicholas Clark wrote:
> Having written ARM assembler to talk to RISC OS I can see good reason to use
> conditional SWIs - mostly common would be a string of SWIs you don't expect
> to fail with all bar the first VC, to save 1 VS instruction per SWI to branch
> or return the error case.
> 
> However, RISC OS SWI calls
>   (1) appear to be designed for an assembly language (rather than C) interface
>   (2) (almost) all return VS to signal errors
>   (3) sometimes take arguments direct from one SWI call into the next
> 
> I've never programmed in assembler for ARM based Unix, so don't know what the
> calling interface is like, but would suspect that the three conditions above
> are all not met, hence the opportunities to usefully use conditional SWI calls
> would be much less on ARM unix.

The Linux system call interface returns a negative error number
(indicating which error occurred), and a positive value on success.  Um.
_nearly_ always.  Virtually all programs call glibc to do the system calls
on their behalf, so modern programs shouldn't contain any SWIs themselves.
This was not the case for libc4 programs, which do contain SWIs.

-- 
Matthew Wilcox <[EMAIL PROTECTED]>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
This is a backup list for [EMAIL PROTECTED], and the subscription
list is regularly synchronised.

Reply via email to