This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], Add PowerPC ISA 3.0 IEEE 128-bit floating point round to odd built-in functions
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Tue, 3 Oct 2017 17:21:00 -0500
- Subject: Re: [PATCH], Add PowerPC ISA 3.0 IEEE 128-bit floating point round to odd built-in functions
- Authentication-results: sourceware.org; auth=none
- References: <20170928223423.GA3629@ibm-tiger.the-meissners.org> <20170929171005.GS8421@gate.crashing.org> <20171002180157.GB22403@ibm-tiger.the-meissners.org> <20171002191200.GE8421@gate.crashing.org> <20171003201523.GA20248@ibm-tiger.the-meissners.org>
On Tue, Oct 03, 2017 at 04:15:23PM -0400, Michael Meissner wrote:
> Here is the patch to add the round to odd instructions using separate UNSPEC
> names instead of putting the operation into the unspec.
>
> I have done a bootstrap and check on a little endian power8 system and there
> were no regressions. Can I check this into the trunk?
This looks fine. Okay for trunk. Thanks!
Segher
> 2017-10-03 Michael Meissner <meissner@linux.vnet.ibm.com>
>
> * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
> helper macro for IEEE float128 hardware built-in functions.
> (SQRTF128_ODD): Add built-in functions with the round-to-odd
> semantics.
> (TRUNCF128_ODD): Likewise.
> (ADDF128_ODD): Likewise.
> (SUBF128_ODD): Likewise.
> (MULF128_ODD): Likewise.
> (DIVF128_ODD): Likewise.
> (FMAF128_ODD): Likewise.
> * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
> UNSPEC_TRUNC_ROUND_TO_ODD.
> (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
> (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
> floating point round to odd instructions.
> (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
> (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
> (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
> (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
> (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
> (trunc<mode>sf2_hw): Change the truncate with round to odd
> expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
> (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
> to odd hardware instructions.
> (sub<mode>3_odd): Likewise.
> (mul<mode>3_odd): Likewise.
> (div<mode>3_odd): Likewise.
> (sqrt<mode>2_odd): Likewise.
> (fma<mode>4_odd): Likewise.
> (fms<mode>4_odd): Likewise.
> (nfma<mode>4_odd): Likewise.
> (nfms<mode>4_odd): Likewise.
> (trunc<mode>df2_odd): Change the truncate with round to odd
> expansion to use UNSPEC_TRUNC_ROUND_TO_ODD. Add a generator
> function.
> * doc/extend.texi (PowerPC built-in functions): Update documentation
> for existing IEEE float128-bit built-in functions. Add built-in
> functions that generate the IEEE 128-bit floating point round to
> odd instructions.