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 target/110320] ELFv2 pc-rel ABI extension allows using r2 as a volatile register
Date: Mon, 25 Dec 2023 10:13:29 +0000	[thread overview]
Message-ID: <bug-110320-4-NfJyMZcdE2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110320-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by jeevitha <jeevitha@gcc.gnu.org>:

https://gcc.gnu.org/g:1bbb169fe6f91451a2754f0b86301551db76ceba

commit r14-6829-g1bbb169fe6f91451a2754f0b86301551db76ceba
Author: Jeevitha <jeevitha@linux.ibm.com>
Date:   Mon Dec 25 04:06:54 2023 -0600

    rs6000: Change GPR2 to volatile & non-fixed register for function that does
not use TOC [PR110320]

    Normally, GPR2 is the TOC pointer and is defined as a fixed and
non-volatile
    register. However, it can be used as volatile for PCREL addressing.
Therefore,
    modified r2 to be non-fixed in FIXED_REGISTERS and set it to fixed if it is
not
    PCREL and also when the user explicitly requests TOC or fixed. If the
register
    r2 is fixed, it is made as non-volatile. Changes in register preservation
roles
    can be accomplished with the help of available target hooks
    (TARGET_CONDITIONAL_REGISTER_USAGE).

    2023-12-24  Jeevitha Palanisamy  <jeevitha@linux.ibm.com>

    gcc/
            PR target/110320
            * config/rs6000/rs6000.cc (rs6000_conditional_register_usage):
Change
            GPR2 to volatile and non-fixed register for PCREL.
            * config/rs6000/rs6000.h (FIXED_REGISTERS): Modify GPR2 to not
fixed.

    gcc/testsuite/
            PR target/110320
            * gcc.target/powerpc/pr110320-1.c: New testcase.
            * gcc.target/powerpc/pr110320-2.c: New testcase.
            * gcc.target/powerpc/pr110320-3.c: New testcase.

    Co-authored-by: Peter Bergner <bergner@linux.ibm.com>

  parent reply	other threads:[~2023-12-25 10:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 13:40 [Bug target/110320] New: " bergner at gcc dot gnu.org
2023-06-20 13:42 ` [Bug target/110320] " bergner at gcc dot gnu.org
2023-12-25 10:13 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-27 15:28 ` jeevitha 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-110320-4-NfJyMZcdE2@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).