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/] [gcc.target/] [m68k/] [interrupt_thread-1.c] - Blame information for rev 328

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

Line No. Rev Author Line
1 320 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-mcpu=fidoa -O2 -fomit-frame-pointer" } */
3
 
4
/* Check that interrupt_thread attribute works.  */
5
 
6
#ifdef __mfido__
7
extern void foo (void) __attribute__ ((interrupt_thread));
8
 
9
int a, b, c, d;
10
 
11
void bar (void);
12
 
13
void
14
foo (void)
15
{
16
  int w, x, y, z;
17
 
18
  w = a;
19
  x = b;
20
  y = c;
21
  z = d;
22
 
23
  bar ();
24
 
25
  a = w;
26
  b = x;
27
  c = y;
28
  d = z;
29
}
30
#else
31
/* If the current mutilib is, say, -mcpu=5485, the compiler gets
32
   -mcpu=fidoa -mcpu=5485, where -mcpu=fidoa is overridden.  In that
33
   case, we just print out "sleep" in the assembly file and pretend
34
   that everything is all right.  */
35
asm ("sleep");
36
#endif
37
 
38
/* "sleep" should be generated in place of "rts".  */
39
/* { dg-final { scan-assembler-times "sleep" 1 } } */
40
/* { dg-final { scan-assembler-times "rts" 0 } } */
41
 
42
/* There should be no stack adjustment.  */
43
/* { dg-final { scan-assembler-times "sp" 0 } } */

powered by: WebSVN 2.1.0

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