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
<rearn...@gcc.gnu.org>:

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

commit r10-10850-g20ece449e06f2d0dd0c50db0203d13b4e4ff2d96
Author: Richard Earnshaw <rearn...@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)

Reply via email to