Major branch instructions
AssigneeInternational Business Machines Corporation
InventorsFadi Y. Busaba, Steven R. Carlough, Christopher A. Krygowski, Brian R. Prasky, Chung-Lung K. Shum
Life of this patent
Estimating the term…
Abstract
Major branch instructions are provided that enable execution of a computer program to branch from one segment of code to another segment of code. These instructions also create a new stream of processing at the other segment of code enabling execution of the other segment of code to be performed in parallel with the segment of code from which the branch was taken. In one example, the other stream of processing starts a transaction for processing instructions of the other stream of processing.
Claims14
A method of executing a machine instruction, the method comprising:
- obtaining, by a processor, a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising:
- at least one opcode field for specifying an opcode, the opcode defining a branch operation;
- a type indication to specify a type of the branch operation, wherein the type indication specifies how the branch operation is to be processed in this execution of the machine instruction, wherein in another execution of the same branch operation it is processed differently, and wherein the type indication is configured to specify the following types of execution:
- a minor branch in which the machine instruction is executed in a first stream of processing and the branch operation does not cause a second stream of processing to be started, a major branch open in which the machine instruction is executed in the first stream of processing and the branch operation causes the second stream of processing to be started, and a major branch close in which processing of the first stream of processing meets up with processing of the second stream of processing;
- and
- at least one field for determining a target location in which to branch;
- and
- executing the machine instruction, the executing being based on the type indication specifying the major branch open, the machine instruction being executed in the first stream of processing, the executing comprising:
- starting the second stream of processing, the second stream of processing having a relationship with the first stream of processing in that the second stream of processing references architected state of the first stream of processing, and the second stream of processing is to execute one or more instructions starting at the target location defined using the at least one field of the machine instruction, the one or more instructions being out of sequential execution order from one or more instructions being processed by the first stream of processing, the first stream of processing continuing to process one or more instructions subsequent to the machine instruction;
- wherein execution of the second stream of processing is speculative in that at least one instruction of the one or more instructions of the second stream of processing is executed even though reaching the at least one instruction of the second stream of processing by processing of the first stream of processing is tentative, and wherein updating of architected state by one or more instructions of the second stream of processing is performed based on the first stream of processing reaching a predefined point in processing;
- and
- obtaining by the processor another machine instruction, the other machine instruction specifying a branch operation and having the type indication, the type indication of the other machine instruction specifying the major branch close indicating processing of the first stream of processing has caught up with the target of the major branch open, and wherein execution of the major branch close comprises updating the architected state by the one or more instructions of the second stream of processing based on the first stream of processing reaching the predefined point in processing.
A method of executing a machine instruction, the method comprising:
- obtaining, by a processor, a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising:
- at least one opcode field for specifying an opcode, the opcode defining a branch operation;
- a type indication to specify a type of the branch operation, wherein the same branch operation is executable in a plurality of different ways depending on the type indication, wherein the type indication specifies how the branch operation is to be processed in this execution of the machine instruction, and wherein the type indication is configured to specify the following types of execution:
- a minor branch in which the machine instruction is executed in a first stream of processing and the branch operation does not cause a second stream of processing to be started, a major branch open in which the machine instruction is executed in the first stream of processing and the branch operation causes the second stream of processing to be started, and a major branch close in which processing of the first stream of processing meets up with processing of the second stream of processing;
- and
- at least one field for determining a target location in which to branch;
- and
- executing the machine instruction, the executing being based on the type indication specifying the major branch open, the machine instruction being executed in the first stream of processing, the executing comprising:
- starting the second stream of processing, the second stream of processing having a relationship with the first stream of processing in that the second stream of processing references architected state of the first stream of processing, and the second stream of processing is to execute one or more instructions starting at the target location defined using the at least one field of the machine instruction, the one or more instructions being out of sequential execution order from one or more instructions being processed by the first stream of processing, the first stream of processing continuing to process one or more instructions subsequent to the machine instruction;
- and
- wherein execution of the second stream of processing is speculative in that at least one instruction of the one or more instructions of the second stream of processing is executed even though reaching the at least one instruction of the second stream of processing by processing of the first stream of processing is tentative, and wherein updating of architected state by one or more instructions of the second stream of processing is performed based on the first stream of processing reaching a predefined point in processing.
A computer system for executing a machine instruction, the computer system comprising:
- a memory;
- and
- a processor in communications with the memory, wherein the computer system is configured to perform a method, said method comprising:
- obtaining a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising:
- at least one opcode field for specifying an opcode, the opcode defining a branch operation;
- a type indication to specify a type of the branch operation, wherein the same branch operation is executable in a plurality of different ways depending on the type indication, wherein the type indication specifies how the branch operation is to be processed in this execution of the machine instruction, and wherein the type indication is configured to specify the following types of execution:
- a minor branch in which the machine instruction is executed in a first stream of processing and the branch operation does not cause a second stream of processing to be started, a major branch open in which the machine instruction is executed in the first stream of processing and the branch operation causes the second stream of processing to be started, and a major branch close in which processing of the first stream of processing meets up with processing of the second stream of processing;
- and
- at least one field for determining a target location in which to branch;
- and
- executing the machine instruction, the executing being based on the type indication specifying the major branch open, the machine instruction being executed in the first stream of processing, the executing comprising:
- starting the second stream of processing, the second stream of processing having a relationship with the first stream of processing in that the second stream of processing references architected state of the first stream of processing, and the second stream of processing is to execute one or more instructions starting at the target location defined using the at least one field of the machine instruction, the one or more instructions being out of sequential execution order from one or more instructions being processed by the first stream of processing, the first stream of processing continuing to process one or more instructions subsequent to the machine instruction;
- and
- wherein execution of the second stream of processing is speculative in that at least one instruction of the one or more instructions of the second stream of processing is executed even though reaching the at least one instruction of the second stream of processing by processing of the first stream of processing is tentative, and wherein updating of architected state by one or more instructions of the second stream of processing is performed based on the first stream of processing reaching a predefined point in processing.
Dependencies are inferred from the claim text.