Force only register transfer calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I need to prevent functions from using stack based params if the
number of parameters exceeds 6 on x86_64.
Is there a different calling convention I can force gcc to use?
Basically I need one that doesn't depend on a particular order on the
stack.
Here is what I want in pseudo code:

cdecl stack:
<param1>
<param0>
<ret> <- stack ptr
called function knows that the next value after the ret value is the
first param.

I need something where gcc automatically hands over a pointer like this:

<param1>
<param0> <- stack ptr
(...)
different stack:
<ret>
called function gets stack ptr from gcc and 'knows' where to look for
the rest of the params

Is that or something similar possible with gcc? Can I at least have
gcc fail if a function can not be used with the regparm model?

Thanks,
-Bernhard

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux