-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes
More file actions
33 lines (27 loc) · 779 Bytes
/
notes
File metadata and controls
33 lines (27 loc) · 779 Bytes
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
kw := _kw_
id := l(l|d)*
op := op
cnst := dd*.dd* | ' '
str_lit := " "
punc := punc
add ponters, typeof, sizeof
*cring^*
left = blue
right = red
calling convention:
args throw the stack
return value on top of the args
flags:
--ast-dump=<file_name>
--ir-dump=<file_name>
--asm_dump=<file_name> -S
--march=<arch_name> -m
--exe-name -o
--source-file -c
--skip-frontend
--skip-middleend
--skip-backend
./tlang_compiler --source-file=examples/factorial2_0.tlang --ir-dump=dump_ir --ast-dump=dump_tree.dot --asm-dump=dump.asm --march=x86-64 --exe-name=my_prog 2>log
./tlang_compiler --source-file=examples/factorial.tlang --asm-dump=dump.asm --march=x86-64 2>log
nasm dump.asm -f elf64 -o my_prog.o
ld -o my_prog my_prog.o -g