Documented ExceptionType
This commit is contained in:
parent
21159d3d98
commit
cc6aab7c3f
@ -6,27 +6,26 @@ use super::{decode::{Instruction, decode}, interrupt::Interrupt};
|
||||
use super::global::*;
|
||||
use std::fs::File;
|
||||
|
||||
|
||||
/*
|
||||
* Decommenter la variant si il est utilisé quelque part
|
||||
*/
|
||||
/// Exceptions
|
||||
/// todo: is this really supposed to stand in machine.rs?
|
||||
pub enum ExceptionType {
|
||||
//Everything ok!
|
||||
/// Everything ok
|
||||
NoException,
|
||||
//SYSCALL_EXCEPTION,//A program executed a system call.
|
||||
PagefaultException,//Page fault exception
|
||||
ReadOnlyException,//Write attempted to a page marked "read-only" */
|
||||
BusErrorException,
|
||||
/* translation resulted
|
||||
in an invalid physical
|
||||
address (mis-aligned or
|
||||
out-of-bounds) */
|
||||
AddressErrorException, /* Reference that was
|
||||
not mapped in the address
|
||||
space */
|
||||
//OVERFLOW_EXCEPTION, //Integer overflow in add or sub.
|
||||
//ILLEGALINSTR_EXCEPTION, //Unimplemented or reserved instr.
|
||||
//NUM_EXCEPTION_TYPES
|
||||
/// A program executed a system call
|
||||
SyscallException,
|
||||
/// Page fault exception
|
||||
PagefaultException,
|
||||
/// Write attempted to a page marked "read-only"
|
||||
ReadOnlyException,
|
||||
/// Translation resulted in an invalid physical address (mis-aligned or out-of-bounds)
|
||||
BusErrorException,
|
||||
/// Reference which was not mapped in the address space
|
||||
AddressErrorException,
|
||||
/// Integer overflow in add or sub
|
||||
OverflowException,
|
||||
/// Unimplemented or reserved instruction
|
||||
IllegalInstrException,
|
||||
NumExceptionTypes
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user