public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Subject: [PATCH 0/6] [RS6000] inline plt call support
Date: Wed, 07 Nov 2018 05:33:00 -0000	[thread overview]
Message-ID: <20181107053326.GM29482@bubble.grove.modra.org> (raw)

Hi Segher,
This is the patch series you already saw earlier this year, rebased
to recent gcc, and with a comment or two fixed.  The first five
patches tidy and rearrange the function call code in order to support
inline plt calls without a huge increase in rs6000.md.  As is, inline
plt calls are supported for powerpc-linux and powerpc64le-linux
ELFv2.  I don't support them for powerpc64-linux ELFv1 due to the
extra read barriers needed there, but it wouldn't be too difficult to
support if there was demand.

I've regression tested again on powerpc64le-linux.  Earlier testing
went to some lengths with old and new binutils on powerpc-linux,
powerpc64le-linux and powerpc64-linux.  I also tested using -fno-plt
in bootstrap and regression tests, which unsurprisingly showed
numerous fails due to wrong counts of symbols (inline plt references a
function symbol multiple times to make a call), wrong "bl" counts
(none with inline call) or similar.  I didn't see anything
frightening, and I expect that people generally won't regression test
with -fno-plt, so I haven't modified any tests.

One benefit of the inline plt support is that gcc will now use the new
sequences and relocs to support -mlongcall.  This allows lazy dynamic
resolution of the plt entries so it is now possible to dlopen
libraries and have -mlongcall code call functions in those libraries.
That wasn't possible before.  See
https://bugzilla.redhat.com/show_bug.cgi?id=1633721

Alan Modra (6):
  [RS6000] rs6000_output_call for external call insn assembly output
  [RS6000] rs6000_output_indirect_call
  [RS6000] Replace TLSmode with P, and correct tls call mems
  [RS6000] Remove constraints on call rounded_stack_size_rtx arg
  [RS6000] Use standard call patterns for __tls_get_addr calls
  [RS6000] inline plt call sequences

 gcc/config.in                     |    6 +
 gcc/config/rs6000/darwin.md       |    8 +-
 gcc/config/rs6000/predicates.md   |   25 +
 gcc/config/rs6000/rs6000-protos.h |    8 +-
 gcc/config/rs6000/rs6000.c        |  617 ++++++++++++++---
 gcc/config/rs6000/rs6000.h        |    4 +
 gcc/config/rs6000/rs6000.md       | 1023 +++++++++++++----------------
 gcc/configure                     |   36 +
 gcc/configure.ac                  |    6 +
 9 files changed, 1065 insertions(+), 668 deletions(-)

-- 
Alan Modra
Australia Development Lab, IBM

             reply	other threads:[~2018-11-07  5:33 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07  5:33 Alan Modra [this message]
2018-11-07  5:37 ` [PATCH 1/6] [RS6000] rs6000_output_call for external call insn assembly output Alan Modra
2018-11-08  0:09   ` Segher Boessenkool
2018-11-08 13:21     ` Alan Modra
2018-11-07  5:38 ` [PATCH 3/6] [RS6000] Replace TLSmode with P, and correct tls call mems Alan Modra
2018-11-08  1:11   ` Segher Boessenkool
2018-11-08 13:27     ` Alan Modra
2018-11-08 18:09       ` Segher Boessenkool
2018-11-07  5:38 ` [PATCH 2/6] [RS6000] rs6000_output_indirect_call Alan Modra
2018-11-12 19:44   ` Bill Schmidt
2018-11-13  0:14     ` Alan Modra
2018-11-13 11:14       ` Segher Boessenkool
2018-11-13 12:48         ` [PATCH 1/6] [RS6000] rs6000_call_template for external call insn assembly output Alan Modra
2018-11-20 15:59           ` Segher Boessenkool
2018-11-13 12:49         ` [PATCH 2/6] [RS6000] rs6000_indirect_call_template Alan Modra
2018-11-20 16:23           ` Segher Boessenkool
2018-11-13 12:50         ` [PATCH 3/6] [RS6000] Replace TLSmode with P, and correct tls call mems Alan Modra
2018-11-20 17:10           ` Segher Boessenkool
2018-11-13 12:51         ` [PATCH 4/6] [RS6000] Remove constraints on call rounded_stack_size_rtx arg Alan Modra
2018-11-27 15:27           ` Segher Boessenkool
2018-11-13 12:52         ` [PATCH 5/6] [RS6000] Use standard call patterns for __tls_get_addr calls Alan Modra
2018-11-27 16:29           ` Segher Boessenkool
2018-11-28  1:07             ` Alan Modra
2018-11-28 13:33               ` Segher Boessenkool
2018-11-28 23:08                 ` Alan Modra
2018-11-29  6:11                 ` Alan Modra
2018-11-13 12:53         ` [PATCH 6/6] [RS6000] inline plt call sequences Alan Modra
2018-11-27 17:18           ` Segher Boessenkool
2018-11-28  1:34             ` Alan Modra
2018-11-28 13:39               ` Segher Boessenkool
2018-11-07  5:39 ` [PATCH 5/6] [RS6000] Use standard call patterns for __tls_get_addr calls Alan Modra
2018-11-07  5:39 ` [PATCH 4/6] [RS6000] Remove constraints on call rounded_stack_size_rtx arg Alan Modra
2018-11-08  1:19   ` Segher Boessenkool
2018-11-07  5:40 ` [PATCH 6/6] [RS6000] inline plt call sequences Alan Modra

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=20181107053326.GM29482@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.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).