Compare commits

..

2 Commits

Author SHA1 Message Date
c506c2159c feat: produce IR into assembly 2025-11-30 22:11:47 +01:00
2a34d0094c feat: todo + better assertion message 2025-11-30 22:11:35 +01:00
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,7 @@
// TODO: store all of values, allocated registers, stack offsets in single allocator
// to be able to find out which kind a specific temp register represent
#pragma once
#include <cstddef>
#include "string.hpp"
@ -130,7 +134,7 @@ public:
}
}
assert(0 && "could not resolve const under specified address");
assert(0 && "could not resolve register for specified address");
}
void Clear()

View File

@ -49,11 +49,12 @@ int main(int argc, char** argv)
auto ops = irBuilder.Build();
// printf("\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());
}
printf("; ------ IR ------\n");
StackFasmX86_64Generator gen;