aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 1bb58751ccb6af195e0ff206553c7e8cebaf6926 (plain) (blame)
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
# Byte code generator

Separate project for now, but essentially create a program that takes some input
(for example)
```
addr(_GGG_)
{
	R0 = R1 + R2;
	return NEXT_INSN;
}

addi(_GGi_)
{
	R0 = R1 + IMM;
	return NEXT_INSN;
}

beqi(RGi__)
{
	if (R0 == IMM)
		return BRANCH;

	return NEXT_INSN;
}
```

and generates implementations with registers fixed and some kind of muxing
compilation functions that selects the correct implementation from some runtime
`compile_addr(1, 2, 3);`.