lkml.org 
[lkml]   [1999]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Q: Linux system calls and calling conventions
On Wed, Nov 10, 1999 at 08:18:21PM -0500, Chris Wing wrote:
> This works at least on the Intel; old programs pass 16-bit values into the
> 32-bit registers in a sensible way, and new programs can pass 32-bit UIDs
> and GIDs to the same calls.
>
> However, someone pointed out to me in an email that this may not
> necessarily be true on other platforms. So, my question is:
>
> - or rather, will my assumption not work on one or more non-i386
> architectures?

Your assumption holds on ARM and PA-RISC. They both take their arguments
in registers. Take a look in include/asm-*/unistd.h, this is where
the architecture defines how to make a system call. On the Alpha,
for example, it casts all arguments to long first, so I'm guessing your
assumption is true there too.

--
Matthew Wilcox <willy@bofh.ai>
"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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.082 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site