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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [xstormy16/] [sfr/] [12_if1_sfrb_bit_7.c] - Blame information for rev 859

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

Line No. Rev Author Line
1 329 jeremybenn
/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
2
/* { dg-final { scan-assembler "b\[np\] " } } */
3
 
4
#define SFRA (*((volatile unsigned char*)0x7f14))
5
unsigned char *pA = (unsigned char *) 0x7f14;
6
#define SFRB (*((volatile unsigned char*)0x7f10))
7
unsigned char *pB = (unsigned char *) 0x7f10;
8
 
9
char *
10
Do (void)
11
{
12
  if (SFRA & 0x80)
13
    {
14
      if (SFRB & 0x80)
15
        return "Fail";
16
      else
17
        return "Success";
18
    }
19
  else
20
    return "Fail";
21
}
22
 
23
int
24
main (void)
25
{
26
  *pA = 0xcb;
27
  *pB = 0x34;
28
  return Do ()[0] == 'F';
29
}

powered by: WebSVN 2.1.0

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