blob: 40d6de116f0be3389c3969ce33d9c8019d884e1d (
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
|
# Intermediate code generation
- To access named parameters and local variables inside a procedure, IR should
be able to reference them. During the generation the needed information (e.g.
offsets or registers) can be extracted from the symbol table and saved in the
operands.
# ELF generation
- Don't ignore relocations where the symbol is not defined in the symbol table.
Report an error about an undefined symbol.
- JumpLabels inside functions are encoded as functions. Distinguish between
labels (e.g. .A0 or .L0) and global functions. Lables are NOTYPE LOCAL.
- Sort the symbols so that local symbols come first. Some table header had a
number specifiying the index of the first non-local symbol. Adjust that number.
# Name analysis
- Format error messages.
- Return non-zero error code on errors.
# Register allocation
- Each temporary variales gets a tn register where n is the variable index. If
there more variables the allocation will fail with out of bounds runtime
error. Implement spill over.
# Prarsing and abstract syntax tree
- Parse signed hexadecimal numbers.
# Other
- Type analysis.
- Generate a call to _divide_by_zero_error on RiscV.
|