Given a set of bundle bits and a specific pipe, returns which * instruction the bundle contains in that pipe. */
| 9498 | * instruction the bundle contains in that pipe. |
| 9499 | */ |
| 9500 | const struct tilegx_opcode * |
| 9501 | find_opcode(tilegx_bundle_bits bits, tilegx_pipeline pipe) |
| 9502 | { |
| 9503 | const unsigned short *table = tilegx_bundle_decoder_fsms[pipe]; |
| 9504 | int index = 0; |
| 9505 | |
| 9506 | while (1) |
| 9507 | { |
| 9508 | unsigned short bitspec = table[index]; |
| 9509 | unsigned int bitfield = |
| 9510 | ((unsigned int)(bits >> (bitspec & 63))) & (bitspec >> 6); |
| 9511 | |
| 9512 | unsigned short next = table[index + 1 + bitfield]; |
| 9513 | if (next <= TILEGX_OPC_NONE) |
| 9514 | return &tilegx_opcodes[next]; |
| 9515 | |
| 9516 | index = next - TILEGX_OPC_NONE; |
| 9517 | } |
| 9518 | } |
| 9519 | |
| 9520 | int |
| 9521 | parse_insn_tilegx(tilegx_bundle_bits bits, |