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


>>>>> Ian Lance Taylor writes:

Ian> For efficient 64-bit code, you want HARD_REGNO_NREGS (r, DImode) to
Ian> return 1.  But you also want to pass a 64-bit value in two registers,
Ian> to maintain ABI compatibility.  That means that you need a way to tell
Ian> the function calling sequence to split a 64-bit value into two 32-bit
Ian> values.

Ian> That of course can be done by having FUNCTION_ARG returning a
Ian> PARALLEL.  So, David (Edelsohn), I think that what you want is to
Ian> define HARD_REGNO_NREGS (r, DImode) to return 1 for a 64-bit register,
Ian> but also have FUNCTION_ARG return an appropriate PARALLEL when passing
Ian> a 64-bit value.  When passing a 32-bit value FUNCTION_ARG can just
Ian> return a REG as usual.

	That's already part of Fariborz patch.

	So it looks like Fariborz needs to try re-implementing the feature
with UNITS_PER_WORD dependent on TARGET_64BIT, not TARGET_POWERPC64, and
then adjust HARD_REGNO_NREGS and HARD_REGNO_MODE_OK appropriately.  Most
of the rs6000-specific changes still will be necessary, but not the parts
trying to correct for word_mode which now will remain the same.  Then he
can see what else needs to be adjusted in the rest of the compiler --
hopefully less than the current patch.

David


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