Skip to content

Commit

Permalink
Update mir
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokathor authored Dec 31, 2024
1 parent 6e266cf commit d314aff
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ pub enum Mir {
///
/// * if necessary, you can tell if it was break or continue by the tail of
/// the label it targets.
Jump(MirJump),
JumpLabel(StrID),

/// Jump to the address stored in HL.
JumpHL,

/// call to another function
///
Expand Down Expand Up @@ -48,6 +51,18 @@ pub enum Mir {

/// `[reg16] = a`
AssignReg16tA(Reg16),

/// `a = [imm16]`
AssignAImm16t(u16),

/// `[imm16] = a`
AssignImm16tA(u16),

/// `reg8 = imm8`
AssignReg8Imm8(Reg8, u8),

/// `reg16 = imm16`
AssignReg16Imm16(Reg16, u16),
}

#[derive(Debug, Clone)]
Expand All @@ -63,11 +78,6 @@ pub struct MirIf {
pub canonical_name: StrID,
}

#[derive(Debug, Clone, Copy)]
pub struct MirJump {
pub target: StrID,
}

#[derive(Debug, Clone, Copy)]
pub struct MirCall {
pub target: StrID,
Expand Down

0 comments on commit d314aff

Please sign in to comment.