Kernel Calling Conventions
- From: johnzulu <spamtrap@xxxxxxxxxx>
- Date: Mon, 20 Mar 2006 10:31:24 +0800
Depends on the situation. With stack you can pass more variables
into the system call. It can be a pain when the register's contents
change after the syscall. But if the parameters of the call are set
minimum , registers can be used without using more memory
for the stack operations.
It depends on your application. For limited memory, I would
go for registers..
john
On 19 Mar 2006 13:14:04 -0800, "Kroll" <spamtrap@xxxxxxxxxx> wrote:
Greetings all,
I was reading the "FreeBSD Assembly Language Programming" tutorial
(http://www.int80h.org/bsdasm/), when I came across something that
piqued my curiosity.
The C calling convention is touted as being more convenient, and
superior to the calling convention used by linux and microsoft of
passing arguments within registers. I was wondering if this is just a
bias on the part of the writer or what.
What are the actual advantages of popping the arguments onto to the
stack as opposed to passing them via registers?
Thanks in advance, :)
Kyle
.
- Follow-Ups:
- Re: Kernel Calling Conventions
- From: spamtrap
- Re: Kernel Calling Conventions
- References:
- Kernel Calling Conventions
- From: Kroll
- Kernel Calling Conventions
- Prev by Date: Re: Kernel Calling Conventions
- Next by Date: Re: Reading floating-point input from stdin in NASM
- Previous by thread: Re: Kernel Calling Conventions
- Next by thread: Re: Kernel Calling Conventions
- Index(es):
Relevant Pages
|