Detecting and suppressing illegal mode changes in a data processing system

2010 
Processing circuitry (2, fig. 1) is responsive to program instructions to perform data processing operations and has a plurality of modes, e.g. a multi-mode processor. Illegal change detecting circuitry (22, fig. 1) detects an attempt 48 by a program instruction to change the mode of the processing circuitry, e.g. an explicit mode change instruction or a return from exception instruction specifying a new mode. If the attempted mode change is legal 50 then it is allowed 58. If the attempted mode change is illegal 50 perhaps a change to a mode with a higher privilege level or a mode that contradicts other stored data then it is suppressed 52. An illegal change bit, indicative of an illegal attempt, is set to a predetermined value 56 and, whilst it is set to that value, the processing circuitry treats further program instructions as undefined. Preferably the illegal change bit and current mode of the processing circuitry are held in a current program status register. Preferably the illegal change bit may be saved, reset to permit exception handling and then restored on return from exception handling.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []