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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [asm-3.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR 17739 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -fdump-tree-optimized" } */
4
 
5
#ifdef __hppa__
6
#define REGISTER "1"
7
#else
8
#ifdef __moxie__
9
#define REGISTER "8"
10
#else
11
#define REGISTER "0"
12
#endif
13
#endif
14
 
15
static inline int source(void)
16
{
17
  register int hardreg __asm__(REGISTER);
18
  asm("" : "=r"(hardreg));
19
  return hardreg;
20
}
21
 
22
void test(void)
23
{
24
  int t = source();
25
  foo(t);
26
  bar(t);
27
}
28
 
29
/* Hardreg should appear exactly 3 times -- declaration, asm stmt,
30
   and copy out.  */
31
/* { dg-final { scan-tree-dump-times "hardreg" 3 "optimized" } } */
32
 
33
/* In particular, hardreg should *not* appear in the call to bar.  */
34
/* { dg-final { scan-tree-dump-times "bar \[(\]t_.\[)\]" 1 "optimized" } } */
35
 
36
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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