发明名称 Method to improve speed of executing return branch instructions in a processor
摘要 An apparatus and method for executing call branch and return branch instructions in a processor by utilizing a link register stack. The processor includes a branch counter that is initialized to zero, and is set to zero each time the processor decodes a link register manipulating instruction other than a call branch instruction. The branch counter is incremented by one each time a call branch instruction is decoded and an address is pushed onto the link register stack. In response to decoding a return branch instruction and provided the branch counter is not zero, a target address for the decoded return branch instruction is popped off the link register stack, the branch counter is decremented, and there is no need to check the target address for correctness.
申请公布号 US9411590(B2) 申请公布日期 2016.08.09
申请号 US201313833844 申请日期 2013.03.15
申请人 QUALCOMM Incorporated 发明人 Smith Rodney Wayne;Schottmiller Jeffery M.;McIlvaine Michael Scott;Stempel Brian Michael;Brown Melinda J.;Streett Daren Eugene
分类号 G06F9/30;G06F9/38 主分类号 G06F9/30
代理机构 Muncy, Geissler, Olds & Lowe, P.C. 代理人 Muncy, Geissler, Olds & Lowe, P.C.
主权项 1. A method for executing call branch and return branch instructions in a processor, the method comprising: setting a counter to an initial value in response to the processor decoding link register manipulating instructions other than call branch instructions; incrementing the counter by a first constant in response to the processor decoding a call branch instruction; pushing onto a link register stack an address of a next in program order instruction in response to the processor decoding the call branch instruction; incrementing the counter by a second constant in response to the processor decoding a return branch instruction provided the counter has a value not equal to the initial value; popping from the link register stack a target address for the return branch instruction in response to the processor decoding the return branch instruction provided the counter has a value not equal to the initial value, wherein when the value of the counter is not equal to the initial value, the target address popped from the link register stack is a correct target address for the return branch instruction; and completing execution of and retiring the return branch instruction without checking the target address for correctness.
地址 San Diego CA US