ffmpeg is an excellent testing case. Another finding with -mthumb option enabled using 2010.10/Cortex-A8.
The ffmpeg configured with CFLAGS set to "-O0 -mthumb" or "-O2 -mthumb", the rest options is
./configure --enable-gpl --enable-nonfree --disable-ffserver --disable-ffplay --enable-ffmpeg --disable-shared --enable-static --disable-neon --disable-debug
It leads to the following issue:
gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/ldm/misc/tc/suite/cases/ffmpeg/ffmpeg" -O0 -mthumb -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -c -o libavcodec/dsputil.o libavcodec/dsputil.c
/tmp/cc3oo5Yt.s: Assembler messages:
/tmp/cc3oo5Yt.s:838: Error: thumb conditional instruction should be in IT block -- `movgt r4,r3'
/tmp/cc3oo5Yt.s:839: Error: thumb conditional instruction should be in IT block -- `movgt r3,r2'
/tmp/cc3oo5Yt.s:841: Error: thumb conditional instruction should be in IT block -- `movle r3,r1'
/tmp/cc3oo5Yt.s:843: Error: thumb conditional instruction should be in IT block -- `movgt r4,r3'
make: *** [libavcodec/dsputil.o] Error 1
=> see test-O0-thumb, preprocessed libavcodec_dsputil-O0.c and resulting libavcodec_dsputil-O2.s
With -O2 the produced numeber of assembler errors is a bit higher
gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/ldm/misc/tc/suite/cases/ffmpeg/ffmpeg" -O2 -mthumb -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -c -o libavcodec/dsputil.o libavcodec/dsputil.c
/tmp/ccGoZ2zz.s: Assembler messages:
/tmp/ccGoZ2zz.s:19251: Error: thumb conditional instruction should be in IT block -- `movgt fp,r9'
/tmp/ccGoZ2zz.s:19252: Error: thumb conditional instruction should be in IT block -- `movgt r9,r8'
/tmp/ccGoZ2zz.s:19254: Error: thumb conditional instruction should be in IT block -- `movle r9,r7'
/tmp/ccGoZ2zz.s:19256: Error: thumb conditional instruction should be in IT block -- `movgt fp,r9'
/tmp/ccGoZ2zz.s:19307: Error: thumb conditional instruction should be in IT block -- `movgt r9,r8'
/tmp/ccGoZ2zz.s:19308: Error: thumb conditional instruction should be in IT block -- `movgt r8,ip'
/tmp/ccGoZ2zz.s:19310: Error: thumb conditional instruction should be in IT block -- `movle r8,r6'
/tmp/ccGoZ2zz.s:19312: Error: thumb conditional instruction should be in IT block -- `movgt r9,r8'
=> see test-O2-thumb, preprocessed libavcodec_dsputil-O2.c and resulting libavcodec_dsputil-O2.s
Due to I am not sure about similar findings in gcc-linaro I created this one.
The rest of data and test case collected in attachment.
Confirmed using: gcc-linaro- 4.5-2010. 09-1-armv7l- maverick- cbuild4- pavo4/bin/ gcc -specs=gcc.spec -std=gnu99 -c libavcodec_ dsputil. c
~/toolchains/