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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [pr43329-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/43329 */
2
/* { dg-do run } */
3
/* { dg-options "-g" } */
4
 
5
#include "../nop.h"
6
 
7
static inline void
8
foo (int argx)
9
{
10
  int varx = argx;
11
  __asm__ volatile (NOP);                       /* { dg-final { gdb-test 12 "argx" "25" } } */
12
  __asm__ volatile (NOP : : "g" (varx));        /* { dg-final { gdb-test 12 "varx" "25" } } */
13
}
14
 
15
int i;
16
 
17
__attribute__((noinline))
18
void baz (int x)
19
{
20
  asm volatile ("" : : "r" (x) : "memory");
21
}
22
 
23
static inline void
24
bar (void)
25
{
26
  foo (25);
27
  i = i + 2;
28
  i = i * 2;
29
  i = i - 4;
30
  baz (i);
31
  i = i * 2;
32
  i = i >> 1;
33
  i = i << 6;
34
  baz (i);
35
  i = i + 2;
36
  i = i * 2;
37
  i = i - 4;
38
  baz (i);
39
  i = i * 2;
40
  i = i >> 6;
41
  i = i << 1;
42
  baz (i);
43
}
44
 
45
int
46
main (void)
47
{
48
  __asm__ volatile ("" : "=r" (i) : "0" (0));
49
  bar ();
50
  bar ();
51
  return i;
52
}

powered by: WebSVN 2.1.0

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