aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/asm-function-3.c
blob: 944900fb75b6fa4ff2a8d2d69a566e2fd35c139c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* APPLE LOCAL file CW asm blocks */
/* More tests of asm functions.  */

/* { dg-do run { target powerpc*-*-* } } */
/* { dg-options "-fasm-blocks -O2" } */

void abort(void);

/* Return 0 if xer and spr1 both have the same data.  */

asm int
test_spr ()
{
  mfspr r5,xer
  mfspr r4,spr1
  sub r3,r4,r5
}

int
main ()
{
  if (test_spr ())
    abort ();
  return 0;
}