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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.arch/] [altivec-regs.c] - Diff between revs 24 and 157

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 157
#include <altivec.h>
#include <altivec.h>
#include <stdio.h>
#include <stdio.h>
 
 
vector unsigned int
vector unsigned int
vector_fun (vector unsigned int a, vector unsigned int b)
vector_fun (vector unsigned int a, vector unsigned int b)
{
{
  vector unsigned int c;
  vector unsigned int c;
  a = ((vector unsigned int) vec_splat_u8(2));
  a = ((vector unsigned int) vec_splat_u8(2));
  b = ((vector unsigned int) vec_splat_u8(3));
  b = ((vector unsigned int) vec_splat_u8(3));
 
 
  c = vec_add (a, b);
  c = vec_add (a, b);
  return c;
  return c;
}
}
 
 
int
int
main ()
main ()
{
{
  vector unsigned int y;
  vector unsigned int y;
  vector unsigned int x;
  vector unsigned int x;
  vector unsigned int z;
  vector unsigned int z;
  int a;
  int a;
 
 
  /* This line may look unnecessary but we do need it, because we want to
  /* This line may look unnecessary but we do need it, because we want to
     have a line to do a next over (so that gdb refetches the registers)
     have a line to do a next over (so that gdb refetches the registers)
     and we don't want the code to change any vector registers.
     and we don't want the code to change any vector registers.
     The splat operations below modify the VRs,i
     The splat operations below modify the VRs,i
     so we don't want to execute them yet.  */
     so we don't want to execute them yet.  */
  a = 9;
  a = 9;
  x = ((vector unsigned int) vec_splat_u8 (-2));
  x = ((vector unsigned int) vec_splat_u8 (-2));
  y = ((vector unsigned int) vec_splat_u8 (1));
  y = ((vector unsigned int) vec_splat_u8 (1));
 
 
  z = vector_fun (x, y);
  z = vector_fun (x, y);
  x = vec_sld (x,y,2);
  x = vec_sld (x,y,2);
 
 
  x = vec_add (x, ((vector unsigned int){5,6,7,8}));
  x = vec_add (x, ((vector unsigned int){5,6,7,8}));
  z = (vector unsigned int) vec_splat_u8 ( -2);
  z = (vector unsigned int) vec_splat_u8 ( -2);
  y = vec_add (x, z);
  y = vec_add (x, z);
  z = (vector unsigned int) vec_cmpeq (x,y);
  z = (vector unsigned int) vec_cmpeq (x,y);
 
 
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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