Documented ExceptionType

This commit is contained in:
François Autin 2023-03-23 20:58:10 +01:00
parent 21159d3d98
commit cc6aab7c3f
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C

View File

@ -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" */
/// 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,
/* 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
/// Reference which was not mapped in the address space
AddressErrorException,
/// Integer overflow in add or sub
OverflowException,
/// Unimplemented or reserved instruction
IllegalInstrException,
NumExceptionTypes
}