Re: [PATCH 1/2] RISC-V: Describe correct USEs for gpr_save pattern [PR95252]
Hi Andreas: Thanks for your reminder, fixed on trunk: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=82a3008e56c620008b4575a97e459e2769df54db On Sat, Jun 13, 2020 at 4:58 PM Andreas Schwab wrote: > > On Jun 10 2020, Kito Cheng wrote: > > > - Verified on rv32emc/rv32gc/rv64gc bare-metal target and rv32gc/rv64gc > >linux target with qemu. > > Obviously not: > > ../../gcc/config/riscv/riscv.c:5190:21: error: comparison of integer > expressions of different signedness: 'int' and 'unsigned int' > [-Werror=sign-compare] > 5190 | for (int i = 1; i < veclen; ++i) > | ~~^~~~ > In file included from ../../gcc/config/riscv/riscv.c:26: > ../../gcc/config/riscv/riscv.c: In function 'bool > riscv_gpr_save_operation_p(rtx)': > ../../gcc/config/riscv/riscv.c:5219:19: error: comparison of integer > expressions of different signedness: 'long int' and 'long unsigned int' > [-Werror=sign-compare] > 5219 | gcc_assert (len <= ARRAY_SIZE (gpr_save_reg_order)); > ../../gcc/system.h:748:14: note: in definition of macro 'gcc_assert' > 748 |((void)(!(EXPR) ? fancy_abort (__FILE__, __LINE__, __FUNCTION__), > 0 : 0)) > | ^~~~ > > Andreas. > > -- > Andreas Schwab, sch...@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different."
Re: [PATCH 1/2] RISC-V: Describe correct USEs for gpr_save pattern [PR95252]
On Jun 10 2020, Kito Cheng wrote: > - Verified on rv32emc/rv32gc/rv64gc bare-metal target and rv32gc/rv64gc >linux target with qemu. Obviously not: ../../gcc/config/riscv/riscv.c:5190:21: error: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Werror=sign-compare] 5190 | for (int i = 1; i < veclen; ++i) | ~~^~~~ In file included from ../../gcc/config/riscv/riscv.c:26: ../../gcc/config/riscv/riscv.c: In function 'bool riscv_gpr_save_operation_p(rtx)': ../../gcc/config/riscv/riscv.c:5219:19: error: comparison of integer expressions of different signedness: 'long int' and 'long unsigned int' [-Werror=sign-compare] 5219 | gcc_assert (len <= ARRAY_SIZE (gpr_save_reg_order)); ../../gcc/system.h:748:14: note: in definition of macro 'gcc_assert' 748 |((void)(!(EXPR) ? fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0 : 0)) | ^~~~ Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Re: [PATCH 1/2] RISC-V: Describe correct USEs for gpr_save pattern [PR95252]
Committed with adding comments for those two functions. On Thu, Jun 11, 2020 at 5:10 AM Jim Wilson wrote: > > On Wed, Jun 10, 2020 at 1:08 AM Kito Cheng wrote: > > * config/riscv/riscv.c (gpr_save_reg_order): New. > > (riscv_expand_prologue): Use riscv_gen_gpr_save_insn to gen > > gpr_save. > > (riscv_gen_gpr_save_insn): New. > > ... > > Looks good to me. Though these two new functions should have > explanatory comments before them indicating what they do. > > Jim
Re: [PATCH 1/2] RISC-V: Describe correct USEs for gpr_save pattern [PR95252]
On Wed, Jun 10, 2020 at 1:08 AM Kito Cheng wrote: > * config/riscv/riscv.c (gpr_save_reg_order): New. > (riscv_expand_prologue): Use riscv_gen_gpr_save_insn to gen gpr_save. > (riscv_gen_gpr_save_insn): New. > ... Looks good to me. Though these two new functions should have explanatory comments before them indicating what they do. Jim