Patent ID: 6898698

Claim:
A branch predicting device, comprising: a storing circuit storing information specifying a return address of a subroutine when an instruction equivalent to a subroutine call is detected; a comparing circuit making a comparison between information specifying a branch destination address of an instruction which can possibly be an instruction equivalent to a subroutine return and the information specifying the return address stored in said storing circuit, and outputting a result of the comparison, when the instruction which can possibly be the instruction equivalent to the subroutine return is detected; and an identifying circuit identifying an instruction equivalent to a subroutine return, which corresponds to the instruction equivalent to the subroutine call, based on the result of the comparison, wherein the predicted branch is the branch of the instruction equivalent to the subroutine return in an architecture for which a particular instruction for a subroutine return is not prepared, wherein said storing circuit stores a register number of a link register, which is specified by the instruction equivalent to the subroutine call, as the information specifying the return address, wherein said storing circuit stores the return address of the subroutine as the information specifying the return address, and wherein only taken branch instruction is registered.