[PATCH] adds FreeBSD/x86-64 target
Jan Hubicka
jh@suse.cz
Fri Jan 25 15:43:00 GMT 2002
> On Thu, Jan 24, 2002 at 10:37:12PM -0800, David O'Brien wrote:
> > Why does x86-64.h even set DEFAULT_PCC_STRUCT_RETURN to 1 as it is really
> > part of the Intel IA-32 psABI and should be done in a 386 specific
> > header.
>
> x86-64 is not subject to the ia32 psabi. It is quite different.
> Which is rather what you'd expect if you suddenly triple the
> number of available registers.
>
> Anyway, x86-64 defines its own calling convention for returning
> structures in registers, so I suspect that flag_pcc_struct_return
> actually gets ignored. It'd be interesting to prove that one way
> or another though.
The DEFAULT_PCC_STRUCT_RETURN is set to 1 to keep comatibility in the
-m32 compilation that should produce same binaries as any native i386
compulter. THe flag is overwritten for 64bit compilation in i386.c
void
optimization_options (level, size)
int level;
int size ATTRIBUTE_UNUSED;
{
/* For -O2 and beyond, turn off -fschedule-insns by default. It tends to
make the problem with not enough registers even worse. */
#ifdef INSN_SCHEDULING
if (level > 1)
flag_schedule_insns = 0;
#endif
if (TARGET_64BIT && optimize >= 1)
flag_omit_frame_pointer = 1;
if (TARGET_64BIT)
{
flag_pcc_struct_return = 0;
flag_asynchronous_unwind_tables = 1;
}
}
As x86_64 specifie the paramteter passing conventions differently.
Honza
More information about the Gcc-patches
mailing list