diff options
| -rw-r--r-- | arch/tile/include/asm/opcode-tile_32.h | 93 | ||||
| -rw-r--r-- | arch/tile/include/asm/opcode-tile_64.h | 93 | ||||
| -rw-r--r-- | arch/tile/kernel/tile-desc_32.c | 13358 |
3 files changed, 1017 insertions, 12527 deletions
diff --git a/arch/tile/include/asm/opcode-tile_32.h b/arch/tile/include/asm/opcode-tile_32.h index 90f8dd372531..eda60ecbae3d 100644 --- a/arch/tile/include/asm/opcode-tile_32.h +++ b/arch/tile/include/asm/opcode-tile_32.h | |||
| @@ -28,6 +28,7 @@ typedef enum | |||
| 28 | TILE_OPC_MOVELI_SN, | 28 | TILE_OPC_MOVELI_SN, |
| 29 | TILE_OPC_MOVELIS, | 29 | TILE_OPC_MOVELIS, |
| 30 | TILE_OPC_PREFETCH, | 30 | TILE_OPC_PREFETCH, |
| 31 | TILE_OPC_RAISE, | ||
| 31 | TILE_OPC_ADD, | 32 | TILE_OPC_ADD, |
| 32 | TILE_OPC_ADD_SN, | 33 | TILE_OPC_ADD_SN, |
| 33 | TILE_OPC_ADDB, | 34 | TILE_OPC_ADDB, |
| @@ -419,43 +420,6 @@ typedef enum | |||
| 419 | 420 | ||
| 420 | #define TILE_ELF_NAME "elf32-tilepro" | 421 | #define TILE_ELF_NAME "elf32-tilepro" |
| 421 | 422 | ||
| 422 | enum | ||
| 423 | { | ||
| 424 | TILE_SN_MAX_OPERANDS = 6 /* route */ | ||
| 425 | }; | ||
| 426 | |||
| 427 | typedef enum | ||
| 428 | { | ||
| 429 | TILE_SN_OPC_BZ, | ||
| 430 | TILE_SN_OPC_BNZ, | ||
| 431 | TILE_SN_OPC_JRR, | ||
| 432 | TILE_SN_OPC_FNOP, | ||
| 433 | TILE_SN_OPC_BLZ, | ||
| 434 | TILE_SN_OPC_NOP, | ||
| 435 | TILE_SN_OPC_MOVEI, | ||
| 436 | TILE_SN_OPC_MOVE, | ||
| 437 | TILE_SN_OPC_BGEZ, | ||
| 438 | TILE_SN_OPC_JR, | ||
| 439 | TILE_SN_OPC_BLEZ, | ||
| 440 | TILE_SN_OPC_BBNS, | ||
| 441 | TILE_SN_OPC_JALRR, | ||
| 442 | TILE_SN_OPC_BPT, | ||
| 443 | TILE_SN_OPC_JALR, | ||
| 444 | TILE_SN_OPC_SHR1, | ||
| 445 | TILE_SN_OPC_BGZ, | ||
| 446 | TILE_SN_OPC_BBS, | ||
| 447 | TILE_SN_OPC_SHL8II, | ||
| 448 | TILE_SN_OPC_ADDI, | ||
| 449 | TILE_SN_OPC_HALT, | ||
| 450 | TILE_SN_OPC_ROUTE, | ||
| 451 | TILE_SN_OPC_NONE | ||
| 452 | } tile_sn_mnemonic; | ||
| 453 | |||
| 454 | extern const unsigned char tile_sn_route_encode[6 * 6 * 6]; | ||
| 455 | extern const signed char tile_sn_route_decode[256][3]; | ||
| 456 | extern const char tile_sn_direction_names[6][5]; | ||
| 457 | extern const signed char tile_sn_dest_map[6][6]; | ||
| 458 | |||
| 459 | 423 | ||
| 460 | static __inline unsigned int | 424 | static __inline unsigned int |
| 461 | get_BrOff_SN(tile_bundle_bits num) | 425 | get_BrOff_SN(tile_bundle_bits num) |
| @@ -1387,8 +1351,6 @@ create_UnShOpcodeExtension_Y1(int num) | |||
| 1387 | } | 1351 | } |
| 1388 | 1352 | ||
| 1389 | 1353 | ||
| 1390 | typedef unsigned short tile_sn_instruction_bits; | ||
| 1391 | |||
| 1392 | 1354 | ||
| 1393 | typedef enum | 1355 | typedef enum |
| 1394 | { | 1356 | { |
| @@ -1519,41 +1481,10 @@ struct tile_opcode | |||
| 1519 | * index into the tile_operands[] table. */ | 1481 | * index into the tile_operands[] table. */ |
| 1520 | unsigned char operands[TILE_NUM_PIPELINE_ENCODINGS][TILE_MAX_OPERANDS]; | 1482 | unsigned char operands[TILE_NUM_PIPELINE_ENCODINGS][TILE_MAX_OPERANDS]; |
| 1521 | 1483 | ||
| 1522 | /* A mask of which bits have predefined values for each pipeline. | ||
| 1523 | * This is useful for disassembly. */ | ||
| 1524 | tile_bundle_bits fixed_bit_masks[TILE_NUM_PIPELINE_ENCODINGS]; | ||
| 1525 | |||
| 1526 | /* For each bit set in fixed_bit_masks, what the value is for this | ||
| 1527 | * instruction. */ | ||
| 1528 | tile_bundle_bits fixed_bit_values[TILE_NUM_PIPELINE_ENCODINGS]; | ||
| 1529 | }; | 1484 | }; |
| 1530 | 1485 | ||
| 1531 | extern const struct tile_opcode tile_opcodes[]; | 1486 | extern const struct tile_opcode tile_opcodes[]; |
| 1532 | 1487 | ||
| 1533 | struct tile_sn_opcode | ||
| 1534 | { | ||
| 1535 | /* The opcode mnemonic, e.g. "add" */ | ||
| 1536 | const char *name; | ||
| 1537 | |||
| 1538 | /* The enum value for this mnemonic. */ | ||
| 1539 | tile_sn_mnemonic mnemonic; | ||
| 1540 | |||
| 1541 | /* How many operands are there? */ | ||
| 1542 | unsigned char num_operands; | ||
| 1543 | |||
| 1544 | /* The description of the operands. Each of these is an | ||
| 1545 | * index into the tile_operands[] table. */ | ||
| 1546 | unsigned char operands[TILE_SN_MAX_OPERANDS]; | ||
| 1547 | |||
| 1548 | /* A mask of which bits have predefined values. | ||
| 1549 | * This is useful for disassembly. */ | ||
| 1550 | tile_sn_instruction_bits fixed_bit_mask; | ||
| 1551 | |||
| 1552 | /* For each bit set in fixed_bit_masks, what its value is. */ | ||
| 1553 | tile_sn_instruction_bits fixed_bit_values; | ||
| 1554 | }; | ||
| 1555 | |||
| 1556 | extern const struct tile_sn_opcode tile_sn_opcodes[]; | ||
| 1557 | 1488 | ||
| 1558 | /* Used for non-textual disassembly into structs. */ | 1489 | /* Used for non-textual disassembly into structs. */ |
| 1559 | struct tile_decoded_instruction | 1490 | struct tile_decoded_instruction |
| @@ -1571,27 +1502,5 @@ extern int parse_insn_tile(tile_bundle_bits bits, | |||
| 1571 | decoded[TILE_MAX_INSTRUCTIONS_PER_BUNDLE]); | 1502 | decoded[TILE_MAX_INSTRUCTIONS_PER_BUNDLE]); |
| 1572 | 1503 | ||
| 1573 | 1504 | ||
| 1574 | /* Canonical names of all the registers. */ | ||
| 1575 | /* ISSUE: This table lives in "tile-dis.c" */ | ||
| 1576 | extern const char * const tile_register_names[]; | ||
| 1577 | |||
| 1578 | /* Descriptor for a special-purpose register. */ | ||
| 1579 | struct tile_spr | ||
| 1580 | { | ||
| 1581 | /* The number */ | ||
| 1582 | int number; | ||
| 1583 | |||
| 1584 | /* The name */ | ||
| 1585 | const char *name; | ||
| 1586 | }; | ||
| 1587 | |||
| 1588 | /* List of all the SPRs; ordered by increasing number. */ | ||
| 1589 | extern const struct tile_spr tile_sprs[]; | ||
| 1590 | |||
| 1591 | /* Number of special-purpose registers. */ | ||
| 1592 | extern const int tile_num_sprs; | ||
| 1593 | |||
| 1594 | extern const char * | ||
| 1595 | get_tile_spr_name (int num); | ||
| 1596 | 1505 | ||
| 1597 | #endif /* opcode_tile_h */ | 1506 | #endif /* opcode_tile_h */ |
diff --git a/arch/tile/include/asm/opcode-tile_64.h b/arch/tile/include/asm/opcode-tile_64.h index 90f8dd372531..eda60ecbae3d 100644 --- a/arch/tile/include/asm/opcode-tile_64.h +++ b/arch/tile/include/asm/opcode-tile_64.h | |||
| @@ -28,6 +28,7 @@ typedef enum | |||
| 28 | TILE_OPC_MOVELI_SN, | 28 | TILE_OPC_MOVELI_SN, |
| 29 | TILE_OPC_MOVELIS, | 29 | TILE_OPC_MOVELIS, |
| 30 | TILE_OPC_PREFETCH, | 30 | TILE_OPC_PREFETCH, |
| 31 | TILE_OPC_RAISE, | ||
| 31 | TILE_OPC_ADD, | 32 | TILE_OPC_ADD, |
| 32 | TILE_OPC_ADD_SN, | 33 | TILE_OPC_ADD_SN, |
| 33 | TILE_OPC_ADDB, | 34 | TILE_OPC_ADDB, |
| @@ -419,43 +420,6 @@ typedef enum | |||
| 419 | 420 | ||
| 420 | #define TILE_ELF_NAME "elf32-tilepro" | 421 | #define TILE_ELF_NAME "elf32-tilepro" |
| 421 | 422 | ||
| 422 | enum | ||
| 423 | { | ||
| 424 | TILE_SN_MAX_OPERANDS = 6 /* route */ | ||
| 425 | }; | ||
| 426 | |||
| 427 | typedef enum | ||
| 428 | { | ||
| 429 | TILE_SN_OPC_BZ, | ||
| 430 | TILE_SN_OPC_BNZ, | ||
| 431 | TILE_SN_OPC_JRR, | ||
| 432 | TILE_SN_OPC_FNOP, | ||
| 433 | TILE_SN_OPC_BLZ, | ||
| 434 | TILE_SN_OPC_NOP, | ||
| 435 | TILE_SN_OPC_MOVEI, | ||
| 436 | TILE_SN_OPC_MOVE, | ||
| 437 | TILE_SN_OPC_BGEZ, | ||
| 438 | TILE_SN_OPC_JR, | ||
| 439 | TILE_SN_OPC_BLEZ, | ||
| 440 | TILE_SN_OPC_BBNS, | ||
| 441 | TILE_SN_OPC_JALRR, | ||
| 442 | TILE_SN_OPC_BPT, | ||
| 443 | TILE_SN_OPC_JALR, | ||
| 444 | TILE_SN_OPC_SHR1, | ||
| 445 | TILE_SN_OPC_BGZ, | ||
| 446 | TILE_SN_OPC_BBS, | ||
| 447 | TILE_SN_OPC_SHL8II, | ||
| 448 | TILE_SN_OPC_ADDI, | ||
| 449 | TILE_SN_OPC_HALT, | ||
| 450 | TILE_SN_OPC_ROUTE, | ||
| 451 | TILE_SN_OPC_NONE | ||
| 452 | } tile_sn_mnemonic; | ||
| 453 | |||
| 454 | extern const unsigned char tile_sn_route_encode[6 * 6 * 6]; | ||
| 455 | extern const signed char tile_sn_route_decode[256][3]; | ||
