trudging through the snow
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
use crate::{compiler::arch::riscv::*, ir::UIdent};
|
||||
use std::fmt::Debug;
|
||||
|
||||
pub type RV64Instruction = LinkerInstruction<RegRef, UIdent>;
|
||||
use crate::{compiler::arch::riscv::*, ir::IdentID};
|
||||
|
||||
pub type RV64Instruction<V = IdentID> = LinkerInstruction<RegRef<V>, V>;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum RegRef {
|
||||
Var(UIdent),
|
||||
Reg(Reg),
|
||||
pub enum RegRef<V = IdentID, R = Reg> {
|
||||
Var(V),
|
||||
Reg(R),
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for RegRef {
|
||||
impl<V: Debug, R: Debug> Debug for RegRef<V, R> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Var(v) => write!(f, "{{{:?}}}", v),
|
||||
@@ -16,4 +18,3 @@ impl std::fmt::Debug for RegRef {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user