public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Michael Meissner <meissner@linux.vnet.ibm.com>,
	gcc-patches@gcc.gnu.org,
	       David Edelsohn <dje.gcc@gmail.com>,
	       Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [PATCH #2], Fix _Complex when there are multiple FP types the same size
Date: Sat, 30 Apr 2016 16:00:00 -0000	[thread overview]
Message-ID: <20160430160045.GA15163@gate.crashing.org> (raw)
In-Reply-To: <20160429205127.GA19596@ibm-tiger.the-meissners.org>

On Fri, Apr 29, 2016 at 04:51:27PM -0400, Michael Meissner wrote:
> 2016-04-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	* config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add
> 	support for __float128 complex datatypes.
> 	(rs6000_hard_regno_mode_ok): Likewise.
> 	(rs6000_setup_reg_addr_masks): Likewise.
> 	(rs6000_complex_function_value): Likewise.
> 	* config/rs6000/rs6000.h (FLOAT128_IEEE_P): Likewise.
> 	__float128 and __ibm128 complex.
> 	(FLOAT128_IBM_P): Likewise.
> 	(ALTIVEC_ARG_MAX_RETURN): Likewise.
> 	* doc/extend.texi (Additional Floating Types): Document that
> 	-mfloat128 must be used to enable __float128.  Document complex
> 	__float128 and __ibm128 support.
> 
> [gcc/testsuite]
> 2016-04-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	* gcc.target/powerpc/float128-complex-1.c: New tests for complex
> 	__float128.
> 	* gcc.target/powerpc/float128-complex-2.c: Likewise.

The powerpc parts are okay for trunk.  Thank you!

A few trivialities you can maybe fix when you commit this:

> @@ -2700,7 +2703,16 @@ rs6000_setup_reg_addr_masks (void)
>    for (m = 0; m < NUM_MACHINE_MODES; ++m)
>      {
>        machine_mode m2 = (machine_mode)m;

There should be a space after the cast.  Pre-existing, I know.

> @@ -19190,6 +19223,25 @@ rs6000_preferred_reload_class (rtx x, en
>        return NO_REGS;
>      }
>  
> +  /* If we haven't picked a register class, and the type is a vector or
> +     floating point type, prefer to use the VSX, FPR, or Altivec register
> +     classes.  */
> +  if (rclass == NO_REGS)
> +    {
> +      if (TARGET_VSX && VECTOR_MEM_VSX_OR_P8_VECTOR_P (mode))
> +	return VSX_REGS;
> +
> +      if (TARGET_ALTIVEC && VECTOR_MEM_ALTIVEC_P (mode))
> +	return ALTIVEC_REGS;
> +
> +      if (DECIMAL_FLOAT_MODE_P (mode))
> +	return (TARGET_DFP) ? FLOAT_REGS : NO_REGS;

Superfluous parens.

> @@ -33964,8 +34016,14 @@ rs6000_complex_function_value (machine_m
>    machine_mode inner = GET_MODE_INNER (mode);
>    unsigned int inner_bytes = GET_MODE_UNIT_SIZE (mode);
>  
> -  if (FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS)
> +  if (TARGET_FLOAT128
> +      && ((mode == KCmode)

Parens again.


Segher

  reply	other threads:[~2016-04-30 16:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 21:06 [PATCH], " Michael Meissner
2016-04-28 22:10 ` Segher Boessenkool
2016-04-28 23:41   ` Michael Meissner
2016-04-29 20:51     ` [PATCH #2], " Michael Meissner
2016-04-30 16:00       ` Segher Boessenkool [this message]
2016-05-02 10:54         ` Bernd Schmidt
2016-05-02 21:10           ` [PATCH #3], " Michael Meissner
2016-05-02 21:24             ` FX
2016-05-02 21:47               ` Michael Meissner
2016-05-02 22:30                 ` Michael Meissner
2016-05-02 23:06             ` Bernd Schmidt
2016-05-05 13:36             ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160430160045.GA15163@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@linux.vnet.ibm.com \
    --cc=wschmidt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).