Kirill Ponomarew wrote:>On Sun, Jan 16, 2005 at 04:30:32PM +0100, Stephane Marchesin wrote:
SDL_yuv_mmx.c: In function
ColorRGBDitherYV12MMX1X': SDL_yuv_mmx.c:236: syntax error before
[‘
SDL_yuv_mmx.c: In functionColor565DitherYV12MMX1X': SDL_yuv_mmx.c:417: syntax error before
[‘
SDL_yuv_mmx.c: At top level:
SDL_yuv_mmx.c:33: warning:MMX_0080w' defined but not used SDL_yuv_mmx.c:34: warning:
MMX_00FFw’ defined but not used
SDL_yuv_mmx.c:35: warning:MMX_FF00w' defined but not used SDL_yuv_mmx.c:37: warning:
MMX_Ycoeff’ defined but not used
SDL_yuv_mmx.c:39: warning:MMX_UbluRGB' defined but not used SDL_yuv_mmx.c:40: warning:
MMX_VredRGB’ defined but not used
SDL_yuv_mmx.c:41: warning:MMX_UgrnRGB' defined but not used SDL_yuv_mmx.c:42: warning:
MMX_VgrnRGB’ defined but not used
SDL_yuv_mmx.c:44: warning:MMX_Ublu5x5' defined but not used SDL_yuv_mmx.c:45: warning:
MMX_Vred5x5’ defined but not used
SDL_yuv_mmx.c:46: warning:MMX_Ugrn555' defined but not used SDL_yuv_mmx.c:47: warning:
MMX_Vgrn555’ defined but not used
SDL_yuv_mmx.c:48: warning:MMX_Ugrn565' defined but not used SDL_yuv_mmx.c:49: warning:
MMX_Vgrn565’ defined but not used
SDL_yuv_mmx.c:51: warning:MMX_red555' defined but not used SDL_yuv_mmx.c:52: warning:
MMX_red565’ defined but not used
SDL_yuv_mmx.c:53: warning:MMX_grn555' defined but not used SDL_yuv_mmx.c:54: warning:
MMX_grn565’ defined but not used
SDL_yuv_mmx.c:55: warning: `MMX_blu5x5’ defined but not used
*** Error code 1I’ll work on this when I find the time, but I’m very busy at the moment.
If you want to do this yourself, I can explain you what’s needed. It’s
not hard but takes some time.It would be great if you could explain me, since my asm knowledge
isn’t strong enough for doing it.
So, first here is the problem :
- the asm inline code for YUV conversion needs more than 10 parameters,
which is not supported by gcc versions < 3 (which only have %0 to %9) - the technique that was used before to cope with this limitation was
guessing the name mangling in a compiler-dependent fashion (add a _ at
the begining of the variables names and thus make the accessible from
the asm inlines) - recent gcc versions (3.3 and later IIRC) use a different name mangling
function, and thus the code won’t compile there
So there are two possible fixes :
- find out what name mangling happens on recent gcc versions and add the
name mangling code back, taking into account gcc 3.3 and possibly other
versions. - break each of the asm inlines into multiple inlines (probably 3 pieces
for each), thus resulting in less than 10 parameters for each inline.
Personally I would go for the second fix because it involves no
compiler-dependent code.
Stephane