Initial commit

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-01-25 19:17:39 -05:00
commit ddfcec0427
20 changed files with 1561 additions and 0 deletions

83
src/vm/reg.rs Normal file
View File

@@ -0,0 +1,83 @@
#[repr(u8)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[allow(dead_code)]
pub enum Reg {
// https://crates.io/crates/packed_struct
// TODO : check this muffugin shit out!!
/// Instruction pointer
Ip = 0,
/// Stack pointer
Sp,
/// Frame pointer
Fp,
/// Flags
Flags,
Unused00,
Unused01,
Unused02,
Unused03,
Unused04,
Unused05,
Unused06,
Unused07,
Unused08,
/// General status code
Status,
R00,
R01,
R02,
R03,
R04,
R05,
R06,
R07,
R08,
R09,
R10,
R11,
R12,
R13,
R14,
R15,
R16,
R17,
R18,
R19,
R20,
R21,
R22,
R23,
R24,
R25,
R26,
R27,
R28,
R29,
R30,
R31,
R32,
R33,
R34,
R35,
R36,
R37,
R38,
R39,
R40,
R41,
R42,
R43,
R44,
R45,
R46,
R47,
R48,
R49,
}