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 other/113927] [avr-tiny] Sets up a stack-frame even for trivial code
Date: Thu, 15 Feb 2024 13:09:35 +0000	[thread overview]
Message-ID: <bug-113927-4-H4R2kzFUro@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113927-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Georg-Johann Lay <gjl@gcc.gnu.org>:

https://gcc.gnu.org/g:5cff288c2dae4ea709df067cf398f23e214b2e80

commit r14-9009-g5cff288c2dae4ea709df067cf398f23e214b2e80
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Thu Feb 15 13:53:34 2024 +0100

    AVR: target 113927 - Simple code triggers stack frame for Reduced Tiny.

    The -mmcu=avrtiny cores have no ADIW and SBIW instructions.  This was
    implemented by clearing all regs out of regclass ADDW_REGS so that
    constraint "w" never matched.  This corrupted the subset relations of
    the register classes as they appear in enum reg_class.

    This patch keeps ADDW_REGS like for all other cores, i.e. it contains
    R24...R31.  Instead of tests like  test_hard_reg_class (ADDW_REGS, *)
    the code now uses  avr_adiw_reg_p (*).  And all insns with constraint "w"
    get "isa" insn attribute value of "adiw".

    Plus, a new built-in macro __AVR_HAVE_ADIW__ is provided, which is more
    specific than __AVR_TINY__.

    gcc/
            PR target/113927
            * config/avr/avr.h (AVR_HAVE_ADIW): New macro.
            * config/avr/avr-protos.h (avr_adiw_reg_p): New proto.
            * config/avr/avr.cc (avr_adiw_reg_p): New function.
            (avr_conditional_register_usage) [AVR_TINY]: Don't clear ADDW_REGS.
            Replace test_hard_reg_class (ADDW_REGS, ...) with calls to
            * config/avr/avr.md: Same.
            (attr "isa") <tiny, no_tiny>: Remove.
            <adiw, no_adiw>: Add.
            (define_insn, define_insn_and_split): When an alternative has
            constraint "w", then set attribute "isa" to "adiw".
            * config/avr/avr-c.cc (avr_cpu_cpp_builtins) [AVR_HAVE_ADIW]:
            Built-in define __AVR_HAVE_ADIW__.
            * doc/invoke.texi (AVR Options): Document it.

  parent reply	other threads:[~2024-02-15 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15  9:43 [Bug other/113927] New: " gjl at gcc dot gnu.org
2024-02-15 12:47 ` [Bug other/113927] " pinskia at gcc dot gnu.org
2024-02-15 13:09 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-15 13:49 ` cvs-commit at gcc dot gnu.org
2024-02-15 13:50 ` [Bug target/113927] " gjl 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-113927-4-H4R2kzFUro@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).