Two modes for executing branch instructions of different lengths and use of branch control instruction and register set loaded with target instructions
AssigneeHitachi, Ltd.
InventorsSivaram Krishnan, Sebastian Havluj Ziesler
Life of this patent
Estimating the term…
Abstract
A processor and accompanying program are disclosed which utilize branch control instructions in cooperation with branch instructions to reduce branch latency. The branch control instruction and branch instruction have a format/structure that is designed to execute flexibly and efficiently by making use of separate dedicated target address and target branch instruction register sets used by a pipeline within the processor.
Claims20
A processor comprising:
- a plurality of dedicated address registers for storing a plurality of different branch target addresses;
- and
- an instruction decoder decoding an instruction supplied thereto and providing control signals according to results of said decoding;
- and
- an execution unit responsive to the control signals and executing said instruction;
- wherein said instruction can include:
- 1) a first instruction including an operation code field defining a branch control operation;
- and an address field used for calculating a branch target address for a branch, and a first register selection field for specifying one of said plurality of dedicated address registers in which said branch target address is to be stored after it is calculated;
- and
- 2) a second instruction including an operation code field defining a branch operation, a second register selection field for specifying one of said plurality of dedicated address registers that stores said branch target address to be used for the branch operation, and a branch condition field for specifying a branch condition to be evaluated in determining whether said branch should be taken;
- wherein said second instruction includes a first length instruction n bits in length, and a second length instruction whose length is 2n bits;
- and
- wherein execution by the processor of said first instruction and said second instruction is arranged so as to reduce latency for handling said branch operation, and such that resolution of said branch condition is performed during execution of said second instruction;
- and
- further wherein the microprocessor operates with a first mode for executing said first length instruction and a second mode for executing said second length instruction.
A computer program adapted to be executed on a computing machine having a first loadable dedicated register set for storing a plurality of branch target instruction addresses, and a second loadable dedicated register set for storing a plurality of branch target instructions, the computer program comprising:
- a set of instructions adapted to be executed on the computing machine, said instructions including:
- 1) a first instruction including an operation code field defining a branch control operation, and an address field used for calculating a branch target address for a program branch, and a first register selection field for specifying a register in the first loadable dedicated register set for storing said branch target address as one of the plurality of branch target instruction addresses;
- and
- 2) a second instruction including an operation code field defining a program branch, and a second register selection field for identifying said register in the first loadable dedicated register set so that said branch target address can be read from such register and used to locate a branch target instruction from the plurality of branch target instructions stored in the second loadable dedicated register set when said program branch is taken.
Dependencies are inferred from the claim text.