US2005066153A1PendingUtilityA1

Method for processing branch operations

Priority: Oct 12, 1998Filed: Jun 12, 2003Published: Mar 24, 2005
Est. expiryOct 12, 2018(expired)· nominal 20-yr term from priority
G06F 9/323G06F 9/322G06F 9/3806G06F 9/325G06F 9/3846G06F 9/3844
46
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A branch operation is processed using a branch predict instruction and an associated branch instruction. The branch predict instruction indicates a predicted direction, a target address, and an instruction address for the associated branch instruction. When the branch predict instruction is detected, the target address is stored at an entry indicated by the associated branch instruction address and a prefetch request is triggered to the target address. The branch predict instruction may also include hint information for managing the storage and use of the branch prediction information.

Claims

exact text as granted — not AI-modified
1 . A method for processing branch operations comprising: 
 detecting a branch predict instruction that indicates a target address and a branch instruction address associated with the target address; and    storing the target address at an entry indicated by the associated branch instruction address.    
   
   
       2 . The method of  claim 1 , further comprising: 
 detecting a branch instruction indicated by the associated branch instruction address; and    retrieving the target address.    
   
   
       3 . The method of  claim 2  wherein retrieving the target address comprises: 
 determining a storage index from a portion of the address of the branch instruction; and    retrieving the target address at the storage index.    
   
   
       4 . The method of  claim 1  wherein the associated branch instruction address is indicated by an offset from an address of the predict instruction.  
   
   
       5 . A method for providing prediction information for branch operations comprising: 
 generating a branch instruction characterized by a branch address and a branch target address;    generating a predict instruction to indicate the branch target address for the branch instruction, the predict instruction being linked to the branch instruction through an indication of the branch address; and    scheduling the predict instruction for processing ahead of the branch instruction.    
   
   
       6 . The method of  claim 5  wherein generating a predict instruction comprises: 
 indicating the branch target address in a first field of the predict instruction; and    indicating the branch instruction address in a second field of the predict instruction.    
   
   
       7 . The method of  claim 6 , comprising indicating a branch resolution hint in a third field of the predict instruction.  
   
   
       8 . The method of  claim 5  wherein the predict instruction is linked to the branch instruction through an offset between an address of the predict instruction and the branch instruction address, and scheduling comprises scheduling the branch predict instruction ahead of the branch instruction by an amount indicated by the offset.  
   
   
       9 . A machine readable medium on which are stored instructions that may be executed by a processor to implement a branch operation, the instructions comprising: 
 a branch instruction characterized by a branch instruction address and a branch target address; and    a predict instruction that indicates the branch target address and the branch instruction address of the branch instruction, the predict instruction being scheduled ahead of the branch instruction to provide branch prediction information for the branch instruction when implemented by the processor.    
   
   
       10 . The machine readable medium of  claim 9 , wherein the predict instruction is characterized by a predict instruction address and is linked to the branch instruction through an offset between the predict instruction address and the branch instruction address.  
   
   
       11 . The machine readable medium of  claim 9 , wherein the branch predict instruction causes the branch target address to be stored in a location indexed by a portion of the branch instruction address when executed by the processor.  
   
   
       12 . The machine readable medium of  claim 11 , wherein the branch predict instruction includes branch hint information that is stored in a location indexed by a portion of the branch instruction address when executed by the processor.  
   
   
       13 . The machine readable medium of  claim 11 , wherein the branch predict instruction generates a prefetch request for code beginning at the branch target address when executed by the processor.  
   
   
       14 . The machine readable medium of  claim 13 , wherein the branch instruction causes the processor to resteer control to the prefetched code when the branch instruction is detected by the processor.  
   
   
       15 . A method for implementing a branch operation comprising: 
 detecting a branch prediction instruction;    identifying an associated branch instruction from a link provided in the branch predict instruction; and    determining a predicted branch direction according to a hint provided in the branch predict instruction.    
   
   
       16 . The method of  claim 15 , further comprising storing a target address specified in the branch predict instruction at a storage location indicated by the associated branch instruction.  
   
   
       17 . The method of  claim 15 , wherein determining the predicted branch direction comprises: 
 initiating a dynamic branch prediction algorithm when the hint is in a first state; and    identifying a static branch prediction in the branch predict instruction otherwise.    
   
   
       18 . The method of  claim 17 , further comprising storing the target address and a predicted branch direction at a location indicated by the associated branch instruction.  
   
   
       19 . The method of  claim 16 , further comprising: 
 detecting the associated branch instruction; and    fetching instructions to process after the associated branch instruction according to the predicted branch direction.    
   
   
       20 . The method of  claim 19 , wherein fetching comprises: 
 prefetching the instructions at a target address indicated by the branch predict instruction; and    accessing the prefetched instructions when the predicted branch direction is taken.    
   
   
       21 . The method of  claim 20 , wherein accessing comprises accessing the prefetched instructions from a storage location indicated by the associated branch instruction.

Join the waitlist — get patent alerts

Track US2005066153A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.