RISC-V: Added half-precision floating-point v1.0 instructions.

bfd/
	* elfxx-riscv.c (riscv_implicit_subsets): Added implicit f
	and zicsr for zfh.
	(riscv_supported_std_z_ext): Added default v1.0 version for zfh.
	(riscv_multi_subset_supports): Handle INSN_CLASS_ZFH,
	INSN_CLASS_D_AND_ZFH and INSN_CLASS_Q_AND_ZFH.
gas/
	* config/tc-riscv.c (FLT_CHARS): Added "hH".
	(macro): Expand Pseudo M_FLH and M_FSH.
	(riscv_pseudo_table): Added .float16 directive.
	* testsuite/gas/riscv/float16-be.d: New testcase for .float16.
	* testsuite/gas/riscv/float16-le.d: Likewise.
	* testsuite/gas/riscv/float16.s: Likewise.
	* testsuite/gas/riscv/fp-zfh-insns.d: New testcase for zfh.
	* testsuite/gas/riscv/fp-zfh-insns.s: Likewise.
include/
	* opcode/riscv-opc.h: Added MASK and MATCH encodings for zfh.
	* opcode/riscv.h: Added INSN_CLASS and pseudo macros for zfh.
opcodes/
	* riscv-opc.c (riscv_opcodes): Added zfh instructions.
This commit is contained in:
Nelson Chu
2020-03-26 18:38:27 +08:00
parent 626d0e40e5
commit 035784e345
10 changed files with 344 additions and 1 deletions

View File

@ -370,6 +370,9 @@ enum riscv_insn_class
INSN_CLASS_F_OR_ZFINX,
INSN_CLASS_D_OR_ZDINX,
INSN_CLASS_Q_OR_ZQINX,
INSN_CLASS_ZFH,
INSN_CLASS_D_AND_ZFH,
INSN_CLASS_Q_AND_ZFH,
INSN_CLASS_ZBA,
INSN_CLASS_ZBB,
INSN_CLASS_ZBC,
@ -498,6 +501,8 @@ enum
M_SEXTH,
M_VMSGE,
M_VMSGEU,
M_FLH,
M_FSH,
M_NUM_MACROS
};