summaryrefslogtreecommitdiff
path: root/src/luma/device.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/luma/device.rs')
-rw-r--r--src/luma/device.rs22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/luma/device.rs b/src/luma/device.rs
index 2a0e503..7b84cf7 100644
--- a/src/luma/device.rs
+++ b/src/luma/device.rs
@@ -36,24 +36,28 @@ pub mod read;
pub mod trap;
pub mod write;
-#[allow(dead_code)]
pub enum Log {
- Branch( i32, u32),
- Continue( u32),
- Link( u32),
- Load( u8, u32, u8, i32, u32),
- MoveRegister( u8, u8, u32),
- MoveImmediate(u8, u32),
- Store( u32, u8, u8, i32, u32),
+ BranchOffset( i32, u32),
+ BranchRegister(u8, u32),
+ Continue( u32),
+ Link( u32),
+ Load( u8, u32, u8, i32, u32),
+ MoveRegister( u8, u8, u32),
+ MoveImmediate( u8, u32),
+ Store( u32, u8, u8, i32, u32),
}
-#[allow(dead_code)]
pub enum Trap {
BadAlignment( u32, u32),
InvalidOpcode(u32, u32),
OutOfBounds( u32),
}
+pub enum Branch {
+ Offset( i32, bool),
+ Register(u8),
+}
+
pub struct Device {
memory: *mut u8,
registers: [u32; 0x10],