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/] [16_if1_sfrw_bit_8.c] - Blame information for rev 329

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 "mov.w r.,32532" } } */
3
 
4
#define SFRA (*((volatile unsigned short*)0x7f14))
5
unsigned short *pA = (unsigned short *) 0x7f14;
6
#define SFRB (*((volatile unsigned short*)0x7f10))
7
unsigned short *pB = (unsigned short *) 0x7f10;
8
 
9
char *
10
Do (void)
11
{
12
  if (SFRA & 0x0100)
13
    {
14
      if (SFRB & 0x0100)
15
        return "Fail";
16
      else
17
        return "Success";
18
    }
19
  else
20
    return "Fail";
21
}
22
 
23
int
24
main (void)
25
{
26
  *pA = 0xedcb;
27
  *pB = 0x1234;
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.