RISC-V: Add pause hint instruction.
authorPhilipp Tomsich <prt@gnu.org>
Thu, 7 Jan 2021 07:53:25 +0000 (15:53 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Thu, 7 Jan 2021 08:45:43 +0000 (16:45 +0800)
commitaa881ecde48c7a0224b92e2cfa43b37ee9ec9fa2
tree1b0e0814c4a7ed9567d8d49aad19de327ea78682
parent4d4490b8d772321e9634541b81be25095a5a06ef
RISC-V: Add pause hint instruction.

Add support for the pause hint instruction, as specified in the
Zihintpause extension.  The pause instruction is encoded as a
special form of a memory fence (which is available as part of the
base instruction set).  The chosen encoding does not mandate any
particular memory ordering and therefore is a true hint.

bfd/
    * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
gas/
    * config/tc-riscv.c (riscv_multi_subset_supports): Added
    INSN_CLASS_ZIHINTPAUSE.
    * testsuite/gas/riscv/pause.d: New testcase.  Adding coverage for
    the pause hint instruction.
    * testsuite/gas/riscv/pause.s: Likewise.
include/
    * opcode/riscv-opc.h: Added MATCH_PAUSE, MASK_PAUSE and DECLARE_INSN
    for pause hint instruction.
    * opcode/riscv.h (enum riscv_insn_class): Added INSN_CLASS_ZIHINTPAUSE.
opcodes/
    * riscv-opc.c (riscv_opcodes): Add pause hint instruction.
bfd/ChangeLog
bfd/elfxx-riscv.c
gas/ChangeLog
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/pause.d [new file with mode: 0644]
gas/testsuite/gas/riscv/pause.s [new file with mode: 0644]
include/ChangeLog
include/opcode/riscv-opc.h
include/opcode/riscv.h
opcodes/ChangeLog
opcodes/riscv-opc.c