Patent ID: 6151673
Filing Date: 2000-11-21
Classification: G06F

Abstract:
A data processor for processing instructions including a subroutine call instruction and a subroutine return instruction, each instruction being processed in a pipeline, comprising:an instruction buffer to which the instructions to be processed in the pipeline is applied, for storing the instructions;an address generating unit for generating a subroutine return address in accordance wit the subroutine call instruction output from said instruction buffer, said generated subroutine return address being transferred to a prescribed storage location;a program counter stack for storing said subroutine return address generated by said address generating unit, said program counter stack outputting a value stored therein as a predicted return address in a first period in accordance with the subroutine return instruction stored in said instruction buffer wherein said instruction buffer receives an instruction designated by the predicted return address output from said program counter stack, anda judging circuit coupled to program counter stack, for judging whether the predicted return address is the same as the subroutine return address stored in the prescribed storage location in a second period in accordance with the subroutine return instruction, the first period predecing the second period, whereina pipeline processing of the instruction designated by the predicted return address is cancelled in response to a judging result output from said judging circuit, and an instruction designated by the subroutine return address stored in the prescribed storage location is processed in the pipeline, when the judging result indicates that the predicted return address in not the same as the subroutine return address.