发明名称 Method and apparatus for implementing an iterative program loop by comparing the loop decrement with the loop value
摘要 A method and apparatus for providing program loop control in a data processor employs a special purpose instruction that substantially reduces the program overhead associated with conditional branching at the end of a program loop. The instruction first compares a loop counter with a decrement value. If the loop counter has counted down, a loop condition code, which is stored in a dedicated register bit, is cleared. Otherwise, the loop condition code remains set to indicate that further iterations of the loop are required. The decremented value of the loop counter is then stored in a loop counter register. In parallel with decrementing of the loop counter, a conditional branch is executed based on the value of the loop condition code set in the immediately previous iteration of the loop. If the loop condition code is cleared, i.e. if the loop has been completed, program control proceeds to the instruction following the loop after execution of the next instruction in sequence. conversely, if the loop condition code is set, program control returns to the branch address, i.e. the beginning of the loop, after execution of the next instruction in sequence. All of the operations of the present invention are performed within a single instruction cycle.
申请公布号 US5101484(A) 申请公布日期 1992.03.31
申请号 US19890311295 申请日期 1989.02.14
申请人 INTEL CORPORATION 发明人 KOHN, LESLIE D.
分类号 G06F9/32;G06F9/38 主分类号 G06F9/32
代理机构 代理人
主权项
地址