From 9502f9ffabc5ec8f423974bd89da3d9810e4df80 Mon Sep 17 00:00:00 2001 From: Alastair Reid Date: Tue, 3 Jul 2018 14:00:22 +0100 Subject: Main: fix SEE handling If a SEE exception is not caught within the decoder, it is an error in the Sail implementation or in the instruction set spec. This change ensures that we promptly detect and unambiguously report such errors. --- aarch64/elfmain.sail | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'aarch64') diff --git a/aarch64/elfmain.sail b/aarch64/elfmain.sail index bccbbda5..44b6c14a 100644 --- a/aarch64/elfmain.sail +++ b/aarch64/elfmain.sail @@ -107,7 +107,12 @@ function Step_CPU() = { } catch { // note: if supporting AArch32 as well, call _UndefinedFault() instead Error_Undefined() => try { AArch64_UndefinedFault() } catch { _ => print("Exception during Undefined recovery\n") }, - Error_See(_) => try { AArch64_UndefinedFault() } catch { _ => print("Exception during SEE recovery\n") }, + Error_See(_) => { + print(concat_str("BROKEN: SEE support ", + concat_str(HexStr(UInt(__currentInstr)), + "\n"))); + exit() + }, Error_ReservedEncoding(_) => try { AArch64_UndefinedFault() } catch { _ => print("Exception during ReservedEncoding recovery\n") }, Error_ExceptionTaken() => { print(concat_str("ExceptionTaken during Decode/Execute from PC=", -- cgit v1.2.3