RISC-V: Add compressed instruction hints, and a few misc cleanups.
authorJim Wilson <jimw@sifive.com>
Wed, 20 Dec 2017 21:37:44 +0000 (13:37 -0800)
committerJim Wilson <jimw@sifive.com>
Wed, 20 Dec 2017 21:37:44 +0000 (13:37 -0800)
commit21a186f28061ea51e422ae47d062793ceac2180f
treee0204141cc96889ab2e46f8e626c210539c4c650
parent396d3980f518cfc9a936e3fb8138b0492399525a
RISC-V: Add compressed instruction hints, and a few misc cleanups.

gas/
* config/tc-riscv.c (risc_ip) <o>: Add comment.
* testsuite/gas/riscv/c-nonzero-imm.d,
* testsuite/gas/riscv/c-nonzero-imm.l,
* testsuite/gas/riscv/c-nonzero-imm.s,
* testsuite/gas/riscv/c-nonzero-reg.d,
* testsuite/gas/riscv/c-nonzero-reg.l,
* testsuite/gas/riscv/c-nonzero-reg.s,
* testsuite/gas/riscv/c-zero-imm-64.d,
* testsuite/gas/riscv/c-zero-imm-64.s,
* testsuite/gas/riscv/c-zero-imm.d, testsuite/gas/riscv/c-zero-imm.s,
* testsuite/gas/riscv/c-zero-reg.d,
* testsuite/gas/riscv/c-zero-reg.s: New.

opcodes/
* riscv-opc.c (match_c_add_with_hint, match_c_lui_with_hint): New.
(riscv_opcodes) <li>: Delete "d,0" line.  Change Cj to Co.
<andi, and, add, addiw, addw, c.addi>: Change Cj to Co.
<add>: Add explanatory comment for 4-operand add instruction.
<c.nop>: Add support for immediate operand.
<c.mv, c.add>: Use match_c_add_with_hint instead of match_c_add.
<c.lui>: Use match_c_lui_with_hint instead of match_c_lui.
<c.li, c.slli>: Use match_opcode instead of match_rd_nonzero.
16 files changed:
gas/ChangeLog
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/c-nonzero-imm.d [new file with mode: 0644]
gas/testsuite/gas/riscv/c-nonzero-imm.l [new file with mode: 0644]
gas/testsuite/gas/riscv/c-nonzero-imm.s [new file with mode: 0644]
gas/testsuite/gas/riscv/c-nonzero-reg.d [new file with mode: 0644]
gas/testsuite/gas/riscv/c-nonzero-reg.l [new file with mode: 0644]
gas/testsuite/gas/riscv/c-nonzero-reg.s [new file with mode: 0644]
gas/testsuite/gas/riscv/c-zero-imm-64.d [new file with mode: 0644]
gas/testsuite/gas/riscv/c-zero-imm-64.s [new file with mode: 0644]
gas/testsuite/gas/riscv/c-zero-imm.d [new file with mode: 0644]
gas/testsuite/gas/riscv/c-zero-imm.s [new file with mode: 0644]
gas/testsuite/gas/riscv/c-zero-reg.d [new file with mode: 0644]
gas/testsuite/gas/riscv/c-zero-reg.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/riscv-opc.c