After this patch is SIMD enabled on my armv4t (samsung s3c2442) with -mthumb in CC by default, it never was before and I'm not sure it's intentional now as it fails in runtime on SIGILL.
Environment: OpenEmbedded builg gcc-4.4.3 binutils-2.20 run env from http://pastebin.ca/1845506 CFLAGS="-isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os" CC="arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb" configure \ --build=x86_64-linux \ --host=arm-oe-linux-gnueabi \ --target=arm-oe-linux-gnueabi \ --prefix=/usr \ --exec_prefix=/usr \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --libexecdir=/usr/libexec \ --datadir=/usr/share \ --sysconfdir=/etc \ --sharedstatedir=/com \ --localstatedir=/var \ --libdir=/usr/lib \ --includedir=/usr/include \ --oldincludedir=/usr/include \ --infodir=/usr/share/info \ --mandir=/usr/share/man \ --disable-arm-neon \ --disable-gtk config.log from 933540861383da27402680593edefe8d61e6fb02 from http://paste.pocoo.org/show/191449/ configure:11465: checking whether to use ARM SIMD assembler configure:11477: arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb -c -mcpu=arm1136j-s -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -Wall -fno-strict-aliasing -fvisibility=hidden -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include conftest.c >&5 conftest.c:1: warning: switch -mcpu=arm1136j-s conflicts with -march= switch /tmp/ccUDty6k.s: Assembler messages: /tmp/ccUDty6k.s:23: Error: selected processor does not support `uqadd8 r1,r1,r2' configure:11477: $? = 1 configure: failed program was: | /* confdefs.h */ [snip] | /* end confdefs.h. */ | | int main () { | asm("uqadd8 r1, r1, r2"); | return 0; | } configure:11503: result: no config.log from 18f0de452dc7e12e4cb544d761a626d5c6031663 from http://paste.pocoo.org/show/191450/ configure:11465: checking whether to use ARM SIMD assembler configure:11476: arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb -c -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -Wall -fno-strict-aliasing -fvisibility=hidden -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include conftest.c >&5 /tmp/ccPXr408.s: Assembler messages: /tmp/ccPXr408.s:23: Error: selected processor does not support `uqadd8 r1,r1,r2' configure:11476: $? = 1 configure: failed program was: | /* confdefs.h */ [snip] | /* end confdefs.h. */ | | int main () { | asm("uqadd8 r1, r1, r2"); | return 0; | } configure:11493: arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb -c -mcpu=arm1136j-s -marm -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -Wall -fno-strict-aliasing -fvisibility=hidden -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include conftest.c >&5 conftest.c:1: warning: switch -mcpu=arm1136j-s conflicts with -march= switch configure:11493: $? = 0 configure:11521: result: yes Then resulting binary fails in runtime with SIGILL Program received signal SIGILL, Illegal instruction. 0x401af86a in pixman_transform_init_identity () from /usr/lib/libpixman-1.so.0 (gdb) disass 0x401af85a 0x401af87a Dump of assembler code from 0x401af85a to 0x401af87a: 0x401af85a <pixman_transform_scale+130>: lsls r0, r0, #0 0x401af85c <pixman_transform_scale+132>: lsls r1, r0, #0 0x401af85e <pixman_transform_scale+134>: lsls r0, r0, #0 0x401af860 <pixman_transform_init_identity+0>: push {r4, lr} 0x401af862 <pixman_transform_init_identity+2>: movs r1, #0 0x401af864 <pixman_transform_init_identity+4>: movs r2, #36 ; 0x24 0x401af866 <pixman_transform_init_identity+6>: adds r4, r0, #0 0x401af868 <pixman_transform_init_identity+8>: blx 0x401868d0 0x401af86c <pixman_transform_init_identity+12>: movs r0, #128 ; 0x80 0x401af86e <pixman_transform_init_identity+14>: lsls r3, r0, #9 0x401af870 <pixman_transform_init_identity+16>: str r3, [r4, #0] 0x401af872 <pixman_transform_init_identity+18>: str r3, [r4, #16] 0x401af874 <pixman_transform_init_identity+20>: str r3, [r4, #32] 0x401af876 <pixman_transform_init_identity+22>: pop {r4} 0x401af878 <pixman_transform_init_identity+24>: pop {r0} End of assembler dump. (gdb) info reg r0 0x141b8c 1317772 r1 0x0 0 r2 0x24 36 r3 0xac 172 r4 0x141b8c 1317772 r5 0xbe 190 r6 0x1418a8 1317032 r7 0x0 0 r8 0x0 0 r9 0x0 0 r10 0x40023000 1073885184 r11 0x0 0 r12 0x401af861 1075509345 sp 0xbeac5550 0xbeac5550 lr 0x4018686c 1075341420 pc 0x401af86a 0x401af86a <pixman_transform_init_identity+10> fps 0x0 0 cpsr 0x30 48 disassm from objdump whole file: http://build.shr-project.org/tests/jama/libpixman-1.so.0.17.13.disass 0002c860 <pixman_transform_init_identity>: 2c860: b510 push {r4, lr} 2c862: 2100 movs r1, #0 2c864: 2224 movs r2, #36 ; 0x24 2c866: 1c04 adds r4, r0, #0 2c868: f7d7 e832 blx 38d0 <_init+0xd8> 2c86c: 2080 movs r0, #128 ; 0x80 2c86e: 0243 lsls r3, r0, #9 2c870: 6023 str r3, [r4, #0] 2c872: 6123 str r3, [r4, #16] 2c874: 6223 str r3, [r4, #32] 2c876: bc10 pop {r4} 2c878: bc01 pop {r0} 2c87a: 4700 bx r0 2c87c: 46c0 nop ; (mov r8, r8) 2c87e: 46c0 nop ; (mov r8, r8) When linked with binutils-2.19 (as suggested on #ubuntu-arm) it fails the same. For now I'll use --disable-arm-simd, but let me know how can I help debugging/testing simd code, or if it's only usefull with -mno-thumb, then how to modify configure.ac to respect -mthumb from CC (not only from CFLAGS) if possible. Regards, -- uin:136542059 jid:[email protected] Jansa Martin sip:[email protected] JaMa _______________________________________________ Pixman mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pixman
