It is standard gcc for blackfin. For some reason that list does not include
packing attributes. See http://ds9a.nl/gcc-simd/example.html for x86 packing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyYtrcACgkQyjWa9oynuqDw9gCfSsjgGQ4whDWM6IPf4IC09SIq
gGUAoKWS7KyMWpTlASY17WmMwcsIOwzX
=HnSI
-----END PGP SIGNATURE-----
Reply by Vladimir Vassilevsky●September 21, 20102010-09-21
Atilla wrote:
> I'm developing a bare-metal firmware on BF537(Surveyor SVS board). I don't have
> the time to learn assembly for blackfin,
Too bad. You will have to learn assembler for BlackFin even if you don't
have time for it.
> fortunately I saw SIMD i spossible with plain C. So
>
> 1- Does the compiler automatically use SIMD features
No. Unless you use built-ins. Even if you do so, it does miserable job.
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
Reply by Boudewijn Dijkstra●September 21, 20102010-09-21
Op Tue, 21 Sep 2010 13:16:29 +0200 schreef Atilla
<atilla@stack+rest+is+junk+junk.nl>:
> I'm developing a bare-metal firmware on BF537(Surveyor SVS board). I
> don't have
> the time to learn assembly for blackfin, fortunately I saw SIMD i
> spossible with plain C. So
>
> 1- Does the compiler
Which compiler?
> automatically use SIMD features if I do some loop unrolling like:
> instead of
>
> for(i=0;i<N;i++)
> c[i]=a[i]+b[i];
>
> this:
> for(i=0;i<N;i+=2)
> {
> c[i]=a[i]+b[i];
> c[i+1]=a[i+1]+b[i+1];
> }
Most compilers can perform loop unrolling themselves.
> 2- I saw some gcc built-in constructs like "__attribute__
> ((mode(V2HI)))" to pack data for SIMD operations.
> I think this is two short integers packed. Is
> there a list of such attributes?
It depends what they really do.
--
Gemaakt met Opera's revolutionaire e-mailprogramma:
http://www.opera.com/mail/
(remove the obvious prefix to reply by mail)
Reply by Atilla●September 21, 20102010-09-21
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm developing a bare-metal firmware on BF537(Surveyor SVS board). I don't have
the time to learn assembly for blackfin, fortunately I saw SIMD i spossible with
plain C. So
1- Does the compiler automatically use SIMD features if I do some loop unrolling
like:
instead of
for(i=0;i<N;i++)
c[i]=a[i]+b[i];
this:
for(i=0;i<N;i+=2)
{
c[i]=a[i]+b[i];
c[i+1]=a[i+1]+b[i+1];
}
2- I saw some gcc built-in constructs like "__attribute__ ((mode(V2HI)))" to
pack data for SIMD operations. I think this is two short integers packed. Is
there a list of such attributes? Do I really need to use them?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyYlAsACgkQyjWa9oynuqDN1ACfQKFjHVT5HTaYDoLxoexUhADQ
6XAAn1h8ZAEjxDfgURXjoGCr91uvHtYo
=/OjB
-----END PGP SIGNATURE-----