mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
90e5c023f1
* basic inline assembly support * fix rlet * clean up detail in IR and update documentation
23 lines
809 B
C++
23 lines
809 B
C++
#include "third-party/fmt/core.h"
|
|
#include "IRegister.h"
|
|
|
|
std::string IRegister::to_string() const {
|
|
// if (with_constraints) {
|
|
// std::string result = fmt::format("i{}-{}\n", emitter::to_string(kind), id);
|
|
// for (const auto& x : constraints) {
|
|
// result += fmt::format(" [{:3d] in {}\n", x.instr_idx,
|
|
// emitter::gRegInfo.get_info(x.desired_register).name);
|
|
// }
|
|
// return result;
|
|
// } else {
|
|
return fmt::format("i{}-{}", emitter::to_string(kind), id);
|
|
// }
|
|
}
|
|
|
|
std::string IRegConstraint::to_string() const {
|
|
if (contrain_everywhere) {
|
|
return fmt::format("[all] {} in {}", ireg.to_string(), desired_register.print());
|
|
} else {
|
|
return fmt::format("[{:3d}] {} in {}", instr_idx, ireg.to_string(), desired_register.print());
|
|
}
|
|
} |