xref: /dragonfly/sys/sys/ibaa.h (revision a1626531)
1 
2 #define ALPHA		(8)
3 #define SIZE		(1 << ALPHA)
4 #define MASK		(SIZE - 1)
5 #define ind(x)		((x) & (SIZE - 1))
6 #define barrel(a)	(((a) << 20) ^ ((a) >> 12))  /* beta=32,shift=20 */
7 
8 struct ibaa_state {
9 	uint32_t	IBAA_memory[SIZE];
10 	uint32_t	IBAA_results[SIZE];
11 	uint32_t	IBAA_aa;
12 	uint32_t	IBAA_bb;
13 	uint32_t	IBAA_counter;
14 	int		IBAA_byte_index;
15 	int		memIndex;
16 };
17 
18 #define L15_STATE_SIZE  256
19 
20 struct l15_state {
21 	uint8_t		L15_x;
22 	uint8_t		L15_y;
23 	uint8_t		L15_start_x;
24 	uint8_t		L15_state[L15_STATE_SIZE];
25 	uint8_t		stateIndex;
26 };
27