internal TETBExceptionVector MapToExceptionVector(uint aAddress) { System.Diagnostics.Debug.Assert(IsExceptionVector(aAddress)); // TETBExceptionVector ret = TETBExceptionVector.EUndefinedInstruction; // uint baseAddress = (uint)ExceptionVectorLocation; uint delta = aAddress - baseAddress; switch (delta) { case (uint)TETBExceptionVector.EReset: case (uint)TETBExceptionVector.EUndefinedInstruction: case (uint)TETBExceptionVector.ESWI: case (uint)TETBExceptionVector.EPrefetchAbort: case (uint)TETBExceptionVector.EDataAbort: case (uint)TETBExceptionVector.EIRQ: case (uint)TETBExceptionVector.EFIQ: ret = (TETBExceptionVector)delta; break; default: throw new NotSupportedException("Specified address is an unsupported vector location"); break; } // return(ret); }
public void SetExceptionVector(TETBExceptionVector aVector, uint aInstruction) { if (!iExceptionVectors.ContainsKey(aVector)) { iExceptionVectors.Add(aVector, aInstruction); } else { iExceptionVectors[aVector] = aInstruction; } }
internal uint GetExceptionVector(TETBExceptionVector aVector) { uint ret = iExceptionVectors[aVector]; return(ret); }