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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr40493.c] - Blame information for rev 717

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

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
 
3
typedef union i386_operand_type
4
{
5
  struct
6
    {
7
      unsigned int reg8:1;
8
      unsigned int reg16:1;
9
      unsigned int reg32:1;
10
      unsigned int reg64:1;
11
      unsigned int floatreg:1;
12
      unsigned int regmmx:1;
13
      unsigned int regxmm:1;
14
      unsigned int regymm:1;
15
      unsigned int control:1;
16
      unsigned int debug:1;
17
      unsigned int test:1;
18
      unsigned int sreg2:1;
19
      unsigned int sreg3:1;
20
      unsigned int imm1:1;
21
      unsigned int imm8:1;
22
      unsigned int imm8s:1;
23
      unsigned int imm16:1;
24
      unsigned int imm32:1;
25
      unsigned int imm32s:1;
26
      unsigned int imm64:1;
27
      unsigned int disp8:1;
28
      unsigned int disp16:1;
29
      unsigned int disp32:1;
30
      unsigned int disp32s:1;
31
      unsigned int disp64:1;
32
      unsigned int acc:1;
33
      unsigned int floatacc:1;
34
      unsigned int baseindex:1;
35
      unsigned int inoutportreg:1;
36
      unsigned int shiftcount:1;
37
      unsigned int jumpabsolute:1;
38
      unsigned int esseg:1;
39
      unsigned int regmem:1;
40
      unsigned int mem:1;
41
      unsigned int byte:1;
42
      unsigned int word:1;
43
      unsigned int dword:1;
44
      unsigned int fword:1;
45
      unsigned int qword:1;
46
      unsigned int tbyte:1;
47
      unsigned int xmmword:1;
48
      unsigned int ymmword:1;
49
      unsigned int unspecified:1;
50
      unsigned int anysize:1;
51
    } bitfield;
52
  unsigned int array[2];
53
} i386_operand_type;
54
 
55
unsigned int x00, x01, y00, y01;
56
 
57
int main (int argc, char *argv[])
58
{
59
  i386_operand_type a,b,c,d;
60
 
61
  a.bitfield.reg16 = 1;
62
  a.bitfield.imm16 = 0;
63
  a.array[1] = 22;
64
 
65
  b = a;
66
  x00 = b.array[0];
67
  x01 = b.array[1];
68
 
69
  c = b;
70
  y00 = c.array[0];
71
  y01 = c.array[1];
72
 
73
  d = c;
74
  if (d.bitfield.reg16 != 1)
75
    abort();
76
  if (d.bitfield.imm16 != 0)
77
    abort();
78
  if (d.array[1] != 22)
79
    abort();
80
 
81
  return 0;
82
}

powered by: WebSVN 2.1.0

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