EXCEPTION SYSTEM (initial version - may change later)
This commit is contained in:
30
src/exceptions.rs
Normal file
30
src/exceptions.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright (c) 2025 taitep
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
// This file is part of TRVE (https://gitea.taitep.se/taitep/trve)
|
||||
// See LICENSE file in the project root for full license text.
|
||||
|
||||
use int_enum::IntEnum;
|
||||
|
||||
#[repr(u8)]
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, IntEnum)]
|
||||
pub enum ExceptionType {
|
||||
InstructionAccessMisaligned = 0,
|
||||
InstructionAccessFault = 1,
|
||||
IllegalInstruction = 2,
|
||||
Breakpoint = 3,
|
||||
LoadAddressMisaligned = 4,
|
||||
LoadAccessFault = 5,
|
||||
StoreAmoAddressMisaligned = 6,
|
||||
StoreAmoAccessFault = 7,
|
||||
EnvironmentCallFromUMode = 8,
|
||||
EnvironmentCallFromSMode = 9,
|
||||
EnvironmentCallFromMMode = 11,
|
||||
InstructionPageFault = 12,
|
||||
LoadPageFault = 13,
|
||||
StoreAmoPageFault = 15,
|
||||
DoubleTrap = 16,
|
||||
SoftwareCheck = 18,
|
||||
HardwareError = 19,
|
||||
}
|
||||
Reference in New Issue
Block a user