Hi -

> From: Wolfgang Fritz <[EMAIL PROTECTED]>
> > gcc -O6  -I.   -c -o jdapimin.o jdapimin.c
> > /tmp/cc7IfzBn.s: Assembler messages:
> > /tmp/cc7IfzBn.s:619: Error: symbol `NOT_SUPPORTED' is already defined
> > gmake: *** [jdapimin.o] Error 1
> > 
> 
> The reason for this it that gcc inlines the assembler function
> mmxsupport() at 2 places, so the symbol NOT_SUPPORTED is defined twice.

        Hmmm, the 2 places are under different #ifdef conditions.

        The first is '#ifdef HAVE_MMX_INTEL_MNEMONICS' while the second
        one is '#if defined(HAVE_MMX_ATT_MNEMONICS)'

        Why does gcc 3.3 include both sections of code?    Effectively
        "gcc-3.3 -O6" causes the compiler to apparently ignore the '#ifdef' 
        statements and include both blocks of code which causes NOT_SUPPORTED
        to be defined twice.

        In order for NOT_SUPPORTED to be defined twice both the
        #ifdef HAVE_MMX_INTEL_MNEMONICS and the #ifdef HAVE_MMX_ATT_MNEMONIC
        sections would have to be compiled.

> A fix without changing the O option is to change the global symbol to a
> local one. See the attached patch.

        That will work but I wonder if it is simply masking the problem?

        The current jpeg_mmx code seems to have a weird blend of support 
        for ATT mnemonics in some modules,  ATT and INTEL in other modules 
        and ATT + INTEL in others.     

        Thus the 'cpu_accel.c' module will return a meaningful value if
        'HAVE_MMX_ATT_MNEMONICS' is defined because there is no 
        HAVE_MMX_INTEL_MNEMONICS support in cpu_accel.c - thus if jpeg_mmx
        is built on a system without ATT_MNEMONICS defined cpu_accel will
        always return 0.

        Would a better approach be to only support 1 set of assembler
        mnemonics? 

        Cheers,
        Steven Schultz


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to