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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [altivec-2.C] - Blame information for rev 801

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

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

powered by: WebSVN 2.1.0

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