This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] S/390: DFP support 1/4: Add z9-ec option
- From: Andreas Krebbel <Andreas dot Krebbel at de dot ibm dot com>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Mar 2007 15:40:31 +0100
- Subject: Re: [PATCH] S/390: DFP support 1/4: Add z9-ec option
- References: <20070316185929.GA6326@(none)> <20070321002708.GA7483@us.ibm.com>
> 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.