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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [altivec-15.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*-*-* } } */
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.