> >What I'm wondering about is whether it is possible, in the code that > >gets invoked in a "define_insn" to generate the actual assembly, to find > >out the difference between the SP and the frame address. > > > > > You shoul have asked this the first time.
I'll try to be more specific next time. > What I wrote was a general > case (it should be taken into account from machine-independent code). > For a given architecture the answer could be different. In some APIs, > the difference between sp and fp is always size of local variables and > not changed. You should check API of the target you are interesting in > to get the answer. Hmmm... I believe I need to make one last go at explaining what I'm asking about. The difference between SP & FP is not constant. Take varargs for instance. This claim should be true regardless of architecture(unless there is an architecture that does not use stack for varargs, but I don't think there is). The job of reload1.c/elimination_effects() is to track such differences as they vary across INSNs. Reading the documentation on INITIAL_FRAME_POINTER_OFFSET(), I thought that INITIAL_ELIMINATION_OFFSET() was similarly for immediately after the function prologue. Looking at the code in reload1.c, it does look like the elimination offset tracking information is thrown away after reload. Rephrasing my question in light of your feedback: >From within a "define_insn" asm generation C code, is there a way to figure out the difference between the frame pointer and the stack pointer? Based upon your feedback so far, I believe the answer is no. -- Øyvind Harboe http://www.zylin.com