Renamed exceptions to follow CamlCase convention
This commit is contained in:
@ -11,16 +11,17 @@ use std::fs::File;
|
||||
* Decommenter la variant si il est utilisé quelque part
|
||||
*/
|
||||
pub enum ExceptionType {
|
||||
NO_EXCEPTION,//Everything ok!
|
||||
//Everything ok!
|
||||
NoException,
|
||||
//SYSCALL_EXCEPTION,//A program executed a system call.
|
||||
PAGEFAULT_EXCEPTION,//Page fault exception
|
||||
READONLY_EXCEPTION,//Write attempted to a page marked "read-only" */
|
||||
BUSERROR_EXCEPTION,
|
||||
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) */
|
||||
ADDRESSERROR_EXCEPTION, /* Reference that was
|
||||
AddressErrorException, /* Reference that was
|
||||
not mapped in the address
|
||||
space */
|
||||
//OVERFLOW_EXCEPTION, //Integer overflow in add or sub.
|
||||
@ -30,18 +31,15 @@ pub enum ExceptionType {
|
||||
|
||||
|
||||
pub const STACK_REG: usize = 2;
|
||||
|
||||
pub const NUM_INT_REGS: usize = 32;
|
||||
pub const NUM_FP_REGS: usize = 32;
|
||||
|
||||
//max number of physical page
|
||||
/// max number of physical pages
|
||||
pub const NUM_PHY_PAGE : u64 = 400;
|
||||
//doit etre une puissance de deux
|
||||
/// Must be 2^x
|
||||
pub const PAGE_SIZE : u64 = 128;
|
||||
//doit etre un multiple de PAGE_SIZE
|
||||
/// Must be a multiple of PAGE_SIZE
|
||||
pub const MEM_SIZE : usize = (PAGE_SIZE*NUM_PHY_PAGE*100) as usize;
|
||||
|
||||
|
||||
pub trait RegisterNum: Add<Output=Self> + Sub<Output=Self> + PartialEq + Copy {}
|
||||
|
||||
impl RegisterNum for i64 {}
|
||||
|
Reference in New Issue
Block a user