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

Re: return 64-bit int by identifier (was Re: return?)



On Fri, 2003-11-14 at 00:53, Kiran Kumar wrote:

>   The assembly equivalent of this code is
> enlightening. 64 bit values are returned through the
> %eax and %edx registers rather than through %eax
> alone. Relevant portions are attached..

Of course they are :)

The registers are only 32-bit, after all.

The x86 ABI defines the mechanism for returning extended types.  In such
situations, you either have to do a memcpy or (preferably) snag an extra
register.

	Robert Love


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/