Branch Target Buffer Patents (Class 712/238)
  • Publication number: 20030126408
    Abstract: An apparatus and method for a processor microarchitecture that quickly and efficiently takes large steps through program segments without fetching all intervening instructions. The microarchitecture processes descriptors of trace sequences in program order so as to locate and dispatch descriptors of dependence chains that are used to fetch and execute the instructions of the dependence chain in data flow order.
    Type: Application
    Filed: January 3, 2002
    Publication date: July 3, 2003
    Inventors: Sriram Vajapeyam, Bohuslav Rychlik, John P. Shen
  • Patent number: 6581138
    Abstract: The invention provides a method and apparatus for optimizing instruction prefetch and caching in a processor. In the preferred embodiment, a path prediction circuit maintains information about which cache lines are likely to be executed in the future. This information is used to independently fetch the predicted cache lines, store them in a prefetch queue, and load them in to the instruction cache as instructions contained in these lines are about to be decoded by the processor. A plurality of cache lines can be in the process of being simultaneously fetched from main memory to load the prefetch queue.
    Type: Grant
    Filed: February 29, 2000
    Date of Patent: June 17, 2003
    Assignee: STMicroelectronics, Inc.
    Inventor: Anatoly Gelman
  • Patent number: 6530016
    Abstract: A pipeline process system, a super-scalar process system, or an out-of-order-execution process system is applied to an information processing device. A sequence of instructions containing a branch instruction, especially a subroutine, can be processed at a high speed using a branch history and a return address stack storing a return address corresponding to a subroutine call instruction. To successfully perform the process, when an instruction detected as a bit in the branch history is a subroutine return instruction, an address of a branched-to instruction registered in the branch history is compared with all return addresses stored in valid entries in the return address stack. A unit is provided to transmit a matching address as a return address of the return instruction to an instruction fetch unit for fetching an instruction.
    Type: Grant
    Filed: December 8, 1999
    Date of Patent: March 4, 2003
    Assignee: Fujitsu Limited
    Inventors: Masaki Ukai, Kyoko Tashima, Aiichiro Inoue
  • Publication number: 20030041230
    Abstract: A system and method for predicting a branch target for a current instruction in a microprocessor, the system comprising a cache storing indirect branch instructions and a path register. The path register is updated on certain branches by an XOR operation on the path register and the branch instruction, followed by the addition of one or more bits to the register. The cache is indexed by performing an operation on a portion of the current instruction address and the path register; the entry returned, if any, may be used to predict the target of the current instruction.
    Type: Application
    Filed: December 30, 1998
    Publication date: February 27, 2003
    Inventors: LIHU RAPPOPORT, RONNY RONEN, NICOLAS KACEVAS, ODED LEMPEL
  • Publication number: 20030028758
    Abstract: An Instruction Pointer (IP) signal is received comprising an IP tag field and an IP set field. A plurality of entries corresponding to the IP set field are read, each of the entries comprising an entry tag, an entry bank, and entry data. Each entry tag and entry bank is then compared with the IP tag and each of the plurality of banks. In one embodiment, the IP tag is concatenated with a number representing one of the plurality of banks and compared to the entry tag and entry bank. Separate comparisons may then be performed for each of the other banks.
    Type: Application
    Filed: December 23, 1999
    Publication date: February 6, 2003
    Inventor: NICOLAS I. KACEVAS
  • Patent number: 6505292
    Abstract: A processor includes a first instruction cache, a second instruction cache, a return stack, and a fetch unit. The return stack is configured to store return addresses corresponding to call instructions. The return stack is configured to output a first return address from a top of the return stack and a second return address which is next to the top of the return stack. The fetch unit is coupled to the first instruction cache, the second instruction cache, and the return stack, and is configured to convey the first return address to the first instruction cache responsive to a return instruction. Additionally, the fetch unit is configured to convey the second return address to the second instruction cache responsive to the return instruction.
    Type: Grant
    Filed: January 29, 2002
    Date of Patent: January 7, 2003
    Assignee: Advanced Micro Devices, Inc.
    Inventor: David B. Witt
  • Publication number: 20020194460
    Abstract: An apparatus for detecting erroneous speculative branches made by a pipelined microprocessor and for correcting the erroneous branches. A branch target address cache (BTAC) caches target addresses of executed branch instructions. A speculative branch is performed to a cached target address early in the pipeline based on a hit in the BTAC of an instruction cache fetch address before the instruction is decoded. When the speculative branch is performed, a hit bit is set. Later in the pipeline, the presumed branch instruction is decoded and executed. If the hit bit is set for the instruction, the decoded instruction is examined and the correct target address and direction are compared to the speculative versions to determine if an error was made by speculatively branching. If an error is detected, the branch target address cache is updated or invalidated, and the processor branches to the appropriate address to correct the error.
    Type: Application
    Filed: May 4, 2001
    Publication date: December 19, 2002
    Applicant: IP First LLC
    Inventors: G. Glenn Henry, Thomas C. McDonald, Terry Parks
  • Publication number: 20020194461
    Abstract: A speculative branch target address cache (BTAC) in a microprocessor. The BTAC caches target addresses and other information about branch instructions, such as instruction length, location within an instruction cache line, and a direction prediction. The BTAC is indexed by a fetch address of the microprocessor's instruction cache to determine whether a BTAC hit occurs. The BTAC is accessed early in the pipeline in parallel with the instruction cache access prior to decoding any instructions in the indexed instruction cache line. If a hit occurs in the BTAC, and the BTAC direction prediction is taken, the microprocessor speculatively branches to the target address supplied by the BTAC. The branch is speculative because the instructions in the cache line have not yet been decoded; hence, there is no guarantee that the alleged branch instruction associated with the information cached in the BTAC is present in the instruction cache.
    Type: Application
    Filed: May 4, 2001
    Publication date: December 19, 2002
    Applicant: IP First LLC
    Inventors: G. Glenn Henry, Thomas C. McDonald
  • Publication number: 20020194462
    Abstract: An apparatus and method in a pipelined microprocessor for selecting one of a plurality of branch target addresses cached in a branch target address cache (BTAC) within a line selected by an instruction cache fetch address. The invention enables support for speculatively branching to one of a plurality of branch instructions potentially cached in an instruction cache line selected by the fetch address. Each target address has cached with it in the BTAC an associated offset within the instruction cache line of the previously executed associated branch instruction as well as a valid bit and a prediction of whether the branch instruction will be taken or not taken. Control logic selects the first, valid, taken, and seen target address. The target address is “seen” if the associated offset is greater than or equal to a corresponding portion of the least significant bits of the fetch address.
    Type: Application
    Filed: May 4, 2001
    Publication date: December 19, 2002
    Applicant: IP First LLC
    Inventors: G. Glenn Henry, Thomas C. McDonald
  • Publication number: 20020188834
    Abstract: An apparatus and method in a pipelined microprocessor for replacing one of two target addresses in a branch target address cache (BTAC) line. If only one of the two entries is invalid, the invalid entry is replaced. If both entries are valid, the least recently used entry is replaced. If both entries are invalid, the entry is replaced corresponding to the side of the BTAC, indicated by a global status register, not last written to with an invalid entry. In one embodiment, the global status is updated only if a side is written when both entries are invalid. In another embodiment, the BTAC stores N entries per line, where N is greater than 1. The status register maintains information for determining which of the N sides is least recently written. The least recently written side is chosen for replacement.
    Type: Application
    Filed: May 4, 2001
    Publication date: December 12, 2002
    Applicant: IP First LLC
    Inventors: Thomas C. McDonald, Terry Parks
  • Publication number: 20020166042
    Abstract: A method and apparatus for improving branch prediction, the method including determining a target of a branch instruction; storing the target of the branch instruction before the branch instruction is fully executed; and re-encountering the branch instruction and predicting a target for the branch instruction by accessing the stored target for the branch instruction.
    Type: Application
    Filed: May 1, 2001
    Publication date: November 7, 2002
    Inventors: Yoav Almog, Ronny Ronen
  • Patent number: 6477640
    Abstract: A branch prediction unit apparatus and method uses an instruction buffer (20), a completion unit (24), and a branch prediction unit (BPU) (28). The instruction buffer (20) and/or the completion unit (24) contain a plurality of instruction entries that contain valid bits and stream identifier (SID) bits. The branch prediction unit contains a plurality of branch prediction buffers (28a-28c). The SID bits are used to associate the pending and executing instructions in the units (20 and 24) into instruction streams related to predicted branches located in the buffers (28a-28c). The SID bits as well as age bits associated with the buffers (28a-28c) are used to perform efficient branch prediction, branch resolution/retirement, and branch misprediction recovery.
    Type: Grant
    Filed: September 11, 2000
    Date of Patent: November 5, 2002
    Assignee: Motorola, Inc.
    Inventors: Jeffrey Pidge Rupley, II, Marvin A. Denman, Bradley G. Burgess, David C. Holloway
  • Patent number: 6453411
    Abstract: The inventive mechanism has a run-time optimization system (RTOS) embedded in hardware. When the code is first moved into Icache, a threshold value is set into a counter associated with the instruction or instruction bundle of the particular cache line of the Icache. Each time the instruction or instruction bundle is executed and retired, the counter is decremented by one. When the counter reaches zero, a trap is generated to inform that the code is hot. A trace selector will form a trace starting from the hot instruction (or instruction bundle) from the Icache line. The Icache maintains branch history information for the instructions in each cache line which is used to determine whether a branch should be predicted as taken or fall through. After the trace is formed, it is optimized and stored into a trace memory portion of the physical memory. The mapping between the original code of the trace and the optimized trace in the trace memory is maintained in a mapping table.
    Type: Grant
    Filed: February 18, 1999
    Date of Patent: September 17, 2002
    Assignee: Hewlett-Packard Company
    Inventors: Wei C. Hsu, Manuel Benitez
  • Patent number: 6449714
    Abstract: Each of plural rows in an aligned Instruction cache (AIC) contains a plurality of aligned sectors, each sector having space for a block of sequentially-addressed instructions in an executing program. A “fetch history table” (FHT) contains FHT sets of FHT entries for specifying execution sequences of the sectors in associated AIC rows. Each FHT entry in a FHT set specifies an AIC row and a sector sequence arrangement to be outputted from that row. In this manner, each FHT entry can associate itself with any row in the AIC and is capable of specifying any output order among the sectors in its associated row. Unique fields are selected in each instruction address for locating an associated FHT set, and for associating the instruction address with an AIC sector through a unique “sector distribution table” (SDT) to locate the sector which starts with the instruction having this instruction address.
    Type: Grant
    Filed: August 16, 1999
    Date of Patent: September 10, 2002
    Assignee: International Business Machines Corporation
    Inventor: Balaram Sinharoy
  • Publication number: 20020124162
    Abstract: N instruction class (IClass) fields, m branch prediction (BRPD) and k next fetch address fields are added to each instruction set of n instructions of a cache line of an instruction cache, where m and k are less than or equal to n. The BRPD and NFAPD fields of a cache line are initialized in accordance to a pre-established initialization policy of a branch and next fetch address prediction algorithm while the cache line is first brought into the instruction cache. The sets of IClasses, BRPDS, and NFAPDs of a cache line are accessed concurrently with the corresponding sets of instructions of the cache line. One BRPD and one NFAPD is selected from the set of BRPDs and NFAPDs corresponding to the selected set of instructions. The selected BRPD and NFAPD are updated in accordance to a pre-established update policy of the branch and next fetch address prediction algorithm when the actual branch direction and next fetch address are resolved.
    Type: Application
    Filed: August 13, 2001
    Publication date: September 5, 2002
    Applicant: Sun Microsystems, Inc.
    Inventors: Robert Yung, Kit Sang Tam, Alfred K. W. Yeung, William N. Joy
  • Patent number: 6446197
    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.
    Type: Grant
    Filed: October 1, 1999
    Date of Patent: September 3, 2002
    Assignee: Hitachi, Ltd.
    Inventors: Sivaram Krishnan, Sebastian Havluj Ziesler
  • Patent number: 6442681
    Abstract: A cache used with a pipelined processor includes an instruction cache, instruction buffers for receiving instruction sub-blocks from the instruction cache and providing instructions to the pipelined processor, and a branch cache. The branch cache includes an instruction buffer adjunct for storing an information set for each sub-block resident in the instruction buffers. A branch cache directory stores instruction buffer addresses corresponding to current entries in the instruction buffer adjunct, and a target address RAM stores target addresses developed from prior searches of the branch cache. A delay pipe is used to selectively step an information set read from the buffer instruction adjunct in synchronism with a transfer instruction traversing the pipeline.
    Type: Grant
    Filed: December 28, 1998
    Date of Patent: August 27, 2002
    Assignee: Bull HN Information Systems Inc.
    Inventors: Charles P. Ryan, Patrice Brossard
  • Publication number: 20020099926
    Abstract: In a first aspect of the present invention, a method for prefetching instructions in a superscalar processor is disclosed. The method comprises the steps of fetching a set of instructions along a predicted path and prefetching a predetermined number of instructions if a low confidence branch is fetched and storing the predetermined number of instructions in a prefetch buffer. In a second aspect of the present invention, a system for prefetching instructions in a superscalar processor is disclosed. The system comprises a cache for fetching a set of instructions along a predicted path, a prefetching mechanism coupled to the cache for prefetching a predetermined number of instructions if a low confidence branch is fetched and a prefetch buffer coupled to the prefetching mechanism for storing the predetermined number of instructions. Through the use of the method and system in accordance with the present invention, existing prefetching algorithms are improved with minimal additional hardware cost.
    Type: Application
    Filed: January 19, 2001
    Publication date: July 25, 2002
    Applicant: International Business Machines Corporation
    Inventor: Balaram Sinharoy
  • Patent number: 6425055
    Abstract: An apparatus and method for accessing a cache memory. In a cache memory, an address is received that includes a set field and a partial tag field, the set field and the partial tag field together including fewer bits than necessary to uniquely identify a region of memory equal in size to a cache line of the cache memory. The set field is decoded to select one of a plurality of storage units within the cache memory, each of the plurality of storage units including a plurality of cache lines of the cache memory. The partial tag field is compared to a plurality of previously stored partial tags that correspond to the plurality of cache lines within the selected one of the plurality of storage units to determine if the partial tag field matches one of the plurality of previously stored partial tags. If the one of the previously stored partial tags matches the partial tag field, one of the plurality of cache lines that corresponds to the one of the plurality of previously stored partial tags is output.
    Type: Grant
    Filed: February 24, 1999
    Date of Patent: July 23, 2002
    Assignee: Intel Corporation
    Inventors: David J. Sager, Glenn J. Hinton
  • Patent number: 6418530
    Abstract: The inventive mechanism provides fast profiling and effective trace selection. The inventive mechanism partitions the work between hardware and software. The hardware automatically detects which code is executed very frequently, e.g. which code is hot code. The hardware also maintains the branch history information. When the hardware determines that a section or block of code is hot code, the hardware sends a signal to the software. The software then forms the trace from the hot code, and uses the branch history information in making branch predictions.
    Type: Grant
    Filed: February 18, 1999
    Date of Patent: July 9, 2002
    Assignee: Hewlett-Packard Company
    Inventors: Wei C. Hsu, Manuel Benitez
  • Patent number: 6412062
    Abstract: The present invention is a method and apparatus to inject an external event to a first pipeline stage in a pipeline chain. A target instruction address corresponding to an instruction is specified. The external event is asserted when there is a match between the target instruction address and a pipeline instruction pointer corresponding to a second pipeline stage. The second pipeline stage is earlier than the first pipeline stage in the pipeline chain. The external event is unmasked via a delivery path between a signal representing the asserted external event and the first pipeline stage.
    Type: Grant
    Filed: June 30, 1999
    Date of Patent: June 25, 2002
    Assignee: Intel Corporation
    Inventors: Yan Xu, Steven J. Tu
  • Patent number: 6389531
    Abstract: A processor is provided with an improved instruction buffer, branch target instruction memory, branch target address memory and instruction decoder adapted for handling branch instructions so as to reduce latencies. A branch operation uses both a program branch control instruction (executed in advance to determine the branch target instruction address) and either a conditional or unconditional branch instruction associated with a conditional/unconditional branch target instruction respectively. The conditional/unconditional branch instruction and the program branch control instruction both include separate prediction indicators used by the instruction decoder for initiating a loading and speculatively pre-loading of instructions for execution in the processor.
    Type: Grant
    Filed: October 17, 2000
    Date of Patent: May 14, 2002
    Assignee: Hitachi, Ltd.
    Inventors: Naohiko Irle, Tony Lee Werner
  • Patent number: 6374350
    Abstract: An instruction pipeline in a microprocessor is provided. The instruction pipeline includes a plurality of pipeline units, each of the plurality of pipeline units processing a plurality of instructions. At least two of the plurality of pipeline units are a source of at least some of the instructions for the pipeline. The pipeline further includes at least two speculative return address stacks, each of the speculative return address stacks coupled is coupled to at least one of the instruction source units. Each of the speculative return return address stacks are capable of storing at least two speculative return addresses.
    Type: Grant
    Filed: June 1, 2000
    Date of Patent: April 16, 2002
    Assignee: Intel Corporation
    Inventors: Reynold V. D'Sa, Rebecca E. Hebda, Stavros Kalafatis, Alan B. Kyker, Robert B. Chaput
  • Patent number: 6374348
    Abstract: An improved preload/prefetching architecture is disclosed for controlling branch target instruction loading in a pipelined processor. Branch target instructions can be speculatively preloaded/prefetched based on a first prediction indicator provided in a branch control instruction, and they also can be actually loaded/fetched based on a second prediction indicator provided in a branch instruction. This mechanism results in reduced cache latency during program execution. The preloading/prefetching of branch target instructions can also be prioritized under software control to optimize instruction execution, based on particular indicators specified for branch target instructions within a branch hint buffer.
    Type: Grant
    Filed: October 17, 2000
    Date of Patent: April 16, 2002
    Assignee: Hitachi, Ltd.
    Inventors: Naohiko Irie, Tony Lee Werner
  • Publication number: 20020013894
    Abstract: A data processor comprising contains a branch target memory that stores partial branch target information for instructions. The branch target information is used for advanced determination of the target address of a branch, so that the instruction at the target address can be prefetched. The partial branch target information indicates a position of an expected branch target address in a part of instruction address space defined relative to the current instruction address. Preferably, the relevant part of instruction address space is a page that contains the current instruction address, the partial branch target information providing only the least significant part of the branch target address. FIG.
    Type: Application
    Filed: July 19, 2001
    Publication date: January 31, 2002
    Inventor: Jan Hoogerbrugge
  • Patent number: 6332189
    Abstract: A branch prediction architecture is disclosed, having a branch predictor, a target address register, first and second multiplexors, a cache memory, and a trace cache. The branch predictor may advantageously be a series-parallel branch predictor, and alternatively may be a serial-BLG branch predictor or a choosing branch predictor. The first multiplexor receives an input from the target address register, and provides an output to the cache memory. The cache memory receives output from both the branch predictor and the first multiplexor, and provides an output to the second multiplexor. The trace cache receives the output from the branch predictor, and provides an output received by the second multiplexor. The second multiplexor, receiving input from both the trace cache and the cache memory, outputs branch predictions and instruction bundles.
    Type: Grant
    Filed: October 16, 1998
    Date of Patent: December 18, 2001
    Assignee: Intel Corporation
    Inventors: Gunjeet Baweja, Harsh Kumar
  • Patent number: 6330664
    Abstract: An arrangement and a method provide instruction processing. Instructions are delivered to a multi-stage pipeline arrangement from at least one instruction source. A storing arrangement stores jump address information for jump instructions. The storing arrangement includes at least one FIFO-register. The conditional jump target address information is stored in the FIFO-register while at least the jump instructions are stored in the pipeline arrangement. The jump target address information is delivered from the FIFO-register in such a way that substantially sequential and continuous prefetching of the instructions is enabled irrespective of the number of conditional jumps and irrespective of whether the jumps are taken or not.
    Type: Grant
    Filed: November 3, 1998
    Date of Patent: December 11, 2001
    Assignee: Telefonaktiebolaget LM Ericsson (publ)
    Inventor: Dan Halvarsson
  • Patent number: 6324643
    Abstract: A two level branch prediction system and method is disclosed for controlling instruction flow in a pipelined processor. A first prediction indicator associated with a branch instruction specifies whether a particular branch condition is likely to be satisfied. A second prediction indicator associated with a branch control instruction specifies whether a particular branch target instruction is likely to be needed by one or more of the branch instructions. The first prediction indicator is used to load branch target instructions as they are needed in response to decoding a branch instruction, while the second prediction indicator is used by prefetching logic within the processor to determine whether a particular branch target instruction should be speculatively loaded even before the associated branch instruction is executed.
    Type: Grant
    Filed: October 4, 2000
    Date of Patent: November 27, 2001
    Assignee: Hitachi, Ltd.
    Inventors: Sivaram Krishnan, Sebastian Haviuj Ziesler
  • Patent number: 6304961
    Abstract: The invention relates to a computer system and method for fetching a next instruction. In one embodiment, a computer system includes an instruction cache, a next fetch address register, and a fetch unit. The instruction cache includes an instruction array for storing a plurality of processor instructions and a next address fetch array for storing at least one next fetch address. Each next fetch address associated with at least one of the processor instructions stored in the instruction array and indicating a location of a processor instruction to be fetched. In another embodiment, an apparatus includes a first device configured to fetch a first instruction stored in an instruction cache, a second device configured to unconditionally store a next fetch address associated with the first instruction, and a third device configured to unconditionally fetch a second instruction stored at a location indicated by the stored next fetch address.
    Type: Grant
    Filed: February 14, 1997
    Date of Patent: October 16, 2001
    Assignee: Sun Microsystems, Inc.
    Inventors: Robert Yung, Kit Sang Tam, Alfred K. W. Yeung, William N. Joy
  • Publication number: 20010020265
    Abstract: The data processor that addresses instructions as groups of commands which may contain more than one branch command, such as VLIW instructions that contain several commands for parallel execution. The processor selects an expected taken branch command from the branch commands in a group. The processor also selects a tentative target for the expected taken branch command and tentatively redirects control flow to a further group of commands identified by the tentative target. The processor contains an associative target memory for storing targets of previously executed branch commands. Targets are retrieved with an associative address that identifies a command in the group, the tentative target being selected on the basis of a match between the associative address associated with the tentative target and an indication of the expected taken command.
    Type: Application
    Filed: February 28, 2001
    Publication date: September 6, 2001
    Inventor: Jan Hoogerbrugge
  • Patent number: 6279105
    Abstract: In a branch instruction target address cache, an entry associated with a fetched block of instructions includes a target address of a branch instruction residing in the next sequential block of instructions. The entry will include a sequential address associated with the branch instruction and a prediction of whether the target address is taken or not taken.
    Type: Grant
    Filed: October 15, 1998
    Date of Patent: August 21, 2001
    Assignee: International Business Machines Corporation
    Inventors: Brian R. Konigsburg, David Stephen Levitan
  • Patent number: 6263427
    Abstract: A branch prediction mechanism for predicting the outcome and the branch target address of the next possible branch instruction of a current instruction. Each of the entry of the branch target buffer (“BTB”) of the present invention provides a next possible branch instruction address, and the corresponding branch target address. By checking the TAG portion of each entry of the BTB with the current instruction address, the branch prediction mechanism can predict the next possible branch instruction and the corresponding branch target address.
    Type: Grant
    Filed: September 4, 1998
    Date of Patent: July 17, 2001
    Assignee: Rise Technology Company
    Inventors: Sean P. Cummins, Kenneth K. Munson
  • Patent number: 6256729
    Abstract: A method for repairing a pipeline in response to a branch instruction having a branch, includes the steps of providing a branch repair table having a plurality of entries, allocating an entry in the branch repair table for the branch instruction, storing a target address, a fall-through address, and repair information in the entry in the branch repair table, processing the branch instruction to determine whether the branch was taken, and repairing the pipeline in response to the repair information and the fall-through address in the entry in the branch repair table when the branch was not taken.
    Type: Grant
    Filed: January 9, 1998
    Date of Patent: July 3, 2001
    Assignee: Sun Microsystems, Inc.
    Inventors: Rajasekhar Cherabuddi, Sanjay Patel, Adam R. Talcott, Ramesh K. Panwar
  • Patent number: 6253315
    Abstract: A processor pipeline includes a return stack buffer (RSB) and a top of stack pointer (RSB_TOS) to indicate the status of buffer entries. A copy of the current RSB_TOS (C_TOS) is associated with each branch instruction that is detected at the front end of the pipeline. When the branch instruction is a call instruction that is predicted taken, an associated return address is pushed onto the RSB and the current RSB_TOS is updated. When the branch instruction is a return instruction that is predicted taken, the return address indicated by the current RSB_TOS pointer is popped from the RSB and the current RSB_TOS is updated. When a branch is determined to have been mispredicted, the associated C_TOS is adjusted according to the type of branch misprediction and RSB_TOS is updated with the adjusted C_TOS.
    Type: Grant
    Filed: August 6, 1998
    Date of Patent: June 26, 2001
    Assignee: Intel Corporation
    Inventor: Tse-Yu Yeh
  • Patent number: 6247120
    Abstract: An instruction buffer includes a shift register having M storage elements to store instructions before the instructions are issued to an instruction decoder. The instruction buffer also includes control logic to issue the instructions from the shifter register to the instruction decoder and shift instructions in the shift register to fill vacant storage elements. The control logic detects when N consecutive storage elements are vacant and loads a first set of N instructions into the vacant storage elements. One or more of the storage elements occupied by the first set of instructions are treated as vacant, depending upon the position of a predetermined instruction in the first set of instructions, so that instructions can be shifted into the vacant storage elements.
    Type: Grant
    Filed: August 15, 1997
    Date of Patent: June 12, 2001
    Assignee: Intel Corporation
    Inventor: Greg Schwendinger
  • Patent number: 6247121
    Abstract: In one embodiment, a processor includes thread management logic including a thread predictor having state machines to indicate whether thread creation opportunities should be taken or not taken. The processor includes a predictor training mechanism to receive retired instructions and to identify potential threads from the retired instructions and to determine whether a potential thread of interest meets a test of thread goodness, and if the test is met, one of the state machines that is associated with the potential thread of interest is updated in a take direction, and if the test is not met, the state machine is updated in a not take direction. The thread management logic may control creation of an actual thread and may further include reset logic to control whether the actual thread is reset and wherein if the actual thread is reset, one of the state machines associated with the actual thread is updated in a not take direction.
    Type: Grant
    Filed: September 21, 1998
    Date of Patent: June 12, 2001
    Assignee: Intel Corporation
    Inventors: Haitham Akkary, Quinn A. Jacobson
  • Patent number: 6233676
    Abstract: An apparatus and method are provided for executing a forward branch in a microprocessor. The apparatus has translation logic and instruction fetch logic. The translation logic utilizes a branch predictor to determine if a conditional branch should be taken or not. If the branch is predicted taken, then a branch accelerator in the instruction fetch logic determines if a branch target instruction has already been stored for translation in an instruction buffer by summing the length of the conditional branch instruction to a displacement provided by the conditional branch instruction. If the branch target instruction is already within the instruction buffer, contents of the instruction buffer are simply shifted by the number of bytes indicated by the sum to move the branch target instruction to the front of the buffer.
    Type: Grant
    Filed: March 18, 1999
    Date of Patent: May 15, 2001
    Assignee: IP-First, L.L.C.
    Inventors: G. Glenn Henry, Terry Parks
  • Patent number: 6223280
    Abstract: A method and circuit is provided for preloading a branch prediction unit within a microprocessor. In one embodiment of the method, a branch history storage device such as branch history shift register is written with a predetermined multibit predicter in response to the microprocessor receiving and executing a special write branch history storage device instruction for writing the predetermined multibit predicter into the branch history storage device. The branch history storage device is contained within a prediction circuit of the microprocessor, and generally the contents of the branch history storage device is used in the process of predicting the results of executing conditional branch instructions prior to their execution.
    Type: Grant
    Filed: July 16, 1998
    Date of Patent: April 24, 2001
    Assignee: Advanced Micro Devices, Inc.
    Inventors: David C. Horton, Amit R. Gupta
  • Patent number: 6219778
    Abstract: A processor including at least one execution unit generating out-of-order results and out-of-order condition codes. Precise architectural state of the processor is maintained by providing a results buffer having a number of slots and providing a condition code buffer having the same number of slots as the results buffer, each slot in the condition code buffer in one-to-one correspondence with a slot in the results buffer. Each live instruction in the processor is assigned a slot in the results buffer and the condition code buffer. Each speculative result produced by the execution units is stored in the assigned slot in the results buffer. When an instruction is retired, the results for that instruction are transferred to an architectural result register and any condition codes generated by that instruction are transferred to an architectural condition code register.
    Type: Grant
    Filed: December 20, 1999
    Date of Patent: April 17, 2001
    Assignee: Sun Microsystems, Inc.
    Inventors: Ramesh Panwar, Arjun Prabhu
  • Patent number: 6209086
    Abstract: In a fast response time pipelined data processor, an interrupt control device stores the interrupt service routine address or the target address of a branch instruction, as applicable, in a register. If an interrupt occurs while the pipelined data processor is processing a branch instruction, the branch instruction target address stored in the register is used as the return address, and is stored in a working space, so that the interrupt can be processed immediately. Similarly, if an interrupt occurs while the pipelined data processor is processing a prior interrupt or exception, and the first instruction of the interrupt service routine of the previous interrupt has not yet reached the memory access stage, the interrupt service routine as address of the previous interrupt stored in the register is used as the return address, and is stored in the working space, so that the next interrupt can be processed immediately.
    Type: Grant
    Filed: November 10, 1998
    Date of Patent: March 27, 2001
    Assignee: Industrial Technology Research Institute
    Inventors: Shyh An Chi, Shisheng Shang
  • Patent number: 6205546
    Abstract: A computer and a method are described having multiple pointers for a branch instruction. A branch target instruction called by the branch instruction is divided into H parts locatable by K pointers. L of the K pointers are stored in the branch instruction and K-L pointers are stored with the H parts of the branch target instruction. A tag identifies a variable boundary between first and second halves of the memory, word by word. The first half of the memory space contains V of H parts of the instructions and the second half of the memory space contains the H-V parts. The parts in the first and second halves of the memory space are compressed and decompressed in parallel.
    Type: Grant
    Filed: March 22, 1999
    Date of Patent: March 20, 2001
    Assignee: Motorola Inc.
    Inventors: Rami Natan, Arie Ben-Ephraim, Arie Kazachin, Alex Miretsky, Vitaly Sukonik
  • Patent number: 6202144
    Abstract: A computer system and method are described having a single pointer for a branch target instruction and multiple pointers and instruction parts for non-branch target instructions. All instructions, except branch target instructions are divided and stored in different location within a memory. A tag is used to identify a variable boundary between first and second halves of the memory space, word by word. The first half of the memory space contains V of H parts of the instructions and the second half of the memory space contains the H-V parts. The parts in the first and second halves of the memory space can be compressed and decompressed in parallel.
    Type: Grant
    Filed: March 22, 1999
    Date of Patent: March 13, 2001
    Assignee: Motorola Inc.
    Inventors: Arie Ben-Ephraim, Avi Ginsberg, Alex Miretsky, Vitaly Sukonik, Arie Kazachin
  • Patent number: 6185675
    Abstract: A cache memory configured to access stored instructions according to basic blocks is disclosed. Basic blocks are natural divisions in instruction streams resulting from branch instructions. The start of a basic block is a target of a branch, and the end is another branch instruction. A microprocessor configured to use a basic block oriented cache may comprise a basic block cache and a basic block sequence buffer. The basic block cache may have a plurality of storage locations configured to store basic blocks. The basic block sequence buffer also has a plurality of storage locations, each configured to store a block sequence entry. The block sequence entry may comprise an address tag and one or more basic block pointers. The address tag corresponds to the fetch address of a particular basic block, and the pointers point to basic blocks that follow the particular basic block in a predicted order.
    Type: Grant
    Filed: August 21, 1998
    Date of Patent: February 6, 2001
    Assignee: Advanced Micro Devices, Inc.
    Inventors: Uwe Kranich, David S. Christie
  • Patent number: 6185676
    Abstract: A pipelined microprocessor having a branch prediction unit implemented in an instruction pointer generation stage of the microprocessor. The branch prediction unit includes a memory device having at least a first entry configured to hold at least a part of a memory address of a pre-selected branch instruction and at least a part of a memory address of a branch target corresponding to the pre-selected branch instruction. The branch prediction unit compares an instruction pointer of an instruction to be executed with the memory address of the pre-selected branch instruction. In response to a match between the instruction pointer and the memory address of pre-selected branch instruction, the unit causes the microprocessor to fetch an instruction corresponding to the branch target. In one embodiment, the instruction pointer generation stage of the microprocessor is implemented as a first stage of the pipelined microprocessor.
    Type: Grant
    Filed: September 30, 1997
    Date of Patent: February 6, 2001
    Assignee: Intel Corporation
    Inventors: Mitchell Alexander Poplingher, Carl Scafidi, Tse-Yu Yeh, Wenliang Chen
  • Patent number: 6182211
    Abstract: In order to effectively reduce branch hazards without a restriction to a structure of a pipeline, the contents of instructions and the like during control of conditional branching in an information processing apparatus which processes an instruction by pipeline processing, before a condition of a conditional branch instruction becomes defined, that is, before a branch judgement is made, pipeline information of a subsequent instruction which is subsequent to the conditional branch instruction is saved so that an instruction beyond a branch is fed to a pipeline in advance. When the condition is met, the instruction beyond the branch is executed as it directly is. When the condition is not met, the saved pipeline information of the subsequent instruction is returned to the pipeline and the subsequent instruction which is subsequent to the conditional branch instruction is executed.
    Type: Grant
    Filed: June 29, 1998
    Date of Patent: January 30, 2001
    Assignee: Matsushita Electric Industrial Co., Ltd.
    Inventor: Masayuki Yamasaki
  • Patent number: 6178498
    Abstract: A branch prediction instruction is provided that includes hint information for indicating a storage location for associated branch prediction information in a hierarchy of branch prediction storage structures. When the hint information is in a first state, branch prediction information is stored in a first structure that provides single cycle access to the stored information. When the hint information is in a second state, the branch prediction information is stored in a second structure that provides slower access to the stored information.
    Type: Grant
    Filed: December 18, 1997
    Date of Patent: January 23, 2001
    Assignee: IDEA Corporation
    Inventors: Harshvardhan Sharangpani, Kent Fielden
  • Patent number: 6173395
    Abstract: A method and system for determining the sequence of execution of instructions in a computer under test using trace data generated upon execution of certain ones of the instructions. In one embodiment, the method comprises locating an initial entry in the trace data and scanning the instructions in program order beginning with an instruction indicated by the initial entry. When a branch instruction is encountered, the trace data is examined to determine the subsequently executed instruction. If the branch is unconditional, a corresponding address entry in the trace data indicates the address of the next instruction. If the branch is conditional, a corresponding bitmap entry in the trace data contains a bit which indicates whether the branch was taken. From this bit and the instructions themselves, the next instruction is determined.
    Type: Grant
    Filed: August 17, 1998
    Date of Patent: January 9, 2001
    Assignee: Advanced Micro Devices, Inc.
    Inventors: Michael Wisor, Travis Wheatley, Dan S. Mudgett
  • Patent number: 6170054
    Abstract: A method of operation in a microprocessor is provided. A return address cache (RAC) is initialized. The RAC includes a portion to store predicted subroutine return addresses (PSRA) and first and second corresponding cache portions to store retired most recently updated (RMRU) ages of the PSRA and speculative most recently updated (SMRU) ages of the PSRA respectively. A PSRA is stored in a portion of the RAC corresponding to a first SMRU age and the SMRU ages are incremented responsive to prediction of a call instruction. A PSRA is read from a portion of the RAC corresponding to a second SMRU age and the SMRU ages are decremented responsive to prediction of a return instruction. Also a microprocessor that includes a return address cache (RAC) is provided. The RAC includes first and second tag portions to store retired most recently updated (RMRU) ages and speculative most recently updated (SMRU) ages respectively. The RAC also includes a data portion to store predicted subroutine addresses (PSRA).
    Type: Grant
    Filed: November 16, 1998
    Date of Patent: January 2, 2001
    Assignee: Intel Corporation
    Inventor: Mitchell Alexander Poplingher
  • Patent number: 6167510
    Abstract: An apparatus including a banked instruction cache and a branch prediction unit is provided. The banked instruction cache allows multiple instruction fetch addresses (comprising consecutive instruction blocks from the predicted instruction stream being executed by the microprocessor) to be fetched concurrently. The instruction cache provides an instruction block corresponding to one of the multiple fetch addresses to the instruction processing pipeline of the microprocessor during each consecutive clock cycle, while additional instruction fetch addresses from the predicted instruction stream are fetched. Preferably, the instruction cache includes at least a number of banks equal to the number of clock cycles consumed by an instruction cache access. In this manner, instructions may be provided during each consecutive clock cycle even though instruction cache access time is greater than the clock cycle time of the microprocessor.
    Type: Grant
    Filed: April 23, 1998
    Date of Patent: December 26, 2000
    Assignee: Advanced Micro Devices, Inc.
    Inventor: Thang M. Tran
  • Patent number: 6167509
    Abstract: A high-performance CPU of the RISC (reduced instruction set) type employs a standardized, fixed instruction size, and permits only simplified memory access data width and addressing modes. The instruction set is limited to register-to-register operations and register load/store operations. Performance can be speeded up by predicting the target of a branch and prefetching the new instruction based upon this prediction; a branch prediction rule is followed that requires all forward branches to be predicted not-taken and all backward branches (as is common for loops) to be predicted as taken. Another performance improvement makes use of unused bits in the standard. sized instruction to provide a hint of the expected target address for jump and jump to subroutine instructions or the like. The target can thus be prefetched before the actual address has been calculated and placed in a register.
    Type: Grant
    Filed: May 16, 1994
    Date of Patent: December 26, 2000
    Assignee: Compaq Computer Corporation
    Inventors: Richard Lee Sites, Richard T. Witek