This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GAS
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Saidgani <saidgani at confida dot net>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 18 May 2015 13:27:42 +0100
- Subject: Re: GAS
- Authentication-results: sourceware.org; auth=none
- References: <5559D9CD dot 2070808 at confida dot net>
On 18 May 2015 at 13:23, Saidgani wrote:
> Hello. I have a question: How does GCC x64 put parametrs of the function on
> C language in stack or registers. In x32 architecture it was simple. all
> parametrs of function was put in stack . But in x64 gcc puts some parametrs
> in %rdi, %rsi, %r8d, %r9d registers, and some parametrs in stack. How does
> it work generally?
This is defined by the x86_64 psABI:
http://refspecs.linuxfoundation.org/elf/x86-64-abi-0.99.pdf