摘要 |
Methods and apparatus are disclosed to fuse instructions to provide OR-test and AND-test functionality on a plurality of test sources. Some embodiments include: fetching instructions; said instructions including a first instruction specifying a first operand destination, a second instruction specifying a second operand source; and a third instruction specifying a branch condition. A portion of the plurality of instructions are fused into a single micro-operation, the portion including both the first and second instructions, if the said first operand destination and the said second operand source are the same; and the said branch condition is dependent upon the second instruction. Some embodiments dynamically generate a novel test instruction by fusing one logical instruction with a prior-art test instruction. Other embodiments generate the novel test instruction through a just-in-time compiler. Some embodiments also fuse the novel test instruction with a subsequent conditional branch instruction, and perform a branch in accordance to how the condition flag is set. |