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/105981] [10/11/12 regression] Wrong code from gen_cpymem_ldrd_strd() with -mbig-endian
Date: Thu, 16 Jun 2022 12:47:20 +0000	[thread overview]
Message-ID: <bug-105981-4-ImJ6PsCdzk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105981-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Earnshaw
<rearnsha@gcc.gnu.org>:

https://gcc.gnu.org/g:20ece449e06f2d0dd0c50db0203d13b4e4ff2d96

commit r10-10850-g20ece449e06f2d0dd0c50db0203d13b4e4ff2d96
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Wed Jun 15 16:07:20 2022 +0100

    arm: big-endian issue in gen_cpymem_ldrd_strd [PR105981]

    The code in gen_cpymem_ldrd_strd has been incorrect for big-endian
    since r230663.  The problem is that we use gen_lowpart, etc. to split
    the 64-bit quantity, but fail to account for the fact that these
    routines are really dealing with 64-bit /values/ and in big-endian the
    ordering of the sub-registers changes.

    To fix this, I've renamed the conceptually misnamed low_reg and hi_reg
    as first_reg and second_reg, and then used different logic for
    big-endian targets to initialize these values.  This makes the logic
    clearer than trying to think about high bits and low bits.

    gcc/ChangeLog:

            PR target/105981
            * config/arm/arm.c (gen_cpymem_ldrd_strd): Rename low_reg and
hi_reg
            to first_reg and second_reg respectively.  Initialize them
correctly
            when generating big-endian code.

    (cherry picked from commit 8aaa948059a8b5f0a62ad010d0aa6346b7ac9cd3)

  parent reply	other threads:[~2022-06-16 12:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 19:21 [Bug c/105981] New: Wrong code generated when compiling for arm cortex-a72 in AARCH32 " gjimenez at teldat dot com
2022-06-15 13:27 ` [Bug target/105981] " rearnsha at gcc dot gnu.org
2022-06-15 13:40 ` [Bug target/105981] [10/11/12/13 regression] Wrong code from gen_cpymem_ldrd_strd() " rearnsha at gcc dot gnu.org
2022-06-15 15:09 ` cvs-commit at gcc dot gnu.org
2022-06-15 15:10 ` [Bug target/105981] [10/11/12 " rearnsha at gcc dot gnu.org
2022-06-16 12:46 ` cvs-commit at gcc dot gnu.org
2022-06-16 12:46 ` cvs-commit at gcc dot gnu.org
2022-06-16 12:47 ` cvs-commit at gcc dot gnu.org [this message]
2022-06-16 12:51 ` rearnsha 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-105981-4-ImJ6PsCdzk@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).