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] S/390: DFP support 1/4: Add z9-ec option


On Wed, 2007-03-21 at 15:40 +0100, Andreas Krebbel wrote:
> > For PowerPC* we're using -mdfp and -mno-dfp to enable hardware DFP
> > instructions (not yet implemented).  Hard and soft float are orthogonal
> > to hard and soft DFP on PowerPC; software emulation of DFP can use
> > either one, which affects how arguments are passed.
> 
> The options on S/390 work a bit different.  For our back end -mhard-float/-msoft-float
> is an ABI switch.  With -msoft-float we pass floating point numbers in gprs independent 
> on whether we are dealing with bfp, dfp or hfp values.  The -msoft-float switch is
> important for our kernel guys who don't want to store/restore any fp register - at least 
> if no user-space process is involved.
> The -mhard-dfp/-msoft-dfp switches instead are NOT ABI relevant.  They only enable or
> disable the hardware instructions.  When -msoft-dfp is used no dfp hw instructions are
> available but dfp values are still passed to functions using fp registers.  This seems to
> be different compared to your -mdfp/-mno-dfp pair.  Our switches are not orthogonal.
> So it is not possible to use -mhard-dfp together with -msoft-float since the dfp hw
> instructions expect the operands in fp registers which aren't available with -msoft-float.

I think there was a little misunderstanding here.  What you describe is 
exactly how things work for PowerPC as well.  I think what Janis was
trying to say, is that we should probably come up with a common set
of options between us.

So -mdfp or -mhard-dfp (whichever we choose) means we generate hw
DFP instructions and -mno-dfp or -msoft-dfp (again, whichever one
we choose) means no hw DFP instructions.

I'm torn between the options.  I slightly prefer our -mdfp over your
-mhard-dfp, but your -msoft-dfp seems to make more sense than -mno-dfp,
which might cause people to assume we're disabling DFP all together.

Peter




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