摘要 |
Test instructions 1522, e.g. AND-test or OR-test, are dynamically provided by fusing logical instructions with prior-art test instructions. A first processor pipeline fetches first and second instructions 1512 and branch instruction 1514. The first and second instructions comprise a first operand destination and a second operand source, respectively. A second pipeline decodes the first and second instructions fusing them into single micro-operation 1522 if the operand source and destination are the same (e.g. a single register, TEMP) and if branching depends upon the second instruction. The first instruction is a logical AND or OR (AND/OR), while the second instruction is test instruction TEST, which compares the results of the logical operation against a mask and sets a corresponding flag CC. Branching instruction JCC 1514 jumps to a slower generic code sequence depending on the flag. Performance for frequently executed type testing instruction idioms generated by just-in-time (JIT) compilers is improved. |