mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
a80b331c27
* begin work on vf support * split reg kind into reg hw kind and class, use class for ireg * try test * clang format * add some more ops and some example functions * better lvf on statics * add documentation
27 lines
551 B
C++
27 lines
551 B
C++
#pragma once
|
|
|
|
/*!
|
|
* IRegister is the Register for the Intermediate Representation.
|
|
*/
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include "goalc/emitter/Register.h"
|
|
|
|
struct IRegister {
|
|
RegClass reg_class = RegClass::INVALID;
|
|
int id = -1;
|
|
std::string to_string() const;
|
|
struct hash {
|
|
auto operator()(const IRegister& r) const { return std::hash<int>()(r.id); }
|
|
};
|
|
};
|
|
|
|
struct IRegConstraint {
|
|
IRegister ireg;
|
|
int instr_idx = -1;
|
|
bool contrain_everywhere = false;
|
|
emitter::Register desired_register;
|
|
std::string to_string() const;
|
|
};
|