> -----Original Message----- > From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] > On Behalf Of Andrew Haley > Sent: Thursday, November 08, 2012 6:29 AM > To: phi gcc > Cc: gcc-help@xxxxxxxxxxx > Subject: Re: x86 procedure calling convention (again) > > On 11/08/12 08:10, phi gcc wrote: > > > The document you point out say page 3-11 'All incoming arguments > > appear on the stack, residing in the stack frame of the caller.' > > This is true for x86/32. > > > It is obvious that GCC don't care about this and assign some args > > tosome (scratch) registers, the problem is that what arg goes in what > > regs changes over time, and I need to know if there is a way to know > > this. > > No, that's not so for global functions. You're talking about x86/64; it's a > different ABI. > I have followed this very closely since 1999 for my textbook, which is mostly on x86-64. The argument passing protocols for global functions have not changed during this time for either 32-bit or 64-bit. If you wish, you can obtain a free preview copy of my textbook (an introductory book on the topic) from bob.cs.sonoma.edu to see if it may be helpful in understanding this. --Bob