From 313c004c1829700697ea2fe1281cc1f7afe5904a Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Fri, 27 Jul 2018 16:29:40 +0100 Subject: Check in snapshot of cheri latex --- cheri/sail_latex/sailfnExceptionCode.tex | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cheri/sail_latex/sailfnExceptionCode.tex (limited to 'cheri/sail_latex/sailfnExceptionCode.tex') diff --git a/cheri/sail_latex/sailfnExceptionCode.tex b/cheri/sail_latex/sailfnExceptionCode.tex new file mode 100644 index 00000000..b34ab2ab --- /dev/null +++ b/cheri/sail_latex/sailfnExceptionCode.tex @@ -0,0 +1,23 @@ +function #\hyperref[zExceptionCode]{ExceptionCode}# (ex) : Exception -> #\hyperref[zbits]{bits}#(5)= + let x : #\hyperref[zbits]{bits}#(8) = match ex + { + Interrupt => 0x00, /* Interrupt */ + TLBMod => 0x01, /* TLB modification exception */ + TLBL => 0x02, /* TLB #\hyperref[zexception]{exception}# (load or fetch) */ + TLBS => 0x03, /* TLB #\hyperref[zexception]{exception}# (store) */ + AdEL => 0x04, /* Address #\hyperref[zerror]{error}# (load or fetch) */ + AdES => 0x05, /* Address #\hyperref[zerror]{error}# (store) */ + Sys => 0x08, /* Syscall */ + Bp => 0x09, /* Breakpoint */ + ResI => 0x0a, /* Reserved instruction */ + CpU => 0x0b, /* Coprocessor Unusable */ + Ov => 0x0c, /* Arithmetic overflow */ + Tr => 0x0d, /* Trap */ + C2E => 0x12, /* C2E coprocessor 2 exception */ + C2Trap => 0x12, /* C2Trap maps to same exception code, different vector */ + XTLBRefillL => 0x02, + XTLBRefillS => 0x03, + XTLBInvL => 0x02, + XTLBInvS => 0x03, + MCheck => 0x18 + } in x[4..0] -- cgit v1.2.3