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/100704] Vector register isn't used to push BLKmode argument onto stack
Date: Thu, 17 Jun 2021 13:34:29 +0000	[thread overview]
Message-ID: <bug-100704-4-x1dxrezYru@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100704-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:967b46530234b4e6ad3983057705aea6c20a03c4

commit r12-1564-g967b46530234b4e6ad3983057705aea6c20a03c4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri May 21 11:56:55 2021 -0700

    Add a target calls hook: TARGET_PUSH_ARGUMENT

    1. Replace PUSH_ARGS with a target calls hook, TARGET_PUSH_ARGUMENT, which
    takes an integer argument.  When it returns true, push instructions will
    be used to pass outgoing arguments.  If the argument is nonzero, it is
    the number of bytes to push and indicates the PUSH instruction usage is
    optional so that the backend can decide if PUSH instructions should be
    generated.  Otherwise, the argument is zero.
    2. Implement x86 target hook which returns false when the number of bytes
    to push is no less than 16 (8 for 32-bit targets) if vector load and store
    can be used.
    3. Remove target PUSH_ARGS definitions which return 0 as it is the same
    as the default.
    4. Define TARGET_PUSH_ARGUMENT of cr16 and m32c to always return true.

    gcc/

            PR target/100704
            * calls.c (expand_call): Replace PUSH_ARGS with
            targetm.calls.push_argument (0).
            (emit_library_call_value_1): Likewise.
            * defaults.h (PUSH_ARGS): Removed.
            (PUSH_ARGS_REVERSED): Replace PUSH_ARGS with
            targetm.calls.push_argument (0).
            * expr.c (block_move_libcall_safe_for_call_parm): Likewise.
            (emit_push_insn): Pass the number bytes to push to
            targetm.calls.push_argument and pass 0 if ARGS_ADDR is 0.
            * hooks.c (hook_bool_uint_true): New.
            * hooks.h (hook_bool_uint_true): Likewise.
            * rtlanal.c (nonzero_bits1): Replace PUSH_ARGS with
            targetm.calls.push_argument (0).
            * target.def (push_argument): Add a targetm.calls hook.
            * targhooks.c (default_push_argument): New.
            * targhooks.h (default_push_argument): Likewise.
            * config/bpf/bpf.h (PUSH_ARGS): Removed.
            * config/cr16/cr16.c (TARGET_PUSH_ARGUMENT): New.
            * config/cr16/cr16.h (PUSH_ARGS): Removed.
            * config/i386/i386.c (ix86_push_argument): New.
            (TARGET_PUSH_ARGUMENT): Likewise.
            * config/i386/i386.h (PUSH_ARGS): Removed.
            * config/m32c/m32c.c (TARGET_PUSH_ARGUMENT): New.
            * config/m32c/m32c.h (PUSH_ARGS): Removed.
            * config/nios2/nios2.h (PUSH_ARGS): Likewise.
            * config/pru/pru.h (PUSH_ARGS): Likewise.
            * doc/tm.texi.in: Remove PUSH_ARGS documentation.  Add
            TARGET_PUSH_ARGUMENT hook.
            * doc/tm.texi: Regenerated.

    gcc/testsuite/

            PR target/100704
            * gcc.target/i386/pr100704-1.c: New test.
            * gcc.target/i386/pr100704-2.c: Likewise.
            * gcc.target/i386/pr100704-3.c: Likewise.

  parent reply	other threads:[~2021-06-17 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 13:58 [Bug target/100704] New: " hjl.tools at gmail dot com
2021-05-20 14:11 ` [Bug target/100704] " rguenth at gcc dot gnu.org
2021-05-20 15:33 ` hjl.tools at gmail dot com
2021-05-23 12:48 ` hjl.tools at gmail dot com
2021-06-17 13:34 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-17 16:01 ` hjl.tools at gmail dot com

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-100704-4-x1dxrezYru@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).