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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [altivec-2.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile { target powerpc*-*-* } } */
2
/* { dg-require-effective-target powerpc_altivec_ok } */
3
/* { dg-options "-maltivec -Wall" } */
4
 
5
/* This test checks if AltiVec builtins accept const-qualified
6
   arguments.  */
7
 
8
#include 
9
#include "altivec_check.h"
10
 
11
int main (int argc, const char * argv[])
12
{
13
  int i;
14
  const float cf = 1.0;
15
  vector float v;
16
  const vector float cv = (vector float){1.0, 2.0, 3.0, 4.0};
17
 
18
  altivec_check ();
19
 
20
  vec_dst(&cv, i, 0);
21
  v = vec_ld(0, &cv);
22
  v = vec_lde(0, &cf);
23
  vec_lvsl(0, &cf);
24
 
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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