public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105980] [11/12/13 Regression] ICE in final_scan_insn_1, at final.cc:2811 Date: Fri, 29 Jul 2022 13:46:09 +0000 [thread overview] Message-ID: <bug-105980-4-WENQVU6Huh@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105980-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105980 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- If we follow what other backends do in *_output_mi_thunk, it would be --- gcc/config/i386/i386.cc.jj 2022-07-26 10:32:23.373275765 +0200 +++ gcc/config/i386/i386.cc 2022-07-29 15:25:26.023555541 +0200 @@ -21396,6 +21396,7 @@ x86_output_mi_thunk (FILE *file, tree th tmp_regno = CX_REG; } + reload_completed = 1; emit_note (NOTE_INSN_PROLOGUE_END); /* CET is enabled, insert EB instruction. */ @@ -21561,6 +21562,9 @@ x86_output_mi_thunk (FILE *file, tree th final (insn, file, 1); final_end_function (); assemble_end_function (thunk_fndecl, fnname); + + /* Stop pretending to be a post-reload pass. */ + reload_completed = 0; } static void Unfortunately, that doesn't help much, the next problem is that it needs pic_offset_table_rtx as a hard register, so we probably before tmp = gen_rtx_REG (word_mode, tmp_regno); if (GET_MODE (fnaddr) != word_mode) fnaddr = gen_rtx_ZERO_EXTEND (word_mode, fnaddr); emit_move_insn (tmp, fnaddr); fnaddr = tmp; in the above mentioned snippet need to do something like: if (flag_pic && !TARGET_64BIT && !TARGET_MACHO && SYMBOLIC_CONST (fnaddr)) { pic_offset_table_rtx = gen_reg_RTX (Pmode, some_suitable_reg); ix86_init_pic_reg (); } or something similar. But unsure about the exact conditions, insert_insn_on_edge will likely not work either etc. So it likely needs emit_insn (gen_set_got (reg)) etc. directly. }
next prev parent reply other threads:[~2022-07-29 13:46 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-14 17:53 [Bug c++/105980] New: " gscfq@t-online.de 2022-06-15 9:13 ` [Bug target/105980] " rguenth at gcc dot gnu.org 2022-06-16 14:03 ` marxin at gcc dot gnu.org 2022-06-17 10:21 ` ubizjak at gmail dot com 2022-07-25 16:00 ` rguenth at gcc dot gnu.org 2022-07-29 13:46 ` jakub at gcc dot gnu.org [this message] 2022-07-29 18:41 ` hjl.tools at gmail dot com 2022-07-29 20:10 ` jakub at gcc dot gnu.org 2022-07-29 20:37 ` hjl.tools at gmail dot com 2023-01-16 18:02 ` jakub at gcc dot gnu.org 2023-01-16 19:00 ` hjl.tools at gmail dot com 2023-01-16 22:11 ` cvs-commit at gcc dot gnu.org 2023-03-24 16:15 ` [Bug target/105980] [11/12 " jakub at gcc dot gnu.org 2023-04-27 13:18 ` cvs-commit at gcc dot gnu.org 2023-05-29 10:07 ` [Bug target/105980] [11 " jakub at gcc dot gnu.org 2024-02-10 18:19 ` fxcoudert 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-105980-4-WENQVU6Huh@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: linkBe 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).