OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [altivec-20.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile { target powerpc_altivec_ok } } */
2
/* { dg-options "-maltivec -mcpu=G5 -O2" } */
3
 
4
#include <altivec.h>
5
 
6
void foo( float scalar)
7
{
8
    unsigned long width;
9
    unsigned long x;
10
    vector float vColor;
11
    vector unsigned int selectMask;
12
    vColor = vec_perm( vec_ld( 0, &scalar), vec_ld( 3, &scalar), vec_lvsl( 0, &scalar) );
13
 
14
    float *destRow;
15
    vector float store, load0;
16
 
17
    for( ; x < width; x++)
18
    {
19
            load0 = vec_sel( vColor, load0, selectMask );
20
            vec_st( store, 0, destRow );
21
            store = load0;
22
    }
23
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.