This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [split] Add x86 support


On 09/28/2009 04:51 PM, Ian Lance Taylor wrote:
The plan is not to use thunk-like objects.  I agree that in the
general case that can not work, because you can't know how many
parameter bytes to copy on to the new stack.  The plan is for the
linker to actually modify the size of the stack space request in
split-stack code which calls non-split-stack code.

Interesting.


I considered this sort of approach, and my main concern is that this
increases the performance penalty.  Now every function uses a frame
pointer, and, less significantly, the overhead is no longer
lea/cmp/jle, it is movq/call/lea/cmp/jle/ret.

Perhaps you can mix both options, by having different entry points into the support library.


The stack realignment solution does have the advantage that you don't have to invoke copy constructors for those arguments that need them. You could then choose between the two alternatives based on looking at the actual arguments to the callee.


r~



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]