diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-06-02 14:03:23 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-06-02 14:03:23 +0100 |
commit | 4eb6f892502bad1ec4e1828d0140959bb004a3b6 (patch) | |
tree | b1f2e98c1a8fde0077bc4831607528533b25a241 /gas/testsuite | |
parent | 5b6312fd20ef39f1531e37e7d2601c54d5658119 (diff) | |
download | gdb-4eb6f892502bad1ec4e1828d0140959bb004a3b6.zip gdb-4eb6f892502bad1ec4e1828d0140959bb004a3b6.tar.gz gdb-4eb6f892502bad1ec4e1828d0140959bb004a3b6.tar.bz2 |
Add support for 48 and 64 bit ARC instructions.
gas * config/tc-arc.c (parse_opcode_flags): New function.
(find_opcode_match): Move flag parsing code out to new function.
Ignore operands marked IGNORE.
(build_fake_opcode_hash_entry): New function.
(find_special_case_long_opcode): New function.
(find_special_case): Lookup long opcodes.
* testsuite/gas/arc/nps400-7.d: New file.
* testsuite/gas/arc/nps400-7.s: New file.
include * opcode/arc.h (MAX_INSN_ARGS): Increase to 16.
(struct arc_long_opcode): New structure.
(arc_long_opcodes): Declare.
(arc_num_long_opcodes): Declare.
opcodes * arc-dis.c (struct arc_operand_iterator): New structure.
(find_format_from_table): All the old content from find_format,
with some minor adjustments, and parameter renaming.
(find_format_long_instructions): New function.
(find_format): Rewritten.
(arc_insn_length): Add LSB parameter.
(extract_operand_value): New function.
(operand_iterator_next): New function.
(print_insn_arc): Use new functions to find opcode, and iterator
over operands.
* arc-opc.c (insert_nps_3bit_dst_short): New function.
(extract_nps_3bit_dst_short): New function.
(insert_nps_3bit_src2_short): New function.
(extract_nps_3bit_src2_short): New function.
(insert_nps_bitop1_size): New function.
(extract_nps_bitop1_size): New function.
(insert_nps_bitop2_size): New function.
(extract_nps_bitop2_size): New function.
(insert_nps_bitop_mod4_msb): New function.
(extract_nps_bitop_mod4_msb): New function.
(insert_nps_bitop_mod4_lsb): New function.
(extract_nps_bitop_mod4_lsb): New function.
(insert_nps_bitop_dst_pos3_pos4): New function.
(extract_nps_bitop_dst_pos3_pos4): New function.
(insert_nps_bitop_ins_ext): New function.
(extract_nps_bitop_ins_ext): New function.
(arc_operands): Add new operands.
(arc_long_opcodes): New global array.
(arc_num_long_opcodes): New global.
* arc-nps400-tbl.h: Add comments referencing arc_long_opcodes.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/arc/nps400-7.d | 32 | ||||
-rw-r--r-- | gas/testsuite/gas/arc/nps400-7.s | 41 |
2 files changed, 73 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arc/nps400-7.d b/gas/testsuite/gas/arc/nps400-7.d new file mode 100644 index 0000000..8e47d19 --- /dev/null +++ b/gas/testsuite/gas/arc/nps400-7.d @@ -0,0 +1,32 @@ +#as: -mcpu=nps400 +#objdump: -dr + +.*: +file format .*arc.* + +Disassembly of section .text: + +[0-9a-f]+ <.*>: + 0: 5823 0224 10c5 mrgb r0,r0,r1,0x4,0x5,0x3,0x8,0x6,0x2 + 6: 5a23 8224 10c5 mrgb.cl r2,r2,r1,0x4,0x5,0x3,0x8,0x6,0x2 + c: 5940 0e04 10c2 mov2b r1,r1,r2,0x4,0x3,0x2,0x8,0x1,0x6 + 12: 5940 8e04 10c2 mov2b.cl r1,r2,0x4,0x3,0x2,0x8,0x1,0x6 + 18: 5b81 01cf f945 ext4b r3,r3,r12,0x1c,0x5,0xa,0x1e,0x1f + 1e: 5aa1 81cf f945 ext4b.cl r2,r13,0x1c,0x5,0xa,0x1e,0x1f + 24: 5b82 01cf f945 ins4b r3,r3,r12,0x5,0xa,0x1e,0x1f,0x1c + 2a: 5aa2 81cf f945 ins4b.cl r2,r13,0x5,0xa,0x1e,0x1f,0x1c + 30: 5e90 5280 d953 8446 mov3b r14,r14,r12,0x1,0,0x6,0x7,0x3,0x2,0x14,0x2,0x15 + 38: 5990 0c60 e281 9201 mov3b r1,r1,r12,0x4,0x1,0x1,0x3,0,0x10,0x3,0x3,0x8 + 40: 5e90 39c0 8c34 204e mov3b r14,r14,r12,0x8,0x2,0xe,0x8,0x1,0x2,0xe,0,0x3 + 48: 5990 14a0 b621 b1a1 mov3b r1,r1,r12,0xc,0x3,0x1,0x3,0x2,0xd,0x5,0x1,0x2 + 50: 5831 3180 e800 0421 mov3bcl r0,r1,0x1,0,0x1,0,0x1,0x1,0xc,0x3,0 + 58: 5831 7fe0 d23b 0845 mov3bcl r0,r1,0x2,0x1,0x5,0x16,0x2,0x2,0x1f,0x2,0x3 + 60: 5831 7bc0 bdfb 8cc9 mov3bcl r0,r1,0x3,0x2,0x9,0x17,0x3,0x6,0x1e,0x1,0x1f + 68: 5831 7bc0 87ec 13cb mov3bcl r0,r1,0x4,0x3,0xb,0x18,0,0x1e,0x1e,0,0x1e + 70: 58d0 38c3 3671 2814 mov4b r0,r0,r14,0xa,0x3,0x14,0x2,0x2,0,0x6,0x1,0x7,0xe,0,0x3 + 78: 58d0 e3e2 58b6 048b mov4b r0,r0,r14,0x1,0,0xb,0xc,0x3,0x4,0x1f,0x2,0xb,0x18,0x1,0x2 + 80: 58d0 2068 e3fa 97c8 mov4b r0,r0,r14,0x5,0x1,0x8,0x15,0,0x1e,0x3,0x3,0x1f,0x8,0x2,0x8 + 88: 58d0 91a4 8deb 3ecd mov4b r0,r0,r14,0xf,0x2,0xd,0x16,0x1,0x16,0xd,0,0x1e,0x4,0x3,0x4 + 90: 5cb1 1064 7231 0441 mov4bcl r12,r13,0x1,0x1,0x1,0x2,0x2,0x2,0x3,0x3,0x3,0x4,0,0x4 + 98: 5dd1 9064 1c31 0441 mov4bcl r13,r14,0x1,0x2,0x1,0x2,0x3,0x2,0x3,0,0x3,0x4,0x1,0x4 + a0: 5a71 1064 a631 0441 mov4bcl r2,r3,0x1,0x3,0x1,0x2,0,0x2,0x3,0x1,0x3,0x4,0x2,0x4 + a8: 5951 9064 c831 0441 mov4bcl r1,r2,0x1,0,0x1,0x2,0x1,0x2,0x3,0x2,0x3,0x4,0x3,0x4 diff --git a/gas/testsuite/gas/arc/nps400-7.s b/gas/testsuite/gas/arc/nps400-7.s new file mode 100644 index 0000000..d02712b --- /dev/null +++ b/gas/testsuite/gas/arc/nps400-7.s @@ -0,0 +1,41 @@ + .text + + ;; mrgb + mrgb r0,r0,r1,4,5,3,8,6,2 + mrgb.cl r2,r2,r1,4,5,3,8,6,2 + + ;; mov2b + mov2b r1,r1,r2,4,3,2,8,1,6 + mov2b.cl r1,r2,4,3,2,8,1,6 + + ;; ext4b + ext4b r3,r3,r12,28,5,10,30,31 + ext4b.cl r2,r13,28,5,10,30,31 + + ;; ins4b + ins4b r3,r3,r12,5,10,30,31,28 + ins4b.cl r2,r13,5,10,30,31,28 + + ;; mov3b + mov3b r14,r14,r12, 1,0,6, 7,3,2, 20,2,21 + mov3b r1,r1,r12, 4,1,1, 3,0,16, 3,3,8 + mov3b r14,r14,r12, 8,2,14, 8,1,2, 14,0,3 + mov3b r1,r1,r12, 12,3,1, 3,2,13, 5,1,2 + + ;; mov3bcl + mov3bcl r0,r1, 1,0,1, 0,1,1, 12,3,0 + mov3b.cl r0,r1, 2,1,5, 22,2,2, 31,2,3 + mov3bcl r0,r1, 3,2,9, 23,3,6, 30,1,31 + mov3b.cl r0,r1, 4,3,11, 24,0,30, 30,0,30 + + ;; mov4b + mov4b r0,r0,r14, 10,3,20, 2,2,0, 6,1,7, 14,0,3 + mov4b r0,r0,r14, 1,0,11, 12,3,4, 31,2,11, 24,1,2 + mov4b r0,r0,r14, 5,1,8, 21,0,30, 3,3,31, 8,2,8 + mov4b r0,r0,r14, 15,2,13, 22,1,22, 13,0,30, 4,3,4 + + ;; mov4bl + mov4bcl r12,r13,1,1,1,2,2,2,3,3,3,4,0,4 + mov4b.cl r13,r14,1,2,1,2,3,2,3,0,3,4,1,4 + mov4bcl r2,r3, 1,3,1,2,0,2,3,1,3,4,2,4 + mov4b.cl r1,r2, 1,0,1,2,1,2,3,2,3,4,3,4 |