Code-specific affiliated register prediction
View Patent ↗Code-specific affiliated register prediction. A determination is made as to whether a unit of code is a candidate for affiliated register prediction. The determining employs a code specific indicator specific to the unit of code. Based on determining the unit of code is a candidate for affiliated register prediction, an indication of an affiliated register is loaded into a selected location. Based on the loading, the affiliated register is employed in speculative processing.
1. A computer system for facilitating processing within a computing environment, the computer system comprising:
a memory; and
a processor in communication with the memory, wherein the computer system is configured to perform a method, said method comprising:
determining for a unit of code whether the unit of code is a candidate for affiliated register prediction, wherein the determining employs a code specific indicator specific to the unit of code, wherein the code specific indicator specific to the unit of code is part of configuration information associated with the unit of code;
loading into a selected location a location identifier of an affiliated register, based on determining the unit of code is a candidate for affiliated register prediction; and
employing, based on the loading, the affiliated register in speculative processing.
2. The computer system of claim 1 , wherein another unit of code has another code specific indicator specific to the other unit of code to be used to determine whether the other unit of code is a candidate for affiliated register prediction.
3. The computer system of claim 1 , wherein the selected location is selected from a group consisting of a machine state register, a program status word, a special purpose register, a page table entry, a segment table entry, and a specific control register.
4. The computer system of claim 1 , wherein the method further comprises:
determining a context switch has occurred; and
updating a configuration, based on the context switch, wherein the configuration comprises the code specific indicator.
5. The computer system of claim 4 , wherein the method further comprises:
determining whether the code specific indicator is located in a location specifically bound to the unit of code; and
performing the updating, based on determining the code specific indicator is located in a location not specifically bound to the unit of code.
6. The computer system of claim 5 , wherein the location specifically bound to the unit of code comprises a page table entry or a segment table entry.
7. The computer system of claim 5 , wherein the location not specifically bound to the unit of code comprises a control register.
8. The computer system of claim 1 , wherein the method further comprises:
determining that a hardware exception has been taken; and
storing the configuration information into an exception context, based on the hardware exception, the configuration information comprising the code specific indicator.
9. The computer system of claim 8 , wherein the method further comprises exiting hardware exception processing, the exiting including:
obtaining the configuration information from the exception context; and
storing the configuration information in a control register.
10. The computer system of claim 1 , wherein the affiliated register prediction comprises storing a predicted target address of a register-indirect branch in a predicted register and concurrently in an affiliated register that is affiliated with the predicted register on the basis of a known affiliation between the predicted register and the affiliated register.