Print numbers with multiple digits

This commit is contained in:
2024-09-27 00:22:44 +02:00
parent 8eaeb5afa3
commit f26424acfb
9 changed files with 73 additions and 27 deletions

12
TODO
View File

@ -1,8 +1,12 @@
# Intermediate code generation
- Calculate maximum number of arguments that a function can have. Put procedure
arguments onto the stack, above the stack pointer. Should the offsets be
calculated during IR generation or target code generation?
- All procedure calls a generated with a single arguments. To support more
arguments they should be put onto the stack, above the stack pointer.
The stack can grow on demand and then be cleaned up (the call instruction
contains the number of arguments, so the stack size can be reduced), or the
function with most arguments can be found and the stack size allocated.
To access the arguments inside a procedure, the information about argument
names should be kept somewhere.
# ELF generation
@ -16,4 +20,4 @@
# Built-in
Printi should be able to print numbers with multiple digits.
Printi should print a sign for negative numbers.