OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [simd-2.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Test EH when V4SI SIMD registers are involved.
2
// Contributed by Aldy Hernandez (aldy@quesejoda.com).
3
// { dg-options "-O -Wno-abi" }
4
// { dg-options "-O -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
5
// { dg-options "-O -w" { target powerpc*-*-* } }
6
// { dg-options "-O -w -maltivec" { target { powerpc*-*-* && vmx_hw } } }
7
// { dg-do run }
8
 
9
#include "check-vect.h"
10
 
11
typedef int __attribute__((vector_size (16))) vecint;
12
 
13
vecint vecfunc (vecint beachbum)
14
{
15
  return beachbum;
16
}
17
 
18
void f3 (void)
19
{
20
  vecint foobar = (vecint) {0, 0};
21
  foobar = vecfunc (foobar);
22
 
23
  throw int();
24
}
25
 
26
void f2 (void)
27
{
28
  vecint foobar = (vecint) {0, 0};
29
  foobar = vecfunc (foobar);
30
 
31
  f3 ();
32
}
33
 
34
void f1 (void)
35
{
36
  int i;
37
  try
38
    {
39
      f2 ();
40
    }
41
  catch (int)
42
    {
43
      i = 9;
44
    }
45
}
46
 
47
int main ()
48
{
49
  /* Exit with zero if the hardware does not support AltiVec instructions.  */
50
  check_vect ();
51
  f1 ();
52
  return 0;
53
}

powered by: WebSVN 2.1.0

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