aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_0.c
blob: 00f4f78cc953c367c3042aea8df6ac55174c12b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
/* { dg-final { scan-assembler "mov.w r.,32532" } } */

#define SFR (*((volatile unsigned short*)0x7f14))
unsigned short *p = (unsigned short *) 0x7f14;

void
Do (void)
{
  SFR |= 0x0001;
}

int
main (void)
{
  *p = 0x1234;
  Do ();
  return (*p == 0x1235) ? 0 : 1;
}