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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [arm-iwmmxt-unwind.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
/* Test unwinding of iWMMXt register saves.  */
2
/* Origin: Joseph Myers  */
3
 
4
/* { dg-do run } */
5
/* { dg-require-effective-target arm32 } */
6
 
7
#ifdef __IWMMXT__
8
extern "C" void abort (void);
9
extern "C" void exit (int);
10
 
11
void
12
foo (void)
13
{
14
  register long long wr10 asm("wr10") = 0;
15
  register long long wr11 asm("wr11") = 1;
16
  register long long wr12 asm("wr12") = 2;
17
  register long long wr14 asm("wr14") = 4;
18
  register long long wr15 asm("wr15") = 5;
19
  asm volatile ("" : "+y" (wr10), "+y" (wr11), "+y" (wr12), "+y" (wr14), "+y" (wr15));
20
  throw "";
21
}
22
 
23
int
24
main (void)
25
{
26
  register long long wr10 asm("wr10") = 10;
27
  register long long wr11 asm("wr11") = 11;
28
  register long long wr12 asm("wr12") = 12;
29
  register long long wr13 asm("wr13") = 13;
30
  register long long wr14 asm("wr14") = 14;
31
  register long long wr15 asm("wr15") = 15;
32
  asm volatile ("" : "+y" (wr10), "+y" (wr11), "+y" (wr12), "+y" (wr13), "+y" (wr14), "+y" (wr15));
33
  try {
34
    foo ();
35
  } catch (...) {
36
    asm volatile ("" : "+y" (wr10), "+y" (wr11), "+y" (wr12), "+y" (wr13), "+y" (wr14), "+y" (wr15));
37
    if (wr10 != 10 || wr11 != 11 || wr12 != 12 || wr13 != 13 || wr14 != 14 || wr15 != 15)
38
      abort ();
39
  }
40
  exit (0);
41
}
42
#else
43
int
44
main (void)
45
{
46
}
47
#endif

powered by: WebSVN 2.1.0

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