[FFmpeg-devel] [PATCH]Force enable ebp_available for icc
Sat Mar 14 09:52:57 CET 2009
On Sat, Mar 14, 2009 at 12:14:09AM +0000, Carl Eugen Hoyos wrote:
> There is confusion here over what the -fomit-frame-pointer option actually does.
> The FFmpeg configure script is counting on the use of the -fomit-frame-pointer
> option to *require* the compiler to not use the ebp register as a frame pointer.
No, not necessarily, it is just supposed to increase the chances enough
to make sense trying to use it.
To me the real issue is that the compiler does not fail when ebp is not
available, instead creating broken code, which makes enabling this a bit
risky (given how the check is done gcc probably does the same stupid
> In this case, starting in 11.0, in main
> the Intel Compiler aligns the stack, and doing this it needs to maintain the
> frame pointer to hold the original stack pointer. Another situation where the
> compiler needs to maintain the frame pointer is when calls to alloca() are made.
I'd like to be so pedantic to say, while it is efficient to do so, there
is no _need_ to keep the original stack pointer in ebp, it could also be
stored on the stack (with the corresponding penalties for accessing
function arguments) or particularly on x86_64 in a different register.
Debugging is the only reason it _has_ to be ebp that I can think of...
More information about the ffmpeg-devel