diff --git a/hbvm/src/main.rs b/hbvm/src/main.rs index 3eac6c7..a311ff0 100644 --- a/hbvm/src/main.rs +++ b/hbvm/src/main.rs @@ -1,5 +1,5 @@ use { - hbvm::{validate::validate, vm::Vm, RuntimeErrors}, + hbvm::{validate::validate, vm::Vm}, std::io::{stdin, Read}, }; diff --git a/hbvm/src/vm/mod.rs b/hbvm/src/vm/mod.rs index 93b1bdf..1798b4e 100644 --- a/hbvm/src/vm/mod.rs +++ b/hbvm/src/vm/mod.rs @@ -4,8 +4,12 @@ // # General safety notice: // - Validation has to assure there is 60 registers (r0 - r59) -// - Instructions has to be valid as specified (values and sizes) +// - Instructions have to be valid as specified (values and sizes) // - Mapped pages should be at least 8 KiB +// - Yes, I am aware of the UB when jumping in-mid of instruction where +// the read byte corresponds to an instruction whose lenght exceets the +// program size. If you are (rightfully) worried about the UB, for now just +// append your program with 11 zeroes. mod mem; mod value;