Re: [PATCH] RISC-V: Compute default ABI from -mcpu or -march

2022-06-08 Thread Andrew Pinski via Gcc-patches
On Mon, Jun 6, 2022 at 7:53 PM wangpc via Gcc-patches wrote: > > If -mcpu or -march is specified and there is no -mabi, we will calculate > default ABI from arch string provided by -march or defined in CPU info. This is 100% wrong and goes against what all other targets do. All other targets have

Re: [PATCH] RISC-V: Compute default ABI from -mcpu or -march

2022-06-08 Thread Kito Cheng via Gcc-patches
I also prefer adding a -mabi=auto option rather than change existing behavior. On Wed, Jun 8, 2022 at 5:06 PM pc.wang via Gcc-patches wrote: > > Thanks for your opinion! I did these just because LLVM has already done the > same thing and I wanted to make GCC with the same behavior of LLVM. The o

Re: [PATCH] RISC-V: Compute default ABI from -mcpu or -march

2022-06-08 Thread pc.wang via Gcc-patches
Thanks for your opinion! I did these just because LLVM has already done the same thing and I wanted to make GCC with the same behavior of LLVM. The only difference is that LLVM has no handling for ilp32f and lp64f and I have sent a patch to do it (sees https://reviews.llvm.org/D125947). As for R

Re: [PATCH] RISC-V: Compute default ABI from -mcpu or -march

2022-06-07 Thread Palmer Dabbelt
On Mon, 06 Jun 2022 19:51:20 PDT (-0700), gcc-patches@gcc.gnu.org wrote: If -mcpu or -march is specified and there is no -mabi, we will calculate default ABI from arch string provided by -march or defined in CPU info. IMO this is generally a good idea and we've talked about it before, but just