diff options
Diffstat (limited to 'src/exceptions.rs')
| -rw-r--r-- | src/exceptions.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/exceptions.rs b/src/exceptions.rs new file mode 100644 index 0000000..2929d65 --- /dev/null +++ b/src/exceptions.rs @@ -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, +} |
