[Pixman] [PATCH] SIMD: Try without any CFLAGS before forcing -mcpu=

Martin Jansa martin.jansa at gmail.com
Fri Mar 19 06:29:32 PDT 2010


On Fri, Mar 19, 2010 at 03:07:24PM +0200, Siarhei Siamashka wrote:
[...]
> The whole issue is very strange. This 'pixman_transform_init_identity'
> function is defined in 'pixman-matrix.c' file. The compiler seems to generate
> a call to 'memset' using the variant of 'blx' instruction which is invalid for
> armv4t compatible processors.
> 
> I have no idea how this all could be related to the presence of absence
> of arm-simd support. For me gcc-4.4.3 generates the following thumb code
> for 'pixman_transform_init_identity' function when targeting armv4t
> (support for arm-simd is also enabled):
> 
> 00000f90 <pixman_transform_init_identity>:
>  f90:   b510            push    {r4, lr}
>  f92:   2100            movs    r1, #0
>  f94:   2224            movs    r2, #36
>  f96:   1c04            adds    r4, r0, #0
>  f98:   f7ff fffe       bl      0 <memset>
>  f9c:   2080            movs    r0, #128
>  f9e:   0243            lsls    r3, r0, #9
>  fa0:   6023            str     r3, [r4, #0]
>  fa2:   6123            str     r3, [r4, #16]
>  fa4:   6223            str     r3, [r4, #32]
>  fa6:   bc10            pop     {r4}
>  fa8:   bc01            pop     {r0}
>  faa:   4700            bx      r0
> 
> Please check the precise options which are passed to the compiler when
> compiling 'pixman-matrix.c' source file.

With SIMD configure.ac patch reverted:
Whole builddir available http://build.shr-project.org/tests/jama/pixman-0.17.12-r5.0.simd.NO
bitbake at jama ~/tmpdir-dev-shr/work/armv4t-oe-linux-gnueabi/pixman-0.17.12-r5.0/pixman-0.17.12/pixman $ make -n | grep matrix
echo "  CC    " pixman-matrix.lo;/bin/sh ../arm-oe-linux-gnueabi-libtool --silent --tag=CC   --mode=compile arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb -DHAVE_CONFIG_H -I. -I..   -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include  -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 -MT pixman-matrix.lo -MD -MP -MF .deps/pixman-matrix.Tpo -c -o pixman-matrix.lo pixman-matrix.c
mv -f .deps/pixman-matrix.Tpo .deps/pixman-matrix.Plo
echo "  CCLD  " libpixman-1.la;/bin/sh ../arm-oe-linux-gnueabi-libtool --silent --tag=CC   --mode=link arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb  -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 -version-info 17:12:17 -no-undefined    -L/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/lib -Wl,-rpath-link,/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -o libpixman-1.la -rpath /usr/lib pixman-access.lo pixman-access-accessors.lo pixman-cpu.lo pixman-gradient-walker.lo pixman-region16.lo pixman-region32.lo pixman-image.lo pixman-implementation.lo pixman-combine32.lo pixman-combine64.lo pixman-general.lo pixman.lo pixman-fast-path.lo pixman-solid-fill.lo pixman-conical-gradient.lo pixman-linear-gradient.lo pixman-radial-gradient.lo pixman-bits-image.lo pixman-utils.lo pixman-edge.lo pixman-edge-accessors.lo pixman-trap.lo pixman-timer.lo pixman-matrix.lo -lm


Looks almost the same as yours

0002da28 <__real_pixman_transform_init_identity>:
   2da28:       b510            push    {r4, lr}
   2da2a:       2100            movs    r1, #0
   2da2c:       2224            movs    r2, #36 ; 0x24
   2da2e:       1c04            adds    r4, r0, #0
   2da30:       f7d5 feee       bl      3810 <_init+0x110>
   2da34:       2080            movs    r0, #128        ; 0x80
   2da36:       0243            lsls    r3, r0, #9
   2da38:       6023            str     r3, [r4, #0]
   2da3a:       6123            str     r3, [r4, #16]
   2da3c:       6223            str     r3, [r4, #32]
   2da3e:       bc10            pop     {r4}
   2da40:       bc01            pop     {r0}
   2da42:       4700            bx      r0
   2da44:       46c0            nop                     ; (mov r8, r8)
   2da46:       46c0            nop                     ; (mov r8, r8)


With SIMD configure.ac patch included:
Whole builddir available http://build.shr-project.org/tests/jama/pixman-0.17.12-r5.0.simd.YES
bitbake at jama ~/tmpdir-dev-shr/work/armv4t-oe-linux-gnueabi/pixman-0.17.12-r5.0/pixman-0.17.12/pixman $ make -n | grep matrix
echo "  CC    " pixman-matrix.lo;/bin/sh ../arm-oe-linux-gnueabi-libtool --silent --tag=CC   --mode=compile arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb -DHAVE_CONFIG_H -I. -I..   -isystem/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/include  -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 -MT pixman-matrix.lo -MD -MP -MF .deps/pixman-matrix.Tpo -c -o pixman-matrix.lo pixman-matrix.c
mv -f .deps/pixman-matrix.Tpo .deps/pixman-matrix.Plo
echo "  CCLD  " libpixman-1.la;/bin/sh ../arm-oe-linux-gnueabi-libtool --silent --tag=CC   --mode=link arm-oe-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb  -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 -version-info 17:12:17 -no-undefined    -L/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/lib -Wl,-rpath-link,/OE/tmpdir-dev-shr/staging/armv4t-oe-linux-gnueabi/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -o libpixman-1.la -rpath /usr/lib pixman-access.lo pixman-access-accessors.lo pixman-cpu.lo pixman-gradient-walker.lo pixman-region16.lo pixman-region32.lo pixman-image.lo pixman-implementation.lo pixman-combine32.lo pixman-combine64.lo pixman-general.lo pixman.lo pixman-fast-path.lo pixman-solid-fill.lo pixman-conical-gradient.lo pixman-linear-gradient.lo pixman-radial-gradient.lo pixman-bits-image.lo pixman-utils.lo pixman-edge.lo pixman-edge-accessors.lo pixman-trap.lo pixman-timer.lo pixman-matrix.lo -lm    libpixman-arm-simd.la

and blx is back :/

0002db10 <pixman_transform_init_identity>:
   2db10:       b510            push    {r4, lr}
   2db12:       2100            movs    r1, #0
   2db14:       2224            movs    r2, #36 ; 0x24
   2db16:       1c04            adds    r4, r0, #0
   2db18:       f7d5 eee8       blx     38ec <_init+0xe4>
   2db1c:       2080            movs    r0, #128        ; 0x80
   2db1e:       0243            lsls    r3, r0, #9
   2db20:       6023            str     r3, [r4, #0]
   2db22:       6123            str     r3, [r4, #16]
   2db24:       6223            str     r3, [r4, #32]
   2db26:       bc10            pop     {r4}
   2db28:       bc01            pop     {r0}
   2db2a:       4700            bx      r0
   2db2c:       46c0            nop                     ; (mov r8, r8)
   2db2e:       46c0            nop                     ; (mov r8, r8)

Regards,
-- 
uin:136542059                jid:Martin.Jansa at gmail.com
Jansa Martin                 sip:jamasip at voip.wengo.fr 
JaMa                         


More information about the Pixman mailing list