added needed context and getting ready to implement execute
This commit is contained in:
parent
b95b2b962a
commit
69f5cdee6a
7 changed files with 115 additions and 87 deletions
|
@ -18,9 +18,9 @@ data Exception =
|
|||
| SupervisorExternalInterrupt
|
||||
| MachineExternalInterrupt
|
||||
| CounterOverflowInterrupt
|
||||
| InstructionAddressMisaligned Addr
|
||||
| InstructionAccessFault Addr
|
||||
| IllegalInstruction Insn
|
||||
| InstructionAddressMisaligned
|
||||
| InstructionAccessFault
|
||||
| IllegalInstruction {insn :: Insn}
|
||||
| Breakpoint
|
||||
| LoadAddressMisaligned
|
||||
| LoadAccessFault
|
||||
|
@ -45,8 +45,8 @@ exceptionCode MachineTimerInterrupt = 7
|
|||
exceptionCode SupervisorExternalInterrupt = 9
|
||||
exceptionCode MachineExternalInterrupt = 11
|
||||
exceptionCode CounterOverflowInterrupt = 13
|
||||
exceptionCode (InstructionAddressMisaligned _) = 0
|
||||
exceptionCode (InstructionAccessFault _) = 1
|
||||
exceptionCode InstructionAddressMisaligned = 0
|
||||
exceptionCode InstructionAccessFault = 1
|
||||
exceptionCode (IllegalInstruction _) = 2
|
||||
exceptionCode Breakpoint = 3
|
||||
exceptionCode LoadAddressMisaligned = 4
|
||||
|
@ -71,8 +71,8 @@ isSynchronousException MachineTimerInterrupt = False
|
|||
isSynchronousException SupervisorExternalInterrupt = False
|
||||
isSynchronousException MachineExternalInterrupt = False
|
||||
isSynchronousException CounterOverflowInterrupt = False
|
||||
isSynchronousException (InstructionAddressMisaligned _) = True
|
||||
isSynchronousException (InstructionAccessFault _) = True
|
||||
isSynchronousException InstructionAddressMisaligned = True
|
||||
isSynchronousException InstructionAccessFault = True
|
||||
isSynchronousException (IllegalInstruction _) = True
|
||||
isSynchronousException Breakpoint = True
|
||||
isSynchronousException LoadAddressMisaligned = True
|
||||
|
|
Reference in a new issue