summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test84.c
blob: bc98bf3419a3e3bf401241f93fae62597f837052 (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
struct stuff {
	signed int   a : 5;
	signed int   b : 6;
	signed int   c : 2;
	unsigned int d : 3;
};

static void main(void)
{
	struct stuff var;
	volatile 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;

	asm(" " :: "r"(a), "r"(b), "r"(c), "r"(d));
}