aboutsummaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test66.c
blob: 5857855700a1116714abb6c248f0826b3f70780e (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
typedef unsigned char uint8_t;
static unsigned int generate_row(uint8_t row, uint8_t maxnodes)
{
	 
	unsigned int ret=0x00010101;  
	static const unsigned int rows_2p[2][2] = {
		{ 0x00050101, 0x00010404 },
		{ 0x00010404, 0x00050101 }
	};
	if(maxnodes>2) {
		maxnodes=2;
	}
	if (row < maxnodes) {
		ret=rows_2p[0][row];
	}
	return ret;
}

static void setup_node(void)
{
	unsigned char row;
	for(row=0; row< 2; row++) {
		__builtin_outl(generate_row(row, 2), 0x1234);
	}
}