Menu

#28 Make jpeg-mmx build with gcc-3.4 -O3

closed-accepted
nobody
None
5
2005-02-27
2005-01-22
No

The thorough optimization in gcc 3.4 optimizes away the
constants that are referenced in the inline assembly.
To make the compiler aware of those references, they
need to be specified in the inputs list of the asm
statement they are used in.
Also, there is a problem with the mmxsupport function
that gets inlined, producing a duplicate label in the
generated code. To prevent this, the function is
declared with
__attribute__ ((noinline))

Discussion

  • Mikhail Zabaluev

    Patch against jpeg-mmx 0.1.5

     
  • Bernhard Praschinger

    Logged In: YES
    user_id=155293

    That patch workes. The jpeg mmx is afterwards still compilable:
    cat jpeg-mmx-0.1.5-gcc3.4-const-use.patch | patch -p0
    patching file jpeg-mmx-0.1.5/jdcolor.c
    patching file jpeg-mmx-0.1.5/attributes.h
    patching file jpeg-mmx-0.1.5/jdapimin.c
    patching file jpeg-mmx-0.1.5/jidctint.c

    compile:
    I just get some messages like that:
    gcc -O6 -I. -c -o jidctfst.o jidctfst.c
    jidctfst.c:400: warning: integer constant is too large for
    "long" type
    jidctfst.c:401: warning: integer constant is too large for
    "long" type
    jidctfst.c:402: warning: integer constant is too large for
    "long" type
    jidctfst.c:403: warning: integer constant is too large for
    "long" type
    jidctfst.c:404: warning: integer constant is too large for
    "long" type
    jidctfst.c:405: warning: integer constant is too large for
    "long" type
    ....
    jdsample.c:308: warning: integer constant is too large for
    "long" type
    jdsample.c:308: warning: integer constant is too large for
    "long" type
    jdsample.c:309: warning: integer constant is too large for
    "long" type
    jdsample.c:309: warning: integer constant is too large for
    "long" type
    jdsample.c:310: warning: integer constant is too large for
    "long" type
    jdsample.c:310: warning: integer constant is too large for
    "long" type
    jdsample.c:311: warning: integer constant is too large for
    "long" type
    jdsample.c:311: warning: integer constant is too large for
    "long" type
    jdsample.c:312: warning: integer constant is too large for
    "long" type
    ...
    jdmerge.c:43: warning: integer constant is too large for
    "long" type
    jdmerge.c:44: warning: integer constant is too large for
    "long" type
    jdmerge.c:45: warning: integer constant is too large for
    "long" type
    jdmerge.c:46: warning: integer constant is too large for
    "long" type
    jdmerge.c:50: warning: integer constant is too large for
    "long" type
    jdmerge.c:51: warning: integer constant is too large for
    "long" type
    jdmerge.c:53: warning: integer constant is too large for
    "long" type
    jdmerge.c:56: warning: integer constant is too large for
    "long" type
    jdmerge.c:58: warning: integer constant is too large for
    "long" type

     
  • Bernhard Praschinger

    • status: open --> closed
     
  • Bernhard Praschinger

    Logged In: YES
    user_id=155293

    Just added your patch to the CVS

     
  • Bernhard Praschinger

    • status: closed --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB