public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/44290] [4.5 Regression] __naked attribute is broken Date: Sat, 29 May 2010 14:45:00 -0000 [thread overview] Message-ID: <20100529144535.24623.qmail@sourceware.org> (raw) In-Reply-To: <bug-44290-10179@http.gcc.gnu.org/bugzilla/> ------- Comment #15 from rguenth at gcc dot gnu dot org 2010-05-29 14:45 ------- (In reply to comment #13) > (In reply to comment #10) > > Or rather, if you have > > > > void __attribute__((naked)) foo (int i) > > { > > asm("use i"); > > } > > > > without any inputs refering to i that is invalid. > > Not according to gcc/doc/extend.texi: > > > @item naked > > @cindex function without a prologue/epilogue code > > Use this attribute on the ARM, AVR, IP2K, RX and SPU ports to indicate that > > the specified function does not need prologue/epilogue sequences generated by > > the compiler. It is up to the programmer to provide these sequences. The > > only statements that can be safely included in naked functions are > > @code{asm} statements that do not have operands. > > Note: "do not have operands". Thus the only way such an asm() can refer to > parameters is by assuming a standard function call sequence and hardcoding > corresponding register numbers or stack frame offsets. Then the target has to properly communicate this to the middle-end. > However, even if the asm() refers to those parameters via "r"(...) inputs, > gcc-4.5 changes the register assignment to not agree with the standard call > sequence, I'll attach a small test case showing that in a moment. I'd have required dummy inputs like "g" (kto), "g" (kfrom) not used by the actual assembly. For now re-open as a target bug. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | Summary|[4.5 Regression] arm linux |[4.5 Regression] __naked |kernel crahes when built |attribute is broken |with -fipa-sra, __naked | |attribute is broken | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290
next prev parent reply other threads:[~2010-05-29 14:45 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-27 6:26 [Bug tree-optimization/44290] New: arm linux kernel crahes when built with -fipa-sra raj dot khem at gmail dot com 2010-05-27 7:07 ` [Bug tree-optimization/44290] " raj dot khem at gmail dot com 2010-05-27 7:13 ` raj dot khem at gmail dot com 2010-05-27 10:41 ` [Bug tree-optimization/44290] [4.5 Regression] " rguenth at gcc dot gnu dot org 2010-05-27 17:26 ` raj dot khem at gmail dot com 2010-05-27 17:27 ` raj dot khem at gmail dot com 2010-05-28 11:49 ` mikpe at it dot uu dot se 2010-05-28 22:03 ` mikpe at it dot uu dot se 2010-05-29 11:36 ` mikpe at it dot uu dot se 2010-05-29 11:43 ` [Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken rguenth at gcc dot gnu dot org 2010-05-29 11:47 ` rguenth at gcc dot gnu dot org 2010-05-29 11:50 ` rguenth at gcc dot gnu dot org 2010-05-29 13:30 ` Andrew Pinski 2010-05-29 13:30 ` pinskia at gmail dot com 2010-05-29 14:27 ` mikpe at it dot uu dot se 2010-05-29 14:40 ` mikpe at it dot uu dot se 2010-05-29 14:45 ` rguenth at gcc dot gnu dot org [this message] 2010-05-29 14:46 ` [Bug target/44290] [4.5 Regression] " rguenth at gcc dot gnu dot org 2010-05-29 14:47 ` mikpe at it dot uu dot se 2010-05-29 18:00 ` mikpe at it dot uu dot se 2010-05-30 5:58 ` raj dot khem at gmail dot com 2010-05-30 6:55 ` raj dot khem at gmail dot com 2010-05-30 17:04 ` rguenth at gcc dot gnu dot org 2010-07-23 14:48 ` jiez at gcc dot gnu dot org 2010-07-23 14:51 ` jiez at gcc dot gnu dot org 2010-07-23 14:52 ` jiez at gcc dot gnu dot org 2010-07-26 8:05 ` [Bug target/44290] [4.5 only] " ramana at gcc dot gnu dot org 2010-07-26 14:38 ` jiez at gcc dot gnu dot org 2010-07-27 17:34 ` jiez at gcc dot gnu dot org 2010-07-31 9:35 ` rguenth at gcc dot gnu dot org [not found] <bug-44290-4@http.gcc.gnu.org/bugzilla/> 2010-12-15 22:11 ` [Bug target/44290] [4.5 regression] " belyshev at depni dot sinp.msu.ru 2010-12-16 3:06 ` jiez at gcc dot gnu.org 2010-12-16 13:08 ` rguenth at gcc dot gnu.org 2010-12-16 20:47 ` belyshev at depni dot sinp.msu.ru 2010-12-16 20:50 ` belyshev at depni dot sinp.msu.ru 2010-12-21 4:16 ` jiez at gcc dot gnu.org 2011-04-10 10:27 ` rguenth at gcc dot gnu.org 2011-04-28 15:35 ` rguenth at gcc dot gnu.org 2011-06-03 22:20 ` ramana at gcc dot gnu.org 2012-07-02 10:37 ` rguenth 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=20100529144535.24623.qmail@sourceware.org \ --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).