Skip to content
Snippets Groups Projects
Commit 46888571 authored by Kito Cheng's avatar Kito Cheng
Browse files

RISC-V: Add cr and cf constraint

gcc/ChangeLog:

	* config/riscv/constraints.md (cr): New.
	(cf): New.
	* config/riscv/riscv.h (reg_class): Add RVC_GR_REGS and
	RVC_FP_REGS.
	(REG_CLASS_NAMES): Ditto.
	(REG_CLASS_CONTENTS): Ditto.
	* doc/md.texi: Document cr and cf constraint.
	* config/riscv/riscv.cc (riscv_regno_to_class): Update
	FP_REGS to RVC_FP_REGS since it smaller set.
	(riscv_secondary_memory_needed): Handle RVC_FP_REGS.
	(riscv_register_move_cost): Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/constraint-cf-zfinx.c: New.
	* gcc.target/riscv/constraint-cf.c: New.
	* gcc.target/riscv/constraint-cr.c: New.
parent 1a2e0fcb
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