OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [altivec-15.c] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 322 jeremybenn
/* { dg-do compile { target powerpc*-*-* } } */
2
/* { dg-require-effective-target powerpc_altivec_ok } */
3
/* { dg-options "-maltivec" } */
4
 
5
#include <altivec.h>
6
 
7
/* Test whether the C front-end is not excessively picky about
8
   the integral types and literals that AltiVec instrinsics will
9
   accept.  */
10
 
11
vector int vi = { 1, 2, 3, 4 };
12
 
13
int
14
main (void)
15
{
16
    unsigned long ul = 2;
17
    signed long sl = 2;
18
    unsigned int ui = 2;
19
    signed int si = 2;
20
    float fl = 2.0;
21
 
22
    vec_dst (&vi, ul, '\0');
23
    vec_dst (&vi, sl, 0);
24
    vec_dst (&vi, ui, '\0');
25
    vec_dst (&vi, si, 0);
26
    vec_dstst (&vi, (short)fl, '\0');
27
 
28
    return 0;
29
}
30
 

powered by: WebSVN 2.1.0

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