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]

Re: [PATCH] - Use of powerpc 64bit instructions in 32bit ABI



On Tuesday, October 14, 2003, at 04:13 PM, Richard Henderson wrote:


On Tue, Oct 14, 2003 at 03:50:12PM -0700, Fariborz Jahanian wrote:
However, when it comes to the abi-specific areas such as, passing
arguments, returning function values, etc. Only 32bit half of the
register is used.

Sure. Can you explain why just having the target-specific parts return SImode for various values is insufficient?



r~

Best to quote from the patch:


load_register_parameters needs to count number of registers used to pass a structure by value.
This is computed by (size + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD which has the assumption that
size of register in use is same as natural word size. In the mixed mode this does not hold. Is there a better way
to do this computation?


*************** load_register_parameters (struct arg_dat
*** 1602,1608 ****
else if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode)
{
size = int_size_in_bytes (TREE_TYPE (args[i].tree_value));
! nregs = (size + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD;
}
else
size = GET_MODE_SIZE (args[i].mode);
--- 1606,1612 ----
else if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode)
{
size = int_size_in_bytes (TREE_TYPE (args[i].tree_value));
! nregs = (size + (UNITS_PER_REGISTER_ARGUMENT - 1)) / UNITS_PER_REGISTER_ARGUMENT;
}
else
size = GET_MODE_SIZE (args[i].mode);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]