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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [xstormy16/] [bp.c] - Blame information for rev 753

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2" } */
3
/* { dg-final { scan-assembler "b\[np\] " } } */
4
 
5
#define a_val (*((volatile unsigned char *) 0x7f14))
6
#define b_val (*((volatile unsigned char *) 0x7f10))
7
 
8
unsigned char * a_ptr = (unsigned char *) 0x7f14;
9
unsigned char * b_ptr = (unsigned char *) 0x7f10;
10
 
11
int
12
foo (void)
13
{
14
  if (a_val & 0x08)
15
    {
16
      if (b_val & 0x08)
17
        return -1;
18
 
19
      return 0;
20
    }
21
 
22
  return -1;
23
}
24
 
25
int
26
bar (void)
27
{
28
  *a_ptr = 0x08;
29
  *b_ptr = 0xf7;
30
 
31
  return foo ();
32
}

powered by: WebSVN 2.1.0

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