public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgcc/98952] powerpc*: __trampoline_setup inverted test for trampoline size
Date: Tue, 27 Apr 2021 02:45:26 +0000	[thread overview]
Message-ID: <bug-98952-4-XzkSARcUDt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98952-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Michael Meissner
<meissner@gcc.gnu.org>:

https://gcc.gnu.org/g:a633f7f96daac391fe0bc5d87427c0e7cf1ab1b3

commit r10-9772-ga633f7f96daac391fe0bc5d87427c0e7cf1ab1b3
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Mon Apr 26 22:45:02 2021 -0400

    [PATCH] Backport fix for PR target/98952

    The test in the PowerPC 32-bit trampoline support is backwards.  It aborts
    if the trampoline size is greater than the expected size.  It should abort
    when the trampoline size is less than the expected size.  I fixed the test
    so the operands are reversed.  I then folded the load immediate into the
    compare instruction.

    I verified this by creating a 32-bit trampoline program and manually
    changing the size of the trampoline to be 48 instead of 40.  The program
    aborted with the larger size.  I updated this code and ran the test again
    and it passed.

    I added a test case that runs on PowerPC 32-bit Linux systems and it calls
    the __trampoline_setup function with a larger buffer size than the
    compiler uses.  The test is not run on 64-bit systems, since the function
    __trampoline_setup is not called.  I also limited the test to just Linux
    systems, in case trampolines are handled differently in other systems.

    libgcc/
    2021-04-26  Michael Meissner  <meissner@linux.ibm.com>

            PR target/98952
            * config/rs6000/tramp.S (__trampoline_setup, elfv1 #ifdef): Fix
            trampoline size comparison in 32-bit by reversing test and
            combining load immediate with compare.  Fix backported from trunk
            change on 4/23, 886b6c1e8af502b69e3f318b9830b73b88215878.
            (__trampoline_setup, elfv2 #ifdef): Fix trampoline size comparison
            in 32-bit by reversing test and combining load immediate with
            compare.

    gcc/testsuite/
    2021-04-26  Michael Meissner  <meissner@linux.ibm.com>

            PR target/98952
            * gcc.target/powerpc/pr98952.c: New test.  Test backported from
            trunk change on 4/23, 886b6c1e8af502b69e3f318b9830b73b88215878.

  parent reply	other threads:[~2021-04-27  2:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 14:07 [Bug libgcc/98952] New: " tuliom at ascii dot art.br
2021-02-03 21:04 ` [Bug libgcc/98952] " bergner at gcc dot gnu.org
2021-02-03 21:47 ` segher at gcc dot gnu.org
2021-04-09 19:47 ` meissner at gcc dot gnu.org
2021-04-23 22:17 ` cvs-commit at gcc dot gnu.org
2021-04-23 23:48 ` segher at gcc dot gnu.org
2021-04-26 22:43 ` cvs-commit at gcc dot gnu.org
2021-04-26 23:59 ` cvs-commit at gcc dot gnu.org
2021-04-27  2:45 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-27 14:53 ` cvs-commit at gcc dot gnu.org
2021-04-27 15:45 ` meissner at gcc dot gnu.org
2021-09-11 14:29 ` pinskia 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-98952-4-XzkSARcUDt@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).