Re: [PATCH] MIPS: Use Reg0 instead of const0_rtx for TRAP

2024-06-19 Thread YunQiang Su
YunQiang Su 于2024年6月20日周四 11:20写道: > > Maciej W. Rozycki 于2024年6月20日周四 01:24写道: > > > > On Wed, 19 Jun 2024, YunQiang Su wrote: > > > > > MIPSr6 removes condition trap instructions with imm, so the instruction > > > like `teq $2,imm` will be converted to > > > li $at, imm > > > teq $2, $at >

Re: [PATCH] MIPS: Use Reg0 instead of const0_rtx for TRAP

2024-06-19 Thread YunQiang Su
Maciej W. Rozycki 于2024年6月20日周四 01:24写道: > > On Wed, 19 Jun 2024, YunQiang Su wrote: > > > MIPSr6 removes condition trap instructions with imm, so the instruction > > like `teq $2,imm` will be converted to > > li $at, imm > > teq $2, $at > > > > The current version of Gas cannot detect if imm

Re: [PATCH] MIPS: Use Reg0 instead of const0_rtx for TRAP

2024-06-19 Thread Maciej W. Rozycki
On Wed, 19 Jun 2024, YunQiang Su wrote: > MIPSr6 removes condition trap instructions with imm, so the instruction > like `teq $2,imm` will be converted to > li $at, imm > teq $2, $at > > The current version of Gas cannot detect if imm is zero, and output > teq $2, $0 > Let's do it in GCC.

[PATCH] MIPS: Use Reg0 instead of const0_rtx for TRAP

2024-06-19 Thread YunQiang Su
MIPSr6 removes condition trap instructions with imm, so the instruction like `teq $2,imm` will be converted to li $at, imm teq $2, $at The current version of Gas cannot detect if imm is zero, and output teq $2, $0 Let's do it in GCC. gcc * config/mips/mips.cc(mips_expand_conditional