public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Michael Meissner <meissner@linux.vnet.ibm.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, powerpc], Fix PR48857, pass/return V2DI as other vector types
Date: Wed, 04 May 2011 03:07:00 -0000	[thread overview]
Message-ID: <BANLkTimzEV1aGd3E9oWvUDvjOw5bYJiajw@mail.gmail.com> (raw)
In-Reply-To: <20110503212702.GA25985@hungry-tiger.westford.ibm.com>

On Tue, May 3, 2011 at 5:27 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> When I added VSX support to the powerpc, I overlooked passing and return
> V2DImode arguments, since the only machine operation that supports V2DI is
> vector floating point conversion.  Consequentally, V2DI types were passed and
> returned in GPRs instead of the vector registers on power7.
>
> This patch fixes that so that V2DImode values are passed and returned like
> other vector types.
>
> I did a bootstrap and make check with no regressions, comparing it to a build
> without the patch.  I also wrote a program that passed and returned every
> single type, and I compared the assembly ouptut.  With the exception of
> functions that return or are passed V2DI arguments, the code is identical.  I
> tested:
>
>        -m64                    (implies -mabi=altivec)
>        -m32 -mabi=altivec
>        -m32 -mabi=no-altivec   (no difference here)
>
> Is this patch ok to install?  I will also want to install it in the 4.6 and
> possibly 4.5 trees as well.
>
> [gcc]
> 2011-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>        PR target/48857
>        * config/rs6000/rs6000.h (VSX_SCALAR_MODE): Delete.
>        (VSX_MODE): Ditto.
>        (VSX_MOVE_MODE): Ditto.
>        (ALTIVEC_OR_VSX_VECTOR_MODE): New macro, combine all Altivec and
>        VSX vector types.  Add V2DImode.
>        (HARD_REGNO_CALLER_SAVE_MODE): Use it instead of
>        ALTIVEC_VECTOR_MODE and VSX_VECTOR_MODE calls.
>        (MODES_TIEABLE_P): Ditto.
>
>        * config/rs6000/rs6000.c (rs6000_emit_move): Use
>        ALTIVEC_OR_VSX_MODE instead of ALTIVEC_VECTOR_MODE and
>        VSX_VECTOR_MODE.
>        (init_cumulative_args): Ditto.
>        (rs6000_function_arg_boundary): Ditto.
>        (rs6000_function_arg_advance_1): Ditto.
>        (rs6000_function_arg): Ditto.
>        (rs6000_function_ok_for_sibcall): Ditto.
>        (emit_frame_save): Ditto.
>        (rs6000_function_value): Ditto.
>        (rs6000_libcall_value): Ditto.
>
> [gcc/testsuite]
> 2011-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>        PR target/48857
>        * gcc.target/powerpc/pr48857.c: New file, make sure V2DI arguments
>        are passed and returned in vector registers.

What does this do to the ABI?  Haven't we now broken the ABI and
broken backwards compatibility?

- David

  reply	other threads:[~2011-05-04  2:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 21:48 Michael Meissner
2011-05-04  3:07 ` David Edelsohn [this message]
2011-05-04  9:42   ` Richard Guenther
2011-05-04 17:32     ` Peter Bergner
2011-05-05 19:34     ` Michael Meissner
2011-05-05 19:29   ` Michael Meissner
2011-05-05 23:34 ` David Edelsohn
2011-05-05 20:56 Uros Bizjak

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=BANLkTimzEV1aGd3E9oWvUDvjOw5bYJiajw@mail.gmail.com \
    --to=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@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).