摘要 |
The present invention provides a system and method for locking source registers in a data processing apparatus. The data processing apparatus comprises a processing unit having a pipeline for executing a sequence of instructions, and a set of source registers for storing source data required by the processing unit when executing instructions in the sequence. A locking mechanism is then used to lock source registers dependent on configurable criteria, the configurable criteria being chosen to ensure that source registers still required for completing execution of an instruction in the pipeline are locked to prevent predetermined types of access by a subsequent instruction, the subsequent instruction only being able to enter the pipeline if the source registers relevant to that instruction can be accessed as required by the instruction. In accordance with the present invention, the processing unit has a first and second mode of operation. In the first mode of operation, the processing unit is arranged, upon determination of one or more exception conditions during execution of an instruction, to invoke a process external to the pipelined execution unit to enable execution of the instruction to be completed. In contrast, in the second mode of operation, the processing unit is arranged to complete execution of an instruction within the pipeline even if the presence of the one or more exception conditions is determined. A locking mechanism is then arranged to alter the configurable criteria dependent upon the mode of operation of the processing unit, such that a reduction in the number of source registers being locked can be achieved in the second mode of operation. This then enables the processing speed of the processing unit to be significantly improved when running in the second mode of operation. |