feat: abstract value for IR

This commit is contained in:
2025-12-24 18:59:44 +01:00
parent e5d912b28e
commit e8a496d070
3 changed files with 65 additions and 42 deletions

View File

@@ -2,15 +2,16 @@
#include "codegen/codegen.hpp"
#include "ir/slot.hpp"
#include "ir/value.hpp"
class StackFasmX86_64Generator : public CodeGenerator
{
public:
~StackFasmX86_64Generator() override = default;
private:
StringView GetTempAddr(IR::Tmp reg)
StringView GetTempAddr(IR::Value reg)
{
return std::move((StringBuilder() << 't' << reg).view());
return std::move((StringBuilder() << reg.Format()).view());
}
StringView GetSlotAddr(const IR::IRSlot& slot)