Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] Use -mabi=altivec for AltiVec tests
Date: Mon, 29 Oct 2007 18:32:00 -0000	[thread overview]
Message-ID: <200710291827.l9TIR1Vn004500@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20071029180441.GA7736@caradoc.them.org> from "Daniel Jacobowitz" at Oct 29, 2007 02:04:41 PM

Daniel Jacobowitz wrote:

> I think I will check in my patch, but reduce the number of test
> cases a bit.  I'd like to test only two: -mabi=altivec + "set powerpc
> vector-abi altivec", and -mabi=altivec + "set powerpc vector-abi
> auto".  The former should always pass.  The latter will pass if GCC
> and LD are new enough.  Sound OK?
> 
> I don't want to test the non-AltiVec-ABI bits because they do not seem
> to be sensibly defined.  I filed PR 33899 last week, which shows
> the -mabi=no-altivec ABI changing based on -maltivec.  We can't and
> shouldn't detect that.

I'm not sure the situation is actually that bad; see the other mail
I just sent ...

I think we *should* have -mabi=no-altivec test, and treat vector
returns always as the -maltivec -mabi=no-altivec case in that
situation.

> Right.  I thought about this for a couple of days, and we should be
> able to save and restore them.  There's no reason it has to be
> predicated on -mabi=altivec.

Yes.  If you look at the comment in front of rs6000_stack_info,
saving Altivec registers for eabi targets should actually be
supported.  Not sure if that is actually implemented correctly
in the code ...  (For Linux there shouldn't be a problem anyway.)

> Of course, any existing -maltivec -mabi=no-altivec code will still
> have to be rebuilt.  It's terminally broken.

Maybe not completely; there are two failure modes: one, the caller
currently incorrectly assumes its callees save/restore vr0..vr19  --
this leads to a bug that is immediately detected, so there probably
isn't a lot of broken code out there;  and two, the callee currently
incorrectly does not even save vr20..vr31.  This second case could
cause silently broken code out there, but it is probably rare, as
GCC will start allocating registers from vr0 up, so you'd have to
have -maltivec -mabi=no-altivec code that uses more than 20 Altivec
registers in a single function ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2007-10-29 18:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-21 13:05 Ulrich Weigand
2007-10-21 18:08 ` Daniel Jacobowitz
2007-10-21 19:37   ` Ulrich Weigand
2007-10-24 20:47     ` Daniel Jacobowitz
2007-10-29 18:04       ` Ulrich Weigand
2007-10-29 18:06         ` Daniel Jacobowitz
2007-10-29 18:32           ` Ulrich Weigand [this message]
2007-10-25 20:32     ` [rfc] PowerPC ABI detection and overrides Daniel Jacobowitz
2007-10-29 18:27       ` Ulrich Weigand
2007-10-29 18:38         ` Daniel Jacobowitz
2007-10-29 19:02           ` Ulrich Weigand
2007-10-29 19:16             ` Daniel Jacobowitz
2007-10-29 19:27               ` Ulrich Weigand
2007-10-30 20:12       ` Daniel Jacobowitz
2007-10-30 21:12         ` Ulrich Weigand

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=200710291827.l9TIR1Vn004500@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /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