This is the mail archive of the
mailing list for the GCC project.
Re: calculation of pi
On Sun, Nov 4, 2012 at 1:34 AM, Mischa Baars <email@example.com> wrote:
> On 11/04/2012 02:45 AM, Ian Lance Taylor wrote:
>> 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.
> Sounds more logical to me, that a least all types of numbers are treated in
> the same manner. I suppose the ABI should be modified then if you ask me.
An ABI is by definition processor specific. The placement of argument
values is chosen based on runtime efficiency, not on any other sort of
logic. On x86_64, 32-bit and 64-bit float values can be passed
directly in registers, as the x86_64 has efficient 32-bit and 64-bit
floating point registers. The x86_64 does not have floating point
registers that can efficiently store floating point values with more
than 64 bits, so those values are not passed in floating point
registers. To make any other choice would cost runtime efficiency,
which is the only logic that matters.