Device and method for predicting function return address

A return address and return address stack technology, applied in electrical digital data processing, program control design, instruments, etc., can solve problems such as limited function size, and achieve the effect of reducing costs and improving processor performance
CN104572024AInactive Publication Date: 2015-04-29C SKY MICROSYST CO LTD

Patent Information

Authority / Receiving Office
CN Β· China
Current Assignee / Owner
C SKY MICROSYST CO LTD
Publication Date
2015-04-29
Estimated Expiration
Not applicable Β· inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

A device for predicting a function return address comprises an instruction decoding unit, a function return address stack, an execution unit and an error correction unit. The instruction decoding unit is used for decoding an input instruction to generate an operation indicator; the function return address stack comprises S table entries and is used for performing return address prediction on a function return instruction to generate a predicated address A and a corresponding table entry index X; the execution unit is used for receiving the operation indicator of the instruction decoding unit and the predicated address A and the table entry index X of the function return address stack, judging whether the address A is predicated correctly or not when the operation indicator indicates the function return instruction, and generating prediction correctness information and an actual skip address; the error correction unit is used for receiving output of the execution unit, and correcting content directed by the table entry index X in the function return address stack by the actual address B when the function return address is predicated mistakenly. The invention further provides a method for predicting the function return address. By the device and the method, cost of the function return address stack is reduced effectively, and processor performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the field of microprocessors, in particular to a device and method for function return address prediction. Background technique

[0002] The transfer instruction is one of the basic instructions of the processor and widely exists in the program. The transfer instruction will introduce the transfer of program control flow, which is one of the performance killers of the processor. Further, the branch instruction includes conditional branch instruction, unconditional branch instruction and indirect branch instruction. Among them, the function return instruction, as a kind of indirect transfer instruction, is frequently applied to the program return of sub-functions, which has a significant impact on the performance of the processor. In order to speed up the execution speed of function return instructions, middle and high-end embedded processors generally use function return address stacks to provide return address prediction for...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More