Opened 13 years ago

Closed 13 years ago

#303 closed defect (fixed)

libavcodec/x86/snowdsp_mmx.c has bad inline asm

Reported by: Jeremy Huddleston Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: asm libavcodec
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

clang doesn't like the inline assembly in snowdsp_mmx.c due to ambiguous instruction usage:

x86/snowdsp_mmx.c:757:50: error: ambiguous instructions require an explicit suffix (could be 'addb', 'addw', 'addl', or 'addq')

"movdqu %%xmm1, (%%"REG_d") \n\t"


<inline asm>:73:2: note: instantiated into assembly here

add $8*1, -40(%rbp)

x86/snowdsp_mmx.c:735:18: error: ambiguous instructions require an explicit suffix (could be 'addb', 'addw', 'addl', or 'addq')
snow_inner_add_yblock_sse2_end_8

x86/snowdsp_mmx.c:677:48: note: instantiated from:

"sal $1, %%"REG_c" \n\t"\


<inline asm>:95:2: note: instantiated into assembly here

add $8*2, -40(%rbp)

2 errors generated.

Change History (4)

comment:1 by Carl Eugen Hoyos, 13 years ago

Status: newopen

(Given that clang gets tested on http://fate.ffmpeg.org )
Please add FFmpeg version information, clang version information, configure line (should be ./configure or ./configure --cc=...) and complete, uncut output of the last of several "make V=1" calls (please do not add the complete, uncut output of the first call to "make V=1").

comment:2 by Jeremy Huddleston, 13 years ago

ffmpeg is git master 5aa8b270db2b88f136ef518b4bdf2b5dfff4a77b

clang is a recent trunk (3.0) build (svn r133863 or git llvm 644eb9befc4334f408cb6bed90ec5ed1a30f32a6, clang 6594942e98e25640f226aba622eb76bcaf0a521c)

target is darwin/x86_64

$ /opt/llvm/bin/clang -v
clang version 3.0 (http://llvm.org/git/clang.git ffb945ffb5d29b80fd93649c3572b6d87abce3fc)
Target: x86_64-apple-darwin11.0.0
Thread model: posix

ffmpeg/libavcodec $ /opt/llvm/bin/clang -I. -I../  -DHAVE_AV_CONFIG_H -D_ISOC99_SOURCE -D_BSD_SOURCE -O2 -march=core2 -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -I. -Iffmpeg -I/opt/local/include/lzo -I/opt/local/include -DPIC  -I/usr/X11/include -I/opt/local/include/ -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include   -I/opt/local/include/freetype2 -I/opt/local/include  -DFF_API_MAX_STREAMS=0  -MD -MP -c -o x86/snowdsp_mmx.o x86/snowdsp_mmx.c
x86/snowdsp_mmx.c:757:50: error: ambiguous instructions require an explicit suffix (could be 'addb', 'addw', 'addl', or 'addq')
             "movdqu %%xmm1, (%%"REG_d")       \n\t"
                                                 ^
<inline asm>:73:2: note: instantiated into assembly here
        add $8*1, -40(%rbp)          
        ^
x86/snowdsp_mmx.c:735:18: error: ambiguous instructions require an explicit suffix (could be 'addb', 'addw', 'addl', or 'addq')
snow_inner_add_yblock_sse2_end_8
^
x86/snowdsp_mmx.c:677:48: note: instantiated from:
             "sal $1, %%"REG_c"              \n\t"\
                                               ^
<inline asm>:95:2: note: instantiated into assembly here
        add $8*2, -40(%rbp)          
        ^
2 errors generated.

comment:3 by Jeremy Huddleston, 13 years ago

Do you want a darwin source for fate?

comment:4 by reimar, 13 years ago

Resolution: fixed
Status: openclosed

I fixed it in 5c13b5bb398c12361732b7b47c71954484f5af1d.
And yes, I think we'd very much like additional FATE test machines, I am a bit unsure about the process to add on though.
Do you have a fate config set up and running already? I think all you need to do is to send your public ssh key to Baptiste in that case.

Note: See TracTickets for help on using tickets.