Folkert
55cb780249
don't clone Layout
2021-03-22 14:08:48 +01:00
Brendan Hansknecht
7d24d51392
gen_dev: generate and link zig builtins.
2021-02-14 18:15:00 -08:00
Brendan Hansknecht
a783be3332
gen_dev: add switch statements. This also fixes a small bug with comparisons.
2021-02-13 15:35:55 -08:00
Brendan Hansknecht
c609df2d74
gen_dev: generate all functions they may be need if a function pointer is used
2021-02-12 19:42:08 -08:00
Brendan Hansknecht
95be1a1b6d
gen_dev: add ability to pass arguments to functions
2021-02-12 19:32:34 -08:00
Brendan Hansknecht
5a3ec0c0ac
Switch to base pionter offset addressing.
...
This change will be needed to deal with passing function arguments.
Without this change, we would need to do multiple passes due to function
arguments being on top of the stack and conflicting with variables.
2021-02-12 17:02:25 -08:00
Brendan Hansknecht
846c82961f
gen_dev: add basic function support
2021-02-10 22:38:58 -08:00
Folkert
55eff1dba1
fix oversights
2021-01-28 15:32:22 +01:00
Folkert
936bf459eb
initial version of rc optimization
2021-01-28 13:14:54 +01:00
Richard Feldman
427ff12950
Merge branch 'trunk' into dev-backend
2021-01-25 00:56:14 -05:00
Brendan Hansknecht
5cabdd83b0
Merge remote-tracking branch 'origin/trunk' into dev-backend
2021-01-21 21:01:10 -08:00
Folkert
15cbadf652
add inc field to Inc instruction
2021-01-22 00:16:20 +01:00
Brendan Hansknecht
244113ede2
Add floating point addition
2021-01-19 15:25:21 -08:00
Sébastien Besnier
1ee2c7a40f
add equality testing in gen_dev
2021-01-19 15:08:03 +01:00
Brendan Hansknecht
7f8511532a
Add floats to the dev backend
2021-01-18 12:07:47 -08:00
Sébastien Besnier
85f146c688
fix extra space in comment
2021-01-14 07:59:26 +01:00
Sébastien Besnier
dfed317f8e
add x86_64 subtraction support for gen_dev
2021-01-13 20:56:33 +01:00
Folkert
78f653b85c
fix typo
2021-01-07 23:19:17 +01:00
Folkert
6e0f57d7eb
make invoke work
2021-01-02 00:55:09 +01:00
Folkert
6eb8684c2b
basic implementation of invoke for gen_dev
2021-01-01 20:27:08 +01:00
Folkert
5a6bd1e187
fix gen_dev
2021-01-01 16:20:27 +01:00
Folkert
6bc0cf33a5
add unreachable instruction to the mono IR
2021-01-01 02:26:56 +01:00
Folkert
288190281b
remove Cond from gen_dev
2020-12-31 21:03:58 +01:00
Anton-4
b085469602
Replaced large_enum_variant explanation with link to issue #800
2020-12-14 16:09:16 +01:00
Brendan Hansknecht
09410d7a02
Rename ret_near to ret and temporarily allow dead relocations
2020-11-23 22:09:44 -08:00
Brendan Hansknecht
67c104d506
Nit clippy stuff
2020-11-23 00:17:57 -08:00
Brendan Hansknecht
3430a08d3d
Major refactor for generic 64 bit with traits
2020-11-23 00:16:42 -08:00
Brendan Hansknecht
215ec63abb
Fix some nit clippy complaints
2020-11-22 13:46:12 -08:00
Brendan Hansknecht
7fd7407724
Add lazy literal loading optimization
2020-11-22 13:44:38 -08:00
Brendan Hansknecht
902bbef60a
Add storing variables in the stack
2020-11-22 12:48:09 -08:00
Brendan Hansknecht
1156e4f108
Some reorganization and removal of unneeded layout
2020-11-21 18:04:57 -08:00
Brendan Hansknecht
4b3926be50
Add Num.add as inlined function
2020-11-21 00:08:12 -08:00
Brendan Hansknecht
65d6d64102
Fix symbol lifetime
2020-11-20 23:37:50 -08:00
Brendan Hansknecht
13781a6f8f
Add Num.abs as inlined function
2020-11-20 23:04:35 -08:00
Brendan Hansknecht
6da6faa35f
Rename Register to GPReg and add return regs to backend
2020-11-20 17:17:04 -08:00
Brendan Hansknecht
65e14f2941
Add Reuse and Reset to last seen map
2020-11-19 12:12:42 -08:00
Brendan Hansknecht
2b6039d683
Fix error propagation
2020-11-18 23:10:55 -08:00
Brendan Hansknecht
4e973b9236
Mixed refactoring
...
Add error return value as opposed to using panic! and unimplemented!
Reorder some functions
Return relocations
Scan ast for variable lifetimes
Probably put too much into this cl, but it would be annoying to change
at this piont.
2020-11-18 23:07:41 -08:00
Brendan Hansknecht
35fd54b8fd
Define basics of x86_64 calling conventions
2020-11-16 23:37:02 -08:00
Brendan Hansknecht
0fcb1df344
Refactor x86_64 backend and add first assembly methods
2020-11-15 20:43:14 -08:00
Brendan Hansknecht
a8986087f9
Add ability to return int literals
2020-11-15 14:06:20 -08:00
Brendan Hansknecht
86c3c0a409
Add base structure for dev compiler backend
...
Currently we only generate a single static function, but it is probably
loaded and run with jit. This is the base to start generating proper
code.
2020-11-14 18:43:02 -08:00