首页> 外国专利> Method and apparatus for efficient loop constructs in hardware and microcode

Method and apparatus for efficient loop constructs in hardware and microcode

机译:在硬件和微代码中高效循环构建的方法和装置

摘要

Method and apparatus to avoid the code space and time overhead of the software-loop. Loops (repeatedly executed blocks of instructions) are often used in software and microcode. Loops may be employed for array manipulation, storage initialization, division and square-root interpretation, and micro-interpreta­tion of instructions with variable-length operands. Software creates loops by keeping an iteration count in a register or in memory. During each iteration of the code loop, software decrements the count, and then branches to the "top" of the loop is the count remains nonzero.;This apparatus puts the decrement, compare, and branch- to-top into hardware, reducing the number of instructions in the loop and speeding loop execution. Hardware further speeds loop execution by eliminating the wait for the branch to the top-of-loop instruction. That is, it prefetches the top-of-loop instruction near the bottom of the loop. The loop may be initialized for a fixed iteration count, or can accept a variable count in the iteration count register. The apparatus consists of counters for the number of instructions in the loop, an iteration counter, a pointer to the top-of-loop location, and an instruction to initiate the loop.
机译:避免软件循环的代码空间和时间开销的方法和装置。循环(重复执行的指令块)通常在软件和微码中使用。循环可用于数组操作,存储初始化,除法和平方根解释以及具有可变长度操作数的指令的微解释。软件通过将迭代计数保持在寄存器或内存中来创建循环。在代码循环的每次迭代过程中,软件都会递减计数,然后在计数保持为非零的情况下跳转到循环的“顶部”。该设备将递减,比较并从顶部转移到硬件中,从而减少了循环中的指令数和加快循环执行的速度。硬件消除了等待跳转到循环顶部指令的等待,从而进一步加快了循环执行速度。也就是说,它预取循环底部附近的循环顶部指令。循环可以初始化为固定的迭代计数,也可以在迭代计数寄存器中接受可变计数。该装置包括用于循环中指令数量的计数器,迭代计数器,指向循环顶部位置的指针以及用于启动循环的指令。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号