From: Jakub Jelinek <jakub@redhat.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] expr.cc: avoid unexpected side effects in expand_expr_divmod optimization
Date: Thu, 8 Dec 2022 14:19:01 +0100 [thread overview]
Message-ID: <Y5HkRZpDi23cZ2MS@tucnak> (raw)
In-Reply-To: <87y1rixd3n.fsf@oracle.com>
On Thu, Dec 08, 2022 at 02:02:36PM +0100, Jose E. Marchesi wrote:
> So, I guess the right fix would be to call assemble_external_libcall
> during final? The `.global FOO' directive would be generated
> immediately before the call sequence, but I guess that would be ok.
During final only if all the targets can deal with the effects of
assemble_external_libcall being done in the middle of emitting assembly
for the function.
Otherwise, it could be e.g. done in the first loop of shorten_branches.
Note, in calls.cc it is done only for emit_library_call_value_1
and not for emit_call_1, so if we do it late, we need to be able to find
out what call is to a libcall and what is to a normal call. If there is
no way to differentiate it right now, perhaps we need some flag somewhere,
say on a SYMBOL_REF. And then assemble_external_libcall either only
if such a SYMBOL_REF appears in CALL_INSN or sibcall JUMP_INSN, or
perhaps anywhere in the function and its constant pool.
Jakub
next prev parent reply other threads:[~2022-12-08 13:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 10:59 Jose E. Marchesi
2022-12-08 12:20 ` Jakub Jelinek
2022-12-08 13:02 ` Jose E. Marchesi
2022-12-08 13:19 ` Jakub Jelinek [this message]
2022-12-08 22:40 ` Jose E. Marchesi
2023-01-04 8:58 ` Jose E. Marchesi
2023-01-09 8:05 ` Richard Biener
2023-01-09 9:57 ` Jakub Jelinek
2023-01-09 13:04 ` Richard Biener
2023-01-09 13:25 ` Jakub Jelinek
2023-01-09 14:01 ` Jeff Law
2022-12-08 13:42 ` Richard Biener
2022-12-08 16:03 ` Jose E. Marchesi
2023-01-30 18:45 ` Andrew Pinski
2023-01-30 18:55 ` Jose E. Marchesi
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=Y5HkRZpDi23cZ2MS@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jose.marchesi@oracle.com \
/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).