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


Richard Henderson <rth@redhat.com> writes:

> On Wed, Oct 15, 2003 at 02:34:50PM -0400, David Edelsohn wrote:
> > 	What is the specific SPARC option to which you are referring?
> 
> -mv8plus
> 
> This is more complicated on Sparc than it would be for PowerPC, because
> only the %gN and %oN registers can be used for 64-bit data.  The %iN and
> %lN registers are not preserved as 64-bit across interrupts.  This is a
> side effect of the register windows and where the backing store for them
> is allocated -- there is no more room without changing the ABI.

It looks a bit goofy to me, because it appears to implement muldi3 by
using shifts and ors to build a 64-bit value, then doing the multiply,
then splitting the result up again.  Look at muldi3_v8plus.  In other
words, it doesn't appear to really hold 64-bit values in registers.
It holds 32-bit values, and then assembles them into 64-bit values
when necessary.

If it didn't work the way, I think sparc.h would need a more
complicated definition of HARD_REGNO_NREGS.

By the way, the -mv8plus option does not appear to be documented.

Ian


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