RISC-V: Prefetch hint instructions and operand set
authorTsukasa OI <research_trasio@irq.a4lg.com>
Tue, 11 Jan 2022 10:14:02 +0000 (19:14 +0900)
committerNelson Chu <nelson.chu@sifive.com>
Fri, 18 Mar 2022 07:32:16 +0000 (15:32 +0800)
commit3b374308d3006407b9571e573e4ccce4e904a4c4
tree96bfce86a830f793e0ef73924c4b3c1b3788b68a
parent5fac3f02edacfca458f7eeaaaa33a87e26e0e332
RISC-V: Prefetch hint instructions and operand set

This commit adds 'Zicbop' hint instructions.

bfd/ChangeLog:

* elfxx-riscv.c (riscv_multi_subset_supports): Add handling for
new instruction class.

gas/ChangeLog:

* config/tc-riscv.c (riscv_ip): Add handling for new operand
type 'f' (32-byte aligned pseudo S-type immediate for prefetch
hints).
(validate_riscv_insn): Likewise.

include/ChangeLog:

* opcode/riscv-opc.h (MATCH_PREFETCH_I, MASK_PREFETCH_I,
MATCH_PREFETCH_R, MASK_PREFETCH_R, MATCH_PREFETCH_W,
MASK_PREFETCH_W): New macros.
* opcode/riscv.h (enum riscv_insn_class): Add new instruction
class INSN_CLASS_ZICBOP.

opcodes/ChangeLog:

* riscv-dis.c (print_insn_args): Add handling for new operand
type.
* riscv-opc.c (riscv_opcodes): Add prefetch hint instructions.
bfd/elfxx-riscv.c
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/zicbop-fail.d [new file with mode: 0644]
gas/testsuite/gas/riscv/zicbop-fail.l [new file with mode: 0644]
gas/testsuite/gas/riscv/zicbop-fail.s [new file with mode: 0644]
gas/testsuite/gas/riscv/zicbop.d [new file with mode: 0644]
gas/testsuite/gas/riscv/zicbop.s [new file with mode: 0644]
include/opcode/riscv-opc.h
include/opcode/riscv.h
opcodes/riscv-dis.c
opcodes/riscv-opc.c