Re: [patch] Get rid of stack trampolines for nested functions

2016-07-26 Thread Eric Botcazou
> So i think with the various nits I pointed out the target independent > stuff is good to go on the trunk. Then you can just iterate with the > target guys to get those wrapped up. OK, I'll do a pass on the entire patch, post a second version with the required fixes, split into 2 parts as agree

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-25 Thread Jeff Law
On 07/25/2016 06:56 AM, Eric Botcazou wrote: Another UNITS_PER_WORD that I think ought to be POINTER_SIZE/BITS_PER_UNIT. Probably worth a pass over the patch to look for this throughout. Yes, it was very likely enabled only on platforms with word-sized pointers. That's what I suspected. Tha

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-25 Thread Eric Botcazou
> So does this require that every function have an 8-byte alignment > boundary? or just those that appear in nested functions? If the > former, how do you get routines written in assembler, or produced by > third-party compilers, to comply? The former. You need to be able to control what happen

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-25 Thread Richard Earnshaw (lists)
On 25/07/16 14:25, Eric Botcazou wrote: >> If I understand how this is supposed to work then this is not >> future-proof against changes to the architecture. The bottom two bits >> in both AArch32 (arm) and AArch64 are reserved for future use by the >> architecture; they must not be used by softwa

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-25 Thread Eric Botcazou
> If I understand how this is supposed to work then this is not > future-proof against changes to the architecture. The bottom two bits > in both AArch32 (arm) and AArch64 are reserved for future use by the > architecture; they must not be used by software for tricks like this. I see, thanks for

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-25 Thread Richard Earnshaw (lists)
On 29/06/16 23:08, Eric Botcazou wrote: > Index: config/aarch64/aarch64.h > === > --- config/aarch64/aarch64.h (revision 237789) > +++ config/aarch64/aarch64.h (working copy) > @@ -779,6 +779,9 @@ typedef struct > correctly. */

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-25 Thread Eric Botcazou
> Should UNITS_PER_WORD here be POINTER_SIZE/BITS_PER_UNIT right? Hmm, yes, presumably, it's the size of the static chain and so a pointer. > Another UNITS_PER_WORD that I think ought to be > POINTER_SIZE/BITS_PER_UNIT. Probably worth a pass over the patch to > look for this throughout. Yes, it

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-21 Thread Andrew Pinski
On Thu, Jul 21, 2016 at 8:45 AM, Arnaud Charlet wrote: > Jeff, > >> So just to be clear, once installed, for Ada we'll start using the >> descriptor based scheme on the subset of targets below, which will >> be an ABI change, right? > > Right. > >> If so and this goes in, we'll have to make sure t

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-21 Thread Arnaud Charlet
Jeff, > So just to be clear, once installed, for Ada we'll start using the > descriptor based scheme on the subset of targets below, which will > be an ABI change, right? Right. > If so and this goes in, we'll have to make sure to signal loud and > wide about the ABI change at the project level

Re: [patch] Get rid of stack trampolines for nested functions

2016-07-21 Thread Jeff Law
On 06/29/2016 04:08 PM, Eric Botcazou wrote: Hi, this patch implements generic support for the elimination of stack trampolines and, consequently, of the need to make the stack executable when pointers to nested functions are used. That's done on a per-language and per-target basis (i.e. there

Re: [patch] Get rid of stack trampolines for nested functions

2016-06-30 Thread Richard Biener
On Thu, Jun 30, 2016 at 12:08 AM, Eric Botcazou wrote: > Hi, > > this patch implements generic support for the elimination of stack trampolines > and, consequently, of the need to make the stack executable when pointers to > nested functions are used. That's done on a per-language and per-target