Program loop control
AssigneeArm Limited
InventorsAlasdair GRANT, Thomas Christopher GROCUTT, Simon John CRASKE
Life of this patent
Estimating the term…
Abstract
A data processing system provides a loop-end instruction for use at the end of a program loop body specifying an address of a beginning instruction of said program loop body. Loop control circuitry (1000) serves to control repeated execution of the program loop body upon second and subsequent passes through the program loop body using loop control data provided by the loop-end instruction without requiring the loop-end instruction to be explicitly executed upon each pass.
Claims28
Apparatus for processing data comprising:
- processing circuitry to perform processing operations specified by program instructions;
- an instruction decoder to decode said program instructions to generate control signals to control said processing circuitry to perform said processing operations;
- wherein
- said instruction decoder comprises loop-end instruction decoding circuitry to decode a loop-end instruction at a finish of a program loop body to generate control signals to control said processing circuitry to store loop control data, to determine if further loop iterations are required and, if further loop iterations are required to branch to a beginning instruction of said program loop body;
- and further comprising
- loop control circuitry to determine, when enabled, if further loop iterations are required, and if further loop iterations are required, to control said processing circuitry to perform processing operations specified by program instructions of said program loop body preceding said loop-end instruction, and excluding said loop-end instruction, under control of said loop control data;
- wherein a loop count value is updated each time said program loop body is traversed to perform said processing operations specified by said program loop body, said loop counter value being indicative of the number of loop iterations remaining to be performed;
- wherein said loop counter is updated by a number of vector elements that have been processed by said traverse of said program loop body.
A method of processing data comprising:
- performing processing operations specified by program instructions;
- decoding said program instructions to generate control signals to control said performing of said processing operations;
- wherein said decoding comprises decoding a loop-end instruction at a finish of a program loop body to generate control signals to control storing of loop control data, determining if further loop iterations are required and, if further loop iterations are required, branching to a beginning instruction of said program loop body;
- and further comprising
- determining, when enabled, if further loop iterations are required, and if further loop iterations are required, controlling said performing of processing operations specified by program instructions of said program loop body preceding said loop-end instruction, and excluding said loop-end instruction, under control of said loop control data;
- wherein a loop count value is updated each time said program loop body is traversed to perform said processing operations specified by said program loop body, said loop counter value being indicative of the number of loop iterations remaining to be performed;
- wherein said loop counter is updated by a number of vector elements that have been processed by said traverse of said program loop body.
Apparatus for processing data comprising:
- processing circuitry to perform processing operations specified by program instructions;
- an instruction decoder to decode said program instructions to generate control signals to control said processing circuitry to perform said processing operations;
- wherein
- said instruction decoder comprises loop-end instruction decoding circuitry to decode a loop-end instruction at a finish of a program loop body specifying a parameter indicative of a memory address of a beginning instruction of said program loop body and to generate control signals to control said processing circuitry to determine if further loop iterations are required, and if further loop iterations are required, then to branch to said beginning instruction;
- and
- said instruction decoder comprises loop-start instruction decoding circuitry to decode a loop-start instruction preceding said beginning instruction of said program loop body to generate control signals to control said processing circuitry to store a loop count value indicative of a number of times said program loop body is to be executed;
- wherein in response to the loop-start instruction when the program loop body is to be executed zero times, the instruction decoder is configured to control the processing circuitry to branch to an instruction following the loop-end instruction or to suppress effects of instructions of said program loop body.
Dependencies are inferred from the claim text.