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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [eh/] [simd-1.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// Test EH when V2SI SIMD registers are involved.
// Test EH when V2SI SIMD registers are involved.
// Contributed by Aldy Hernandez (aldy@quesejoda.com).
// Contributed by Aldy Hernandez (aldy@quesejoda.com).
// { dg-options "-O -Wno-abi" }
// { dg-options "-O -Wno-abi" }
// { dg-options "-O -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
// { dg-options "-O -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
// { dg-do run }
// { dg-do run }
typedef int __attribute__((vector_size (8))) vecint;
typedef int __attribute__((vector_size (8))) vecint;
vecint vecfunc (vecint beachbum)
vecint vecfunc (vecint beachbum)
{
{
  return beachbum;
  return beachbum;
}
}
void f3 (void)
void f3 (void)
{
{
  /* Force a use of a V2SI register if available.  On the PPC/E500,
  /* Force a use of a V2SI register if available.  On the PPC/E500,
     this will cause the compiler to save the registers in this
     this will cause the compiler to save the registers in this
     function in 64-bits.  */
     function in 64-bits.  */
  vecint foobar = (vecint) {0, 0};
  vecint foobar = (vecint) {0, 0};
  foobar = vecfunc (foobar);
  foobar = vecfunc (foobar);
  throw int();
  throw int();
}
}
void f2 (void)
void f2 (void)
{
{
  vecint foobar = (vecint) {0, 0};
  vecint foobar = (vecint) {0, 0};
  foobar = vecfunc (foobar);
  foobar = vecfunc (foobar);
  f3 ();
  f3 ();
}
}
void f1 (void)
void f1 (void)
{
{
  int i;
  int i;
  try
  try
    {
    {
      f2 ();
      f2 ();
    }
    }
  catch (int)
  catch (int)
    {
    {
      i = 9;
      i = 9;
    }
    }
}
}
int main ()
int main ()
{
{
  f1 ();
  f1 ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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