| To: | "Maciej W. Rozycki" <macro@ds2.pg.gda.pl> |
|---|---|
| Subject: | Re: [patch] Prevent dead code/data removal with gcc 3.4 |
| From: | Ralf Baechle <ralf@linux-mips.org> |
| Date: | Fri, 13 Feb 2004 23:07:25 +0100 |
| Cc: | Jun Sun <jsun@mvista.com>, linux-mips@linux-mips.org |
| In-reply-to: | <Pine.LNX.4.55.0402131908370.15042@jurand.ds.pg.gda.pl> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <Pine.LNX.4.55.0402131453360.15042@jurand.ds.pg.gda.pl> <20040213145316.GA23810@linux-mips.org> <20040213175141.GB16718@mvista.com> <Pine.LNX.4.55.0402131908370.15042@jurand.ds.pg.gda.pl> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.4.1i |
On Fri, Feb 13, 2004 at 07:35:01PM +0100, Maciej W. Rozycki wrote:
> If we want to tolerate performance loss, then it's easily doable. That
> can be done with the current setup, with a jump instruction to the
> referred function added at the end and "__attribute__((used))" or perhaps
> "asm("foo")" added to the function declaration.
>
> I can choose this path if we agree on it.
The inline version is fundemantally fragile. The outline version has
problems with getting reordered by later gcc which can be solved by
putting a jump to the C function at the end; the C function also needs
the right __attribute__s so it won't get eleminated by gcc.
Ralf
|
| Previous by Date: | Re: [patch] Prevent dead code/data removal with gcc 3.4, Maciej W. Rozycki |
|---|---|
| Next by Date: | Re: [patch] Prevent dead code/data removal with gcc 3.4, Thiemo Seufer |
| Previous by Thread: | Re: [patch] Prevent dead code/data removal with gcc 3.4, Maciej W. Rozycki |
| Next by Thread: | Re: [patch] Prevent dead code/data removal with gcc 3.4, Maciej W. Rozycki |
| Indexes: | [Date] [Thread] [Top] [All Lists] |