[Ffmpeg-devel] [BUG] Compilation failure when using --disable-opts

Panagiotis Issaris takis
Thu Mar 8 21:46:33 CET 2007


Hi

Michael Niedermayer schreef:
> On Thu, Mar 08, 2007 at 07:46:55PM +0100, Panagiotis Issaris wrote:
>> Michael Niedermayer schreef:
>>> On Thu, Mar 08, 2007 at 06:16:46PM +0100, Guillaume Poirier wrote:
>>>> Panagiotis Issaris wrote:
>>>>> When configuring FFmpeg revision 8295 (most recent SVN) to disable
>>>>> optimizations (for easier debugging), the cabac.c file fails to compile:
>>>>> "can't find a register in class ???GENERAL_REGS??? while reloading ???asm???"
>>>>>
>>>>> I've tried using several versions of GCC. Any tips on how to fix this?
>>>>[...]
>>> what would be correct is:
>>> #if defined(ARCH_X86) && defined(CONFIG_EBP) && defined(CONFIG_EBX)
>> What would CONFIG_EBP mean? Looking at the naming of the other CONFIG_*
>> options, I'd say it means the "EBP" and "EBX" "features" would be
>> enabled :) although it is quite unlikely EBP and EBX have other meanings
>> than the obvious (register names).
> 
> yes CONFIG_EBP means that the EBP register is available
> with gcc this is the case if and only if -fomit-frame-pointer is used
This indeed fails to compile if -fomit-frame-pointer isn't used _if_
optimization is turned on:

int main() { asm volatile ("" ::: "ebp"); }

With -O0 or without -Ox flag (which is what is used when --enable-opts
is passed to configure) the testapp compiles fine in either case.

So, with the flags used for the compilation of cabac.c, the testapp
compiles fine.


> CONFIG_EBX means that the EBX register is available
> with gcc this is the case if and only if PIC is not used
> 
> simply trying to compile a dummy volatile asm(:::"%ebx"); / ebp
> in configure can be used to set them



-- 
With friendly regards,
Takis

vCard: http://www.issaris.org/pi.vcf
Public key: http://www.issaris.org/pi.key




More information about the ffmpeg-devel mailing list