]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Fix register class subset checks for CLASS_MAX_NREGS
authorMaciej W. Rozycki <macro@embecosm.com>
Wed, 3 Nov 2021 17:04:19 +0000 (17:04 +0000)
committerMaciej W. Rozycki <macro@embecosm.com>
Wed, 3 Nov 2021 17:05:48 +0000 (17:05 +0000)
commita31056e9196daf0a5b0e92d171b5227cc994103b
tree03a150751a29601a46f045f5d596d86f13bf645e
parent1e7a269856fd67aff78ac874bec96d31a54b2fd9
RISC-V: Fix register class subset checks for CLASS_MAX_NREGS

Fix the register class subset checks in the determination of the maximum
number of consecutive registers needed to hold a value of a given mode.

The number depends on whether a register is a general-purpose or a
floating-point register, so check whether the register class requested
is a subset (argument 1 to `reg_class_subset_p') rather than superset
(argument 2) of GR_REGS or FP_REGS class respectively.

gcc/
* config/riscv/riscv.c (riscv_class_max_nregs): Swap the
arguments to `reg_class_subset_p'.
gcc/config/riscv/riscv.c