IP Library › Granted Patent US 8,521,999
Granted Patent B2
US 8,521,999 · App. 12/721,933 · Granted Aug 27, 2013

Executing touchBHT instruction to pre-fetch information to prediction mechanism for branch with taken history

Inventors: Philip G. Emma (Danbury, CT); Allan M. Hartstein (Yorktown Heights, NY); Brian R. Prasky (Poughkeepsie, NY); Thomas R. Puzak (Yorktown Heights, NY); Vijayalakshmi Srinivasan (New York, NY)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,521,999
App. No.
12/721,933
Granted
Aug 27, 2013
Kind
B2
Abstract

A method comprising receiving a branch instruction, decoding a branch address and the branch instruction, executing a branch action associated with the branch address, determining whether a branch associated with the branch action was taken, and saving an identifier of the branch instruction and in indicator that the branch action was taken in a prefetch history table responsive to determining that the branch associated with the branch action was taken.

Claims (54)

1. A method comprising:

receiving a branch instruction;

decoding a branch address and the branch instruction;

executing a branch action associated with the branch address and the branch instruction;

determining whether a branch associated with the executed branch action was taken;

saving an identifier of the branch instruction and an indicator that the branch action was taken in a prefetch history table responsive to determining that the branch associated with the branch action was taken;

receiving a prefetch branch history table (TouchBHT) instruction, wherein the TouchBHT instruction is associated with a second branch instruction;

retrieving an entry in the prefetch history table having an identifier associated with the second branch instruction responsive to receiving the TouchBHT instruction;

determining whether the entry indicates that a branch action associated with the second branch instruction was taken; and

executing the TouchBHT instruction responsive to determining that the entry indicates that the branch action associated with the second branch instruction was taken.

2. The method of claim 1 , wherein the method further comprises updating a branch history table responsive to executing the branch instruction.

3. The method of claim 1 , wherein the TouchBHT instruction includes:

an opcode field including an opcode used by the TouchBHT instruction;

a branch mask field including a branch action of the TouchBHT instruction;

a branch address field including an address of an upcoming branch associated with the TouchBHT instruction; and

a target address field including a target address of the upcoming branch.

4. The method of claim 3 , wherein the TouchBHT instruction further includes a tag information field including an indicator of whether the upcoming branch is a conditional branch.

5. The method of claim 3 , wherein the TouchBHT instruction further includes a tag information field including an indicator of whether the upcoming branch is a taken branch.

6. The method of claim 1 , wherein the identifier of the branch instruction is a function of the branch address.

7. The method of claim 1 , wherein the identifier of the branch instruction is a function of the branch address and a global history vector.

8. The method of claim 7 , wherein the function of the branch address and the global history vector is an XOR logic function of a portion of the branch address and the global history vector.

9. The method of claim 1 , wherein the method further comprises:

determining whether a branch mask field matches a global history vector, wherein the TouchBHT instruction includes the branch mask field having a branch action of the TouchBHT instruction and the prefetch history table includes a global history vector; and

executing the TouchBHT instruction responsive to determining that the branch mask field matches the global history vector.

10. The method of claim 9 , wherein the identifier of the branch instruction is a function of the branch address.

11. The method of claim 9 , wherein the identifier of the branch instruction is a function of the branch address and a global history vector.

12. The method of claim 11 , wherein the function of the branch address and the global history vector is an XOR logic function of a portion of the branch address and the global history vector.

13. A system comprising a processor operative to receive a branch instruction, decode a branch address and the branch instruction, execute a branch action associated with the branch address and the branch instruction, determine whether a branch associated with the executed branch action was taken, save an identifier of the branch instruction and an indicator that the branch action was taken in a prefetch history table responsive to determining that the branch associated with the branch action was taken, receive a prefetch branch history table (TouchBHT) instruction, wherein the TouchBHT instruction is associated with a second branch instruction, retrieve an entry in the prefetch history table having an identifier associated with the second branch instruction responsive to receiving the TouchBHT instruction, determine whether the entry indicates that a branch action associated with the second branch instruction was taken, and execute the TouchBHT instruction responsive to determining that the entry indicates that the branch action associated with the second branch instruction was taken.

14. The system of claim 13 , wherein the processor is further operative to update a branch history table responsive to executing the branch instruction.

15. The system of claim 13 , wherein the TouchBHT instruction includes:

an opcode field including an opcode used by the TouchBHT instruction;

a branch mask field including a branch action of the TouchBHT instruction;

a branch address field including an address of an upcoming branch associated with the TouchBHT instruction; and

a target address field including a target address of the upcoming branch.

16. The system of claim 15 , wherein the TouchBHT instruction further includes a tag information field including an indicator of whether the upcoming branch is a conditional branch.

17. The system of claim 15 , wherein the TouchBHT instruction further includes a tag information field including an indicator of whether the upcoming branch is a taken branch.

18. The system of claim 13 , wherein the identifier of the branch instruction is a function of the branch address.

19. The system of claim 13 , wherein the identifier of the branch instruction is a function of the branch address and a global history vector.

20. The system of claim 13 , wherein the processor is further operative to determine whether a branch mask field matches a global history vector, wherein the TouchBHT instruction includes the branch mask field having a branch action of the TouchBHT instruction and the prefetch history table includes a global history vector, and system execute the TouchBHT instruction responsive to determining that the branch mask field matches the global history vector.

21. A branch prediction system including:

a means for receiving a branch instruction;

a means for decoding a branch address and the branch instruction;

a means for executing a branch action associated with the branch address and the branch instruction;

a means for determining whether a branch associated with the executed branch action was taken;

a means for saving an identifier of the branch instruction and an indicator that the branch action was taken in a prefetch history table responsive to determining that the branch associated with the branch action was taken;

a means for receiving an prefetch branch history table (TouchBHT) instruction, wherein the TouchBHT instruction is associated with a second branch instruction;

a means for retrieving an entry in the prefetch history table having an identifier associated with the second branch instruction responsive to receiving the TouchBHT instruction;

a means for determining whether the entry indicates that a branch action associated with the second branch instruction was taken; and

a means for executing the TouchBHT instruction responsive to determining that the entry indicates that the branch action associated with the second branch instruction was taken.

22. The system of claim 21 , wherein the identifier of the branch instruction is a function of the branch address.

23. The system of claim 21 , wherein the identifier of the branch instruction is a function of the branch address and a global history vector.

24. The system of claim 21 , wherein the system further comprises:

a means for determining whether a branch mask field matches a global history vector, wherein the TouchBHT instruction includes the branch mask field having a branch action of the TouchBHT instruction and the prefetch history table includes a global history vector; and

a means for executing the TouchBHT instruction responsive to determining that the branch mask field matches the global history vector.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 15, 2010
From: EMMA, PHILIP G.; HARTSTEIN, ALLAN M.; PRASKY, BRIAN R.; PUZAK, THOMAS R.; SRINIVASAN, VIJAYALAKSHMI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 024077/0120 →
Continuity (1)
Related Publication 20110225401A1 · Sep 15, 2011