RISC-V: Add .insn support.
authorJim Wilson <jimw@sifive.com>
Wed, 14 Mar 2018 23:04:03 +0000 (16:04 -0700)
committerJim Wilson <jimw@sifive.com>
Wed, 14 Mar 2018 23:04:03 +0000 (16:04 -0700)
commit0e35537d754f1c687850d1caccb2d78d2e418391
tree61e8574058def02b9f33ceba1eab999e575cad8e
parent3ae9ce5dd7d1119ca2c94c63a07b04921048ebe3
RISC-V: Add .insn support.

gas/ChangeLog
2018-03-07  Kito Cheng  <kito.cheng@gmail.com>
* config/tc-riscv.c (opcode_name_list): New.
(opcode_names_hash): Likewise.
(init_opcode_names_hash): Likewise.
(opcode_name_lookup): Likewise.
(validate_riscv_insn): New argument length, and add new format
which used in .insn directive.
(md_begin): Refine hash table initialization logic into
init_opcode_hash.
(init_opcode_hash): New.
(my_getOpcodeExpression): Parse opcode name for .insn.
(riscv_ip): New argument hash, able to handle .insn directive.
(s_riscv_insn): Handler for .insn directive.
(riscv_pseudo_table): New entry for .insn.
* doc/c-riscv.texi: Add documentation for .insn directive.
* testsuite/gas/riscv/insn.d: Add testcase for .insn directive.
* testsuite/gas/riscv/insn.s: Likewise.

include/ChangeLog
2018-03-07  Kito Cheng  <kito.cheng@gmail.com>
* opcode/riscv.h (OP_MASK_FUNCT3): New.
(OP_SH_FUNCT3): Likewise.
(OP_MASK_FUNCT7): Likewise.
(OP_SH_FUNCT7): Likewise.
(OP_MASK_OP2): Likewise.
(OP_SH_OP2): Likewise.
(OP_MASK_CFUNCT4): Likewise.
(OP_SH_CFUNCT4): Likewise.
(OP_MASK_CFUNCT3): Likewise.
(OP_SH_CFUNCT3): Likewise.
(riscv_insn_types): Likewise.

opcodes/ChangeLog
2018-03-07  Kito Cheng  <kito.cheng@gmail.com>
* riscv-opc.c (riscv_insn_types): New.
gas/ChangeLog
gas/config/tc-riscv.c
gas/doc/c-riscv.texi
include/ChangeLog
include/opcode/riscv.h
opcodes/ChangeLog
opcodes/riscv-opc.c