This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Fix PR 20178: Implement g77 / f2c calling conventions
On Mar 5, 2005, at 11:19 AM, Tobias Schlüter wrote:
Tim Prince wrote:
As the terminology "f2c calling convention" implies, I understand
that g77
adopted it mainly because f2c insisted on it for libf2c. It happened
to
fit well with the x87 and m68k architectures, but that argument isn't
so
compelling any longer. The confusion is perpetuated by the x86-64 ABI
requiring default real function results to be passed in the 80-bit
top of
stack, so that functions built with or without -mfpmath=sse are
compatible. A performance penalty is incurred in the normal sse code
to
enable this.
Maybe I was too long winded: the benefits of dropping f2c
compatibility
will be negated under the x86-64 ABI. I don't suppose the (different)
Windows-x64 ABI has enough importance to influence the decision
(gcc/gfortran may never conform to it), but that would argue against
f2c
compatibility.
By how you described the x86-64 ABI, -ff2c and -fno-f2c would be
compatible
for default REALs on that platform. IOW REALs on x86-64 are
definitely not an
argument against -fno-f2c.
Actually the return result in the x86_64 ABI is always in the SSE
register.
x87 is deprecated on the amd64 by both Intel and AMD.
Note see how I interchange x86_64 and amd64, both are the same really.
-- Pinski