public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
Date: Mon, 25 Oct 2021 15:59:20 +0000	[thread overview]
Message-ID: <bug-102923-4-QV5EnZqft4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102923-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #4)
> > At least in linux64_closure.S, perhaps guarding it with #ifdef __VEC__ might
> > be ok, because the C code will not use that code if __VEC__ isn't defined:
> > #elif !defined(__VEC__)
> >   /* If compiled without vector register support (used by assembly)... */
> >   if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
> >     return FFI_BAD_ABI;
> > But not sure about linux64.S if it doesn't suffer from the same problem.
> 
> Note that __VEC__ does not mean the current CPU can execute those insns,
> of course, so these #ifdefs are only good if you compile this file twice,
> or similar?

Sure.  I think the expectation is that one gets the ieee128 long double support
in libffi only if libffi is built with -mcpu=power8 (or -mcpu=power7 or -mvsx).
And the assumption is that the *.S files are compiled with the same
-mcpu=/-mvsx flags as the C files.
So the only question is if all the lvx/stvx instructions are in code path that
will not be reached when __VEC__ support isn't seen on the C side.
The whole inital patch is:
https://github.com/libffi/libffi/commit/73dd43afc8a447ba98ea02e9aad4c6898dc77fb0

  parent reply	other threads:[~2021-10-25 15:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  8:45 [Bug bootstrap/102923] New: " iains at gcc dot gnu.org
2021-10-25  8:52 ` [Bug bootstrap/102923] " rguenth at gcc dot gnu.org
2021-10-25  9:08 ` jakub at gcc dot gnu.org
2021-10-25  9:11 ` iains at gcc dot gnu.org
2021-10-25 13:07 ` [Bug libffi/102923] " hjl.tools at gmail dot com
2021-10-25 15:50 ` segher at gcc dot gnu.org
2021-10-25 15:59 ` jakub at gcc dot gnu.org [this message]
2021-10-25 17:07 ` hjl.tools at gmail dot com
2021-10-25 17:11 ` hjl.tools at gmail dot com
2021-10-25 21:28 ` segher at gcc dot gnu.org
2021-12-29 15:36 ` jakub at gcc dot gnu.org
2021-12-29 19:46 ` segher at gcc dot gnu.org

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=bug-102923-4-QV5EnZqft4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).