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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [sh/] [sh2a-bsetmem.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Testcase to check generation of a SH2A specific instruction
2
   "BSET #imm3,@(disp12,Rn)".  */
3
/* { dg-do assemble {target sh*-*-*}}  */
4
/* { dg-options "-O2 -mbitops" }  */
5
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" }  */
6
/* { dg-final { scan-assembler "bset"} }  */
7
/* { dg-final { scan-assembler "bset.b"} }  */
8
 
9
volatile union un_paddr
10
{
11
  unsigned char BYTE;
12
  struct
13
  {
14
    unsigned char B15:1;
15
    unsigned char B14:1;
16
    unsigned char B13:1;
17
    unsigned char B12:1;
18
    unsigned char B11:1;
19
    unsigned char B10:1;
20
    unsigned char B9:1;
21
    unsigned char B8:1;
22
    unsigned char B7:1;
23
    unsigned char B6:1;
24
    unsigned char B5:1;
25
    unsigned char B4:1;
26
    unsigned char B3:1;
27
    unsigned char B2:1;
28
    unsigned char B1:1;
29
    unsigned char B0:1;
30
  }
31
  BIT;
32
}
33
PADDR;
34
 
35
int
36
main ()
37
{
38
  PADDR.BIT.B0 = 1;
39
  PADDR.BIT.B3 = 1;
40
  PADDR.BIT.B6 = 1;
41
 
42
  PADDR.BIT.B1 |= 1;
43
  PADDR.BIT.B4 |= 1;
44
  PADDR.BIT.B7 |= 1;
45
 
46
  PADDR.BIT.B10 = 1;
47
  PADDR.BIT.B13 = 1;
48
  PADDR.BIT.B15 = 1;
49
 
50
  PADDR.BIT.B9  |= 1;
51
  PADDR.BIT.B12 |= 1;
52
  PADDR.BIT.B14 |= 1;
53
 
54
  return 0;
55
}

powered by: WebSVN 2.1.0

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