first try of registry allocation
This commit is contained in:
24
src/main.cpp
24
src/main.cpp
@@ -1,11 +1,11 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <print>
|
||||
#include "lexer.hpp"
|
||||
#include "ast.hpp"
|
||||
#include "ir.hpp"
|
||||
#include "parser/lexer.hpp"
|
||||
#include "parser/ast.hpp"
|
||||
#include "ir/ir.hpp"
|
||||
|
||||
#include "codegens/fasm_stack.hpp"
|
||||
#include "codegen/fasm_stack.hpp"
|
||||
|
||||
void dump_tokens(const char* filename, Lexer* lexer)
|
||||
{
|
||||
@@ -50,16 +50,16 @@ int main(int argc, char** argv)
|
||||
|
||||
auto ops = irBuilder.Build();
|
||||
|
||||
// printf("; ------ IR ------\n");
|
||||
// for (size_t i = 0; i < ops.size; ++i)
|
||||
// {
|
||||
// printf("; %s\n", ops.data[i]->Format(0).c_str());
|
||||
// }
|
||||
// printf("; ------ IR ------\n");
|
||||
for (size_t i = 0; i < ops.size; ++i)
|
||||
{
|
||||
printf("%s\n", ops.data[i]->Format(0).c_str());
|
||||
}
|
||||
|
||||
StackFasmX86_64Generator gen;
|
||||
// StackFasmX86_64Generator gen;
|
||||
|
||||
gen.Generate(filename, ops);
|
||||
// gen.Generate(filename, ops);
|
||||
|
||||
// printf("%s\n", gen.GetOutput().c_str());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user