Eric Biederman | 9008960 | 2004-05-28 14:11:54 +0000 | [diff] [blame] | 1 | struct stuff { |
2 | signed int a : 5; | ||||
3 | signed int b : 6; | ||||
4 | signed int c : 2; | ||||
5 | unsigned int d : 3; | ||||
6 | }; | ||||
7 | |||||
8 | static void main(void) | ||||
9 | { | ||||
10 | struct stuff var; | ||||
11 | volatile int a, b, c, d; | ||||
12 | a = 1; | ||||
13 | b = 2; | ||||
14 | c = 3; | ||||
15 | d = 7; | ||||
16 | |||||
17 | var.a = a; | ||||
18 | var.b = b; | ||||
19 | var.c = c; | ||||
20 | var.d = d; | ||||
21 | |||||
22 | a = var.a; | ||||
23 | b = var.b; | ||||
24 | c = var.c; | ||||
25 | d = var.d; | ||||
26 | |||||
27 | asm(" " :: "r"(a), "r"(b), "r"(c), "r"(d)); | ||||
28 | } |