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/108640] ICE compiling busybox for m68k in change_address_1, at emit-rtl.cc:2283
Date: Fri, 19 Jan 2024 23:05:59 +0000	[thread overview]
Message-ID: <bug-108640-4-pqSchVBctu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108640-4@http.gcc.gnu.org/bugzilla/>

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

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

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

commit r14-8298-ga834414794d80f21550dd0591e260fc833f49eb9
Author: Mikael Pettersson <mikpelinux@gmail.com>
Date:   Fri Jan 19 16:05:34 2024 -0700

    [PATCH] Avoid ICE in single-bit logical RMWs on m68k-uclinux [PR108640]

    When generating RMW logical operations on m68k, the backend
    recognizes single-bit operations and rewrites them as bit
    instructions on operands adjusted to address the intended byte.
    When offsetting the addresses the backend keeps the modes as
    SImode, even though the actual access will be in QImode.

    The uclinux target defines M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P
    which adds a check that the adjusted operand is within the bounds
    of the original object.  Since the address has been offset it is
    not, and the compiler ICEs.

    The bug is that the modes of the adjusted operands should have been
    narrowed to QImode, which is that this patch does.  Nearby code
    which narrows to HImode gets that right.

    Bootstrapped and regression tested on m68k-linux-gnu.

    Ok for master? (Note: I don't have commit rights.)

    gcc/

            PR target/108640
            * config/m68k/m68k.cc (output_andsi3): Use QImode for
            address adjusted for 1-byte RMW access.
            (output_iorsi3): Likewise.
            (output_xorsi3): Likewise.

    gcc/testsuite/

            PR target/108640
            * gcc.target/m68k/pr108640.c: New test.

  parent reply	other threads:[~2024-01-19 23:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 14:51 [Bug c/108640] New: " aarnold.gcc at antonarnold dot de
2023-02-02 19:45 ` [Bug target/108640] " mikpelinux at gmail dot com
2023-02-02 20:59 ` mikpelinux at gmail dot com
2023-03-30 11:20 ` marxin at gcc dot gnu.org
2023-10-15 17:10 ` matthias.reis at posteo dot de
2023-12-30 17:37 ` mikpelinux at gmail dot com
2023-12-30 17:51 ` mikpelinux at gmail dot com
2024-01-18 16:42 ` mikpelinux at gmail dot com
2024-01-19 23:05 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-19 23:25 ` law at gcc dot gnu.org
2024-01-20 17:22 ` pinskia at gcc dot gnu.org
2024-02-18  9:43 ` aarnold.gcc at antonarnold dot de

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-108640-4-pqSchVBctu@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).