Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void SetExceptionVector(TETBExceptionVector aVector, uint aInstruction)
 {
     if (!iExceptionVectors.ContainsKey(aVector))
     {
         iExceptionVectors.Add(aVector, aInstruction);
     }
     else
     {
         iExceptionVectors[aVector] = aInstruction;
     }
 }
Exemplo n.º 3
0
        internal uint GetExceptionVector(TETBExceptionVector aVector)
        {
            uint ret = iExceptionVectors[aVector];

            return(ret);
        }