Subject: NetBSD master CVS tree commits
To: None <source-changes@NetBSD.ORG>
From: The Source of All Evil <source@NetBSD.ORG>
Date: 07/04/1996 03:20:11
Thu Jul 4 03:19:12 EDT 1996
Update of /a/cvsroot/src/lib/libc/gen
In directory pain.lcs.mit.edu:/a/tmp/cvs-serv1473
execl.c execle.c execlp.c
Thanks to the calling conventions used by some cpus, the argument lists
passed to the execl(), execle(), and execlp() functions are in the form
of the argument vector to be passed to execve(). On these architectures,
it is unnecessary to count the number of arguments, allocate space on
the stack, copy the arguments, etc. The vector already on the stack
can be used instead.
When some arguments are passed in registers (like most RISC CPU's), it
should be possible to allocate stack space adjacent such that the
registers can be copied to that memory. After that, the same
approach described above can be used.
This change takes advantage of this on the i386, m68k, and ns32k. It
is probably true on the vax, but I am unable to check. RISC CPU's
probably need assembly language implementations to ensure everything
is placed exactly as needed when registers are copied to the stack...