On 16.10.2008 17:41, ron minnich wrote:
On Thu, Oct 16, 2008 at 7:58 AM, Myles Watson mylesgw@gmail.com wrote:
The question is what attribute can be used to make those functions have the normal calling convention when compiling with -mregparm=3. We're using -mregparm=3 for speed reasons.
The simplest thing: put all the functions that need regparm=0 in one file, compile that file with regparm=0
Indeed simple, but it won't work because every function outside this file, but called from this file will have a calling convention conflict. The caller will assume regparm(0), the callee will assume regparm(3). Boom.
Myles, please go with __attribute__((regparm(0))) for the functions that need it.
Regards, Carl-Daniel