Skip to content
Snippets Groups Projects
Commit 75047aeb authored by Christoph Müllner's avatar Christoph Müllner Committed by Philipp Tomsich
Browse files

riscv: thead: Add support for the XTheadFmv ISA extension


The XTheadFmv ISA extension provides instructions to move
data between 32-bit GP registers and 64-bit FP registers.

Co-Developed-by: default avatarXianmiao Qu <cooper.qu@linux.alibaba.com>
Signed-off-by: default avatarXianmiao Qu <cooper.qu@linux.alibaba.com>
Signed-off-by: default avatarChristoph Müllner <christoph.muellner@vrull.eu>

gcc/ChangeLog:

	* config/riscv/constraints.md (TARGET_XTHEADFMV ? FP_REGS : NO_REGS)
	New constraint "th_f_fmv".
	(TARGET_XTHEADFMV ? GR_REGS : NO_REGS): New constraint
	"th_r_fmv".
	* config/riscv/riscv.cc (riscv_split_doubleword_move):
	Add split code for XTheadFmv.
	(riscv_secondary_memory_needed): XTheadFmv does not need
	secondary memory.
	* config/riscv/riscv.md: Add new UNSPEC_XTHEADFMV and
	UNSPEC_XTHEADFMV_HW. Add support for XTheadFmv to
	movdf_hardfloat_rv32.
	* config/riscv/thead.md (th_fmv_hw_w_x): New INSN.
	(th_fmv_x_w): New INSN.
	(th_fmv_x_hw): New INSN.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/xtheadfmv-fmv.c: New test.
parent b2a1bef9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment