On Wed, Aug 19, 2015 at 05:23:41AM -0700, H.J. Lu wrote: > >>> >> > You might have a reason why you want the entry stack address instead > >>> >> > of the > >>> >> > frame address, but you didn't really explain I think? Or I missed > >>> >> > it. > >> > >> What would a C program do with this, that it cannot do with the frame > >> address, that would be useful and cannot be much better done in straight > >> assembler? Do you actually want to expose the argument pointer, maybe? > > > > Yes, we want to use the argument pointer as shown in testcases > > included in my patch. > > Where do we stand on this? We need the hard stack address at > function entry for x86 without using frame pointer. I added > __builtin_stack_top since __builtin_frame_address can't give > us what we want. Should __builtin_stack_top be added to > middle-end or x86 backend?
Sorry for not following up; I thought my suggestion was obvious. Can you do a __builtin_argument_pointer instead? That should work for all targets, afaics? Segher