public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
@ 2021-04-29 11:33 acoplan at gcc dot gnu.org
2021-04-29 11:33 ` [Bug target/100333] " acoplan at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-04-29 11:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
Bug ID: 100333
Summary: arm: ICE (unrecognizable insn) with CMSE nonsecure
call and -march=armv8.1-m.main
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: acoplan at gcc dot gnu.org
Target Milestone: ---
The following fails:
$ cat test.c
typedef void __attribute__((cmse_nonsecure_call)) t(void);
t g;
void f() {
g();
}
$ ./arm-eabi-gcc -c test.c -mcmse -march=armv8.1-m.main -mfloat-abi=soft
test.c: In function 'f':
test.c:5:1: error: unrecognizable insn:
5 | }
| ^
(call_insn 5 2 0 2 (parallel [
(call (unspec:SI [
(mem:SI (symbol_ref:SI ("g") [flags 0x41]
<function_decl 0x7ffff7059f00 g>) [0 g S4 A32])
] UNSPEC_NONSECURE_MEM)
(const_int 0 [0]))
(use (const_int 0 [0]))
(clobber (reg:SI 14 lr))
]) "test.c":4:3 -1
(nil)
(nil))
during RTL pass: vregs
test.c:5:1: internal compiler error: in extract_insn, at recog.c:2770
0xcc2347 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/alecop01/toolchain/src/gcc/gcc/rtl-error.c:108
0xcc2366 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/alecop01/toolchain/src/gcc/gcc/rtl-error.c:116
0xc90fa6 extract_insn(rtx_insn*)
/home/alecop01/toolchain/src/gcc/gcc/recog.c:2770
0x9b74e4 instantiate_virtual_regs_in_insn
/home/alecop01/toolchain/src/gcc/gcc/function.c:1658
0x9b74e4 instantiate_virtual_regs
/home/alecop01/toolchain/src/gcc/gcc/function.c:1983
0x9b74e4 execute
/home/alecop01/toolchain/src/gcc/gcc/function.c:2032
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
The ICE does not occur if I instead specify -march=armv8-m.main.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/100333] arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
@ 2021-04-29 11:33 ` acoplan at gcc dot gnu.org
2021-05-19 14:54 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-04-29 11:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Keywords| |ice-on-valid-code
Known to fail| |12.0
Last reconfirmed| |2021-04-29
Ever confirmed|0 |1
Target| |arm-eabi
--- Comment #1 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Taking a look at this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/100333] arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
2021-04-29 11:33 ` [Bug target/100333] " acoplan at gcc dot gnu.org
@ 2021-05-19 14:54 ` cvs-commit at gcc dot gnu.org
2021-05-19 14:55 ` acoplan at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-19 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alex Coplan <acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:5b953740da1976d90d974055c6d825c509c6e654
commit r12-923-g5b953740da1976d90d974055c6d825c509c6e654
Author: Alex Coplan <alex.coplan@arm.com>
Date: Wed May 19 15:52:45 2021 +0100
arm: Fix ICE with CMSE nonsecure calls on Armv8.1-M [PR100333]
As the PR shows, we ICE shortly after expanding nonsecure calls for
Armv8.1-M.
For Armv8.1-M, we have TARGET_HAVE_FPCXT_CMSE. As it stands, the expander
(arm.md:nonsecure_call_internal) moves the callee's address to a register
(with
copy_to_suggested_reg) only if !TARGET_HAVE_FPCXT_CMSE.
However, looking at the pattern which the insn appears to be intended to
match (thumb2.md:*nonsecure_call_reg_thumb2_fpcxt), it requires the
callee's address to be in a register.
This patch therefore just forces the callee's address into a register in
the expander.
gcc/ChangeLog:
PR target/100333
* config/arm/arm.md (nonsecure_call_internal): Always ensure
callee's address is in a register.
gcc/testsuite/ChangeLog:
PR target/100333
* gcc.target/arm/cmse/pr100333.c: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/100333] arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
2021-04-29 11:33 ` [Bug target/100333] " acoplan at gcc dot gnu.org
2021-05-19 14:54 ` cvs-commit at gcc dot gnu.org
@ 2021-05-19 14:55 ` acoplan at gcc dot gnu.org
2021-06-03 9:16 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-05-19 14:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
--- Comment #3 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Fixed on trunk for now.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/100333] arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
` (2 preceding siblings ...)
2021-05-19 14:55 ` acoplan at gcc dot gnu.org
@ 2021-06-03 9:16 ` cvs-commit at gcc dot gnu.org
2021-06-04 8:30 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-03 9:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:e58539d965059994ebac606ae7533e857bbe199f
commit r11-8506-ge58539d965059994ebac606ae7533e857bbe199f
Author: Alex Coplan <alex.coplan@arm.com>
Date: Wed May 19 15:52:45 2021 +0100
arm: Fix ICE with CMSE nonsecure calls on Armv8.1-M [PR100333]
As the PR shows, we ICE shortly after expanding nonsecure calls for
Armv8.1-M.
For Armv8.1-M, we have TARGET_HAVE_FPCXT_CMSE. As it stands, the expander
(arm.md:nonsecure_call_internal) moves the callee's address to a register
(with
copy_to_suggested_reg) only if !TARGET_HAVE_FPCXT_CMSE.
However, looking at the pattern which the insn appears to be intended to
match (thumb2.md:*nonsecure_call_reg_thumb2_fpcxt), it requires the
callee's address to be in a register.
This patch therefore just forces the callee's address into a register in
the expander.
gcc/ChangeLog:
PR target/100333
* config/arm/arm.md (nonsecure_call_internal): Always ensure
callee's address is in a register.
gcc/testsuite/ChangeLog:
PR target/100333
* gcc.target/arm/cmse/pr100333.c: New test.
(cherry picked from commit 5b953740da1976d90d974055c6d825c509c6e654)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/100333] arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
` (3 preceding siblings ...)
2021-06-03 9:16 ` cvs-commit at gcc dot gnu.org
@ 2021-06-04 8:30 ` cvs-commit at gcc dot gnu.org
2021-06-04 8:30 ` acoplan at gcc dot gnu.org
2021-09-17 6:46 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-04 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:fe28b9da8f81c678bf5807eba413fae09ac36e72
commit r10-9889-gfe28b9da8f81c678bf5807eba413fae09ac36e72
Author: Alex Coplan <alex.coplan@arm.com>
Date: Wed May 19 15:52:45 2021 +0100
arm: Fix ICE with CMSE nonsecure calls on Armv8.1-M [PR100333]
As the PR shows, we ICE shortly after expanding nonsecure calls for
Armv8.1-M.
For Armv8.1-M, we have TARGET_HAVE_FPCXT_CMSE. As it stands, the expander
(arm.md:nonsecure_call_internal) moves the callee's address to a register
(with
copy_to_suggested_reg) only if !TARGET_HAVE_FPCXT_CMSE.
However, looking at the pattern which the insn appears to be intended to
match (thumb2.md:*nonsecure_call_reg_thumb2_fpcxt), it requires the
callee's address to be in a register.
This patch therefore just forces the callee's address into a register in
the expander.
gcc/ChangeLog:
PR target/100333
* config/arm/arm.md (nonsecure_call_internal): Always ensure
callee's address is in a register.
gcc/testsuite/ChangeLog:
PR target/100333
* gcc.target/arm/cmse/pr100333.c: New test.
(cherry picked from commit 5b953740da1976d90d974055c6d825c509c6e654)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/100333] arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
` (4 preceding siblings ...)
2021-06-04 8:30 ` cvs-commit at gcc dot gnu.org
@ 2021-06-04 8:30 ` acoplan at gcc dot gnu.org
2021-09-17 6:46 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-06-04 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/100333] arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
` (5 preceding siblings ...)
2021-06-04 8:30 ` acoplan at gcc dot gnu.org
@ 2021-09-17 6:46 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17 6:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100333
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.4
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-09-17 6:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 11:33 [Bug target/100333] New: arm: ICE (unrecognizable insn) with CMSE nonsecure call and -march=armv8.1-m.main acoplan at gcc dot gnu.org
2021-04-29 11:33 ` [Bug target/100333] " acoplan at gcc dot gnu.org
2021-05-19 14:54 ` cvs-commit at gcc dot gnu.org
2021-05-19 14:55 ` acoplan at gcc dot gnu.org
2021-06-03 9:16 ` cvs-commit at gcc dot gnu.org
2021-06-04 8:30 ` cvs-commit at gcc dot gnu.org
2021-06-04 8:30 ` acoplan at gcc dot gnu.org
2021-09-17 6:46 ` pinskia at gcc dot gnu.org
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).