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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [altivec-2.C] - Rev 307

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

/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -Wall" } */

/* This test checks if AltiVec builtins accept const-qualified
   arguments.  */

#include <altivec.h>

vector unsigned char use_lvsl;

int main (int argc, const char * argv[])
{
  int i = 0;
  const float cf = 1.0;
  vector float v;
  const vector float cv = (vector float){1.0, 2.0, 3.0, 4.0};

  vec_dst(&cv, i, 0);
  v = vec_ld(0, &cv);   
  v = vec_lde(0, &cf);
  use_lvsl = vec_lvsl(0, &cf);
  
  return 0;
}

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

powered by: WebSVN 2.1.0

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