This is the mail archive of the
mailing list for the GCC project.
Re: calculation of pi
On Sat, Nov 3, 2012 at 12:55 AM, Mischa Baars <email@example.com> wrote:
> On 11/02/2012 07:11 PM, Ian Lance Taylor wrote:
>> On Fri, Nov 2, 2012 at 8:13 AM, Mischa Baars <firstname.lastname@example.org>
>>> I have been writing this piece of example code, but it seems that someone
>>> has been modifying the compiler in the meantime such that arguments are
>>> passed in xmm registers instead of over the stack. Also the npx top of
>>> pointer isn't handled alike for all three different types of real numbers
>>> function return any more.
>> I have not looked at your code. However, I can tell you that on
>> 32-bit x86 floating point function arguments are normally passed on
>> the stack and on 64-bit x86 floating point arguments are normally
>> passed in the xmm registers. There are various ways that you can
>> change this default behaviour, but if you are seeing an unexpected
>> change then I would guess that you changed from 32-bit compilation to
>> 64-bit compilation.
> By the way, it seems this only holds for single and double real numbers.
> These are indeed passed in xmm registers, the long double however is still
> passed over the stack.
> Do we have any compiler options that change this behaviour back to the
> original? The default behaviour in 64-bit mode is not even the same for all
> real number types.
There is no "original." The 32-bit and 64-bit ABIs are different.
The 64-bit ABI has always passed arguments in registers. There is no
option to force the 64-bit compiler to pass arguments on the stack.