: Re: [MPlayer-dev-eng] [PATCH] compilers "optimizing" pe_image too much

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Sep 18 11:08:55 CEST 2004


Hi,

>>>Could someone test compilation on gcc 2.95 and other compilers? I tend
>>>to put those attributes always at the wrong place...
> 
>>Compiled with "gcc version 2.95.3 20010315 (release)".  I quickly tested
>>it on quite a few different videos.  VP3/4/6, MPEG-2/4.  
> 
>>Same minor complier warning Torinthiel reported:
> 
>>In file included from pe_image.c:56:
>>wine/debugtools.h:67: warning: useless keyword or type name in empty
>>declaration wine/debugtools.h:67: warning: empty declaration
>>pe_image.c:900: warning: `noinline' attribute directive ignored
> 
> In theory the __attribute_noinline__ macro is supposed to handle the case of
> old compilers without the noinline attribute, but I don't know if old system
> headers define it so it might be bad to use it.

I'd say if they don't know that attribute it's okay if they ignore it, 
and that warning isn't too bad.

> I suggest compiling pe_image.c with -S instead of -c (but all the other
> options as passed by make) and checking the contents of pe_image.s to ensure
> that extend_stack_for_dll_alloca() is not inlined in PE_InitDLL().

Too much work. I'll just hope that compilers that don't support noinline 
either don't automatically inline or do it correctly. This is mostly a 
gcc 3.x hack...
Also it would check the wrong thing, as it is possible to correctly 
inline functions that use alloca, e.g. if you keep the stack-pointer 
saving and restoring code...

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list