From 4765cd611992862c844e8f152c5dbaadaecc25ce Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Tue, 27 Nov 2018 11:29:23 -0800 Subject: RISC-V: Add .insn CA support. gas/ * config/tc-riscv.c (validate_riscv_insn) <'F'>: Add support for CF6 and CF2 operands. (riscv_ip) <'F'>: Likewise. * doc/c-riscv.texi (RISC-V-Formats): Add func6 abbreviation. Use rs2 instead of rs1 in CR description. Add CA docs. * gas/testsuite/riscv/insn.s: Add use of .insn ca. * gas/testsuite/riscv/insn.d: Update to match. include/ * opcode/riscv.h (OP_MASK_CFUNCT6, OP_SH_CFUNCT6): New. (OP_MASK_CFUNCT2, OP_SH_CFUNCT2): New. opcodes/ * riscv-opc.c (ciw): Fix whitespace to align columns. (ca): New. --- gas/doc/c-riscv.texi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gas/doc') diff --git a/gas/doc/c-riscv.texi b/gas/doc/c-riscv.texi index 045c33a..938c96e 100644 --- a/gas/doc/c-riscv.texi +++ b/gas/doc/c-riscv.texi @@ -190,6 +190,7 @@ instruction formats: @item opcode @tab Unsigned immediate or opcode name for 7-bits opcode. @item opcode2 @tab Unsigned immediate or opcode name for 2-bits opcode. @item func7 @tab Unsigned immediate for 7-bits function code. +@item func6 @tab Unsigned immediate for 6-bits function code. @item func4 @tab Unsigned immediate for 4-bits function code. @item func3 @tab Unsigned immediate for 3-bits function code. @item func2 @tab Unsigned immediate for 2-bits function code. @@ -355,7 +356,7 @@ with the @samp{.insn} pseudo directive: 31 30 21 20 12 7 0 @end verbatim -@item CR type: .insn cr opcode2, func4, rd, rs1 +@item CR type: .insn cr opcode2, func4, rd, rs2 @verbatim +---------+--------+-----+---------+ | func4 | rd/rs1 | rs2 | opcode2 | @@ -379,6 +380,14 @@ with the @samp{.insn} pseudo directive: 15 13 7 2 0 @end verbatim +@item CA type: .insn ca opcode2, func6, func2, rd, rs2 +@verbatim ++---------+----------+-------+------+--------+ +| func6 | rd'/rs1' | func2 | rs2' | opcode | ++---------+----------+-------+------+--------+ +15 10 7 5 2 0 +@end verbatim + @item CB type: .insn cb opcode2, func3, rs1, symbol @verbatim +---------+--------+------+--------+---------+ -- cgit v1.1