Who brokes SDL compilation with gcc 2.95.3?

Hello, All!

Found that log information in the CVS:

2004-05-16 17:19 slouken

    * src/: audio/SDL_mixer_MMX.c, cpuinfo/SDL_cpuinfo.c,
      video/SDL_yuv_mmx.c: Date: Mon, 10 May 2004 10:17:46 -0400 From:
      Mike Frysinger Subject: Re: [SDL] gcc-3.4.0 / PIC fix

      here's a combined patch (yours and the one i mentioned earlier)
      that i tested with gcc-3.4.0 and gcc-3.3.3

This patch brokes compilation with 2.95.3 compiler, which is default in QNX
6.3.0 , because it doesn’t know anything about following construction from
the SDL_yuv_mmx.c as example:

: “m” (cr), “r”(cb),“r”(lum),
“r”(row1),“r”(cols),“r”(row2),“m”(x),“m”(y),“m”(mod),
[_MMX_0080w] “m” (*MMX_0080w),
[_MMX_00FFw] “m” (*MMX_00FFw),
[_MMX_FF00w] “m” (*MMX_FF00w),
[_MMX_VgrnRGB] “m” (*MMX_VgrnRGB),
[_MMX_VredRGB] “m” (*MMX_VredRGB),
[_MMX_UgrnRGB] “m” (*MMX_UgrnRGB),
[_MMX_UbluRGB] “m” (*MMX_UbluRGB)
);

In SDL 1.2.7 was:

:
: “m” (cr), “r”(cb),“r”(lum),
“r”(row1),“r”(cols),“r”(row2),“m”(x),“m”(y),“m”(mod)
: “%ebx”
);

Need to revert patch back (only leave the ebx saving code in assembly). Or
gcc 3.4.0 have problems with compiling code from SDL 1.2.7 ?

With best regards, Mike Gorchak. E-mail: @Mike_Gorchak

read the mailing list archive as this has already been asked and should
already be covered in cvs
-mikeOn Thursday 27 January 2005 08:55 am, Mike Gorchak wrote:

This patch brokes compilation with 2.95.3 compiler, which is default in QNX
6.3.0 , because it doesn’t know anything about following construction from

Mike Gorchak wrote:

Hello, All!

Found that log information in the CVS:

2004-05-16 17:19 slouken

   * src/: audio/SDL_mixer_MMX.c, cpuinfo/SDL_cpuinfo.c,
     video/SDL_yuv_mmx.c: Date: Mon, 10 May 2004 10:17:46 -0400 From:
     Mike Frysinger Subject: Re: [SDL] gcc-3.4.0 / PIC fix

     here's a combined patch (yours and the one i mentioned earlier)
     that i tested with gcc-3.4.0 and gcc-3.3.3

This patch brokes compilation with 2.95.3 compiler, which is default in QNX
6.3.0 , because it doesn’t know anything about following construction from
the SDL_yuv_mmx.c as example:

: “m” (cr), “r”(cb),“r”(lum),
“r”(row1),“r”(cols),“r”(row2),“m”(x),“m”(y),“m”(mod),
[_MMX_0080w] “m” (*MMX_0080w),
[_MMX_00FFw] “m” (*MMX_00FFw),
[_MMX_FF00w] “m” (*MMX_FF00w),
[_MMX_VgrnRGB] “m” (*MMX_VgrnRGB),
[_MMX_VredRGB] “m” (*MMX_VredRGB),
[_MMX_UgrnRGB] “m” (*MMX_UgrnRGB),
[_MMX_UbluRGB] “m” (*MMX_UbluRGB)
);

In SDL 1.2.7 was:

:
: “m” (cr), “r”(cb),“r”(lum),
“r”(row1),“r”(cols),“r”(row2),“m”(x),“m”(y),“m”(mod)
: “%ebx”
);

Need to revert patch back (only leave the ebx saving code in assembly). Or
gcc 3.4.0 have problems with compiling code from SDL 1.2.7 ?

Both gcc 3.4 and gcc 3.3 have problems with this code.
I’m trying to come up with a clean solution, but I only have an ugly
hack for now.

Stephane

Mike Frysinger wrote:>On Thursday 27 January 2005 08:55 am, Mike Gorchak wrote:

This patch brokes compilation with 2.95.3 compiler, which is default in QNX
6.3.0 , because it doesn’t know anything about following construction from

read the mailing list archive as this has already been asked and should
already be covered in cvs

No, sadly it’s not.
As I said, I’d like to have a clean solution (although I’m not sure it
even exists).

Stephane

As I said, I’d like to have a clean solution (although I’m not sure it
even exists).

Stephane, at this point, let’s just use preprocessor defines and break it
out into a block for the different gcc versions.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

As I said, I’d like to have a clean solution (although I’m not sure it
even exists).

Stephane, at this point, let’s just use preprocessor defines and break it
out into a block for the different gcc versions.

That’s what I did as a “quick hack”, actually. It already got some
testing by multiple people so I think it can go to cvs.

Stephane

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: yuv_mmx_ugly.patch
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050213/e134818c/attachment.txt

Sam Lantinga wrote:

As I said, I’d like to have a clean solution (although I’m not sure it
even exists).

Stephane, at this point, let’s just use preprocessor defines and break it
out into a block for the different gcc versions.

That’s what I did as a “quick hack”, actually. It already got some
testing by multiple people so I think it can go to cvs.

Ugh…

Okay, I’ve added your patch to CVS. Thanks!

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment