blob: ef8c930187dc9bee780a3b1e8681426d0441fb91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#include "linux_syscall.h"
#include "linux_console.h"
struct stuff {
signed int a : 5;
signed int b : 6;
signed int c : 2;
unsigned int d : 3;
};
static void test(void)
{
struct stuff var;
#if 0
int a, b, c, d;
a = 1;
b = 2;
c = 3;
d = 7;
var.a = a;
var.b = b;
var.c = c;
var.d = d;
a = var.a;
b = var.b;
c = var.c;
d = var.d;
print_debug(" a: ");
print_debug_hex32(a);
print_debug(" b: ");
print_debug_hex32(b);
print_debug(" c: ");
print_debug_hex32(c);
print_debug(" d: ");
print_debug_hex32(d);
#else
var.a = 1;
var.b = 2;
var.c = 3;
var.d = 7;
print_debug(" a: ");
print_debug_hex32(var.a);
print_debug(" b: ");
print_debug_hex32(var.b);
print_debug(" c: ");
print_debug_hex32(var.c);
print_debug(" d: ");
print_debug_hex32(var.d);
#endif
print_debug("\n");
_exit(0);
}
|