| To: | Franck Bui-Huu <vagabon.xyz@gmail.com> |
|---|---|
| Subject: | Re: Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR |
| From: | Ralf Baechle <ralf@linux-mips.org> |
| Date: | Tue, 13 Nov 2007 15:01:46 +0000 |
| Cc: | Andrew Haley <aph-gcc@littlepinkcloud.com>, David Daney <ddaney@avtrex.com>, linux-mips@linux-mips.org, Richard Sandiford <rsandifo@nildram.co.uk>, gcc@gcc.gnu.org |
| In-reply-to: | <cda58cb80711130622u7ef77870iae407f7c8054e9da@mail.gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <473957B6.3030202@avtrex.com> <18233.36645.232058.964652@zebedee.pink> <20071113121036.GA6582@linux-mips.org> <cda58cb80711130514x16356ea3x4069616c9ee3caac@mail.gmail.com> <20071113140036.GA7650@linux-mips.org> <cda58cb80711130622u7ef77870iae407f7c8054e9da@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.14 (2007-02-12) |
On Tue, Nov 13, 2007 at 03:22:33PM +0100, Franck Bui-Huu wrote:
> > > And the stack wouldn't need to have exec permission anymore.
> >
> > Oh?
> >
> > extern void frob(void (*)(void));
> >
> > int foo(void)
> > {
> > int x;
> >
> > void bar(void)
> > {
> > x++;
> > }
> >
> > frob(&bar);
> > print("x is %d\n", x);
> > }
> >
> > Compile and enjoy.
> >
>
> Sorry Ralf, I missed your point.
This piece of code compiles to something that copies a trampoline to the
stack. The address of that trampoline is what is then passed as argument
to frob().
Old versions of glibc were probable the most notorious users of trampolines.
Objective C also generates them. Since a cacheflush that is a syscall is
required performance is less than great.
Which means the libc() cacheflush() function is another candidate for a
vDSO, it can be optimized by using SYNCI on some configurations.
Ralf
|
| Previous by Date: | Re: Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR, Franck Bui-Huu |
|---|---|
| Next by Date: | Re: Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR, Ralf Baechle |
| Previous by Thread: | Re: Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR, Franck Bui-Huu |
| Next by Thread: | Re: Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR, Andrew Pinski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |