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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [sh/] [sh2a-bld.c] - Blame information for rev 325

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

Line No. Rev Author Line
1 325 jeremybenn
/* A testcase to check generation of the following SH2A specific
2
   instructions.
3
 
4
    BLD #imm3, Rn
5
    BLD.B #imm3, @(disp12, Rn)
6
 */
7
/* { dg-do assemble {target sh*-*-*}}  */
8
/* { dg-options "-Os -mbitops" }  */
9
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" }  */
10
/* { dg-final { scan-assembler "bld"} }  */
11
/* { dg-final { scan-assembler "bld.b"} }  */
12
 
13
volatile struct
14
{
15
  union
16
  {
17
    unsigned char BYTE;
18
    struct
19
    {
20
      unsigned char BIT7:1;
21
      unsigned char BIT6:1;
22
      unsigned char BIT5:1;
23
      unsigned char BIT4:1;
24
      unsigned char BIT3:1;
25
      unsigned char BIT2:1;
26
      unsigned char BIT1:1;
27
      unsigned char BIT0:1;
28
    }
29
    BIT;
30
  }
31
  ICR0;
32
}
33
USRSTR;
34
 
35
int
36
main ()
37
{
38
  volatile unsigned char a, b, c;
39
  USRSTR.ICR0.BIT.BIT6 &= a;
40
  USRSTR.ICR0.BIT.BIT5 |= b;
41
  USRSTR.ICR0.BIT.BIT4 ^= c;
42
  return 0;
43
}

powered by: WebSVN 2.1.0

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