[MPlayer-dev-eng] [mp3lib] assembler warnings

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Apr 4 00:19:58 CEST 2004


Hello.
I went on another compiler warning silencing mission (I'll write about it
later) and stumbled upon the "Warning: missing operand; zero assumed"
warnings generated by gas. I was able to trace the issue to the following:

mp3lib/dct64_3dnow.c:23
"       leal 128+%3,%%edx\n\t"

Resulting asm code:
                leal 128+(%esp),%edx

mp3lib/dct64_MMX.c:16
"       leal 128+%3,%%edx\n\t"

Resulting asm code:
                leal 128+(%esp),%edx

mp3lib/dct64_k7.c:23
"       leal 128+%3,%%edx\n\t"

Resulting asm code:
                leal 128+(%esp),%edx

mp3lib/decode_i586:59-62
"        movl 4+%4,%%edx\n\t"
"        leal (%%ebx,%%edx,4),%%eax\n\t"
"        pushl %%eax\n\t"
"        movl 8+%4,%%eax\n\t"

Resulting asm code:
                movl 4+(%esp),%edx
                leal (%ebx,%edx,4),%eax
                pushl %eax
                movl 8+(%esp),%eax

I've found similar cases on the web and it seems that all of these are
missing some numerical argument after the + in leal and movl. That is, the
%3 and %4 parameters are not properly expanded.

Here's a similar problem described on gcc-l:
http://www.faqchest.com/prgm/gcc-l/gcc-03/gcc-0306/gcc-030601/gcc03060510_17222.html
And here's some discussion on linux-kernel of what you can do with gcc's
inline asm:
http://www.faqchest.com/linux/KERNEL/kern-98/kern-9804/kern-980466/kern98041901_02721.html

I hope this helps fixing it.

Regards,
R.

-- 
MPlayer RPMs maintainer: http://greysector.rangers.eu.org/mplayer.html
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"




More information about the MPlayer-dev-eng mailing list