This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Looking at this a little closer, I'm not sure why this is related to alignment in first place. Whether a structure is returned in a register should be controlled by -fpcc-struct-return/-freg-struct-return and the DEFAULT_PCC_STRUCT_RETURN value in the config. In function.c:aggregate_value_p there is shortly after the return_in_memory hook the following test:
if (flag_pcc_struct_return && AGGREGATE_TYPE_P (type)) return 1;
IMO the alignment should have no influence here, so where is this coming from?
Looking at the default value of DEFAULT_PCC_STRUCT_RETURN:
$ grep DEFAULT_PCC_STRUCT_RETURN gcc/*.c gcc/config/m68k/*.h gcc/toplev.c:#ifndef DEFAULT_PCC_STRUCT_RETURN gcc/toplev.c:#define DEFAULT_PCC_STRUCT_RETURN 1 gcc/toplev.c:int flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN; gcc/config/m68k/linux.h:#define DEFAULT_PCC_STRUCT_RETURN 0 gcc/config/m68k/m68kemb.h:#define DEFAULT_PCC_STRUCT_RETURN 0 gcc/config/m68k/netbsd-elf.h:#undef DEFAULT_PCC_STRUCT_RETURN gcc/config/m68k/netbsd-elf.h:#define DEFAULT_PCC_STRUCT_RETURN 1 gcc/config/m68k/openbsd.h:#define DEFAULT_PCC_STRUCT_RETURN 0
m68k-elf includes m68kemb.h, which sets this to 0, so why isn't this honored?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |