[PATCH] MIPS/GAS: Omit LI 0 for condition trap

Maciej W. Rozycki macro@orcam.me.uk
Wed Jun 19 18:22:15 GMT 2024


On Thu, 20 Jun 2024, YunQiang Su wrote:

> MIPSr6 removes condition trap instructions with imm, so we expand
> the instruction like "tne $2,IMM" to
> 	li	$at,IMM
> 	tne	$2,$at
> While if IMM is 0, we can use
> 	tne	$2,$zero
> only.

 Thanks for the submission.  It is indeed a missed optimisation since the 
use of the macros for the trap instructions has changed with the removal 
of the immediate forms as from the MIPSr6 ISA.  I'll have a look into it 
as there seems more to cover here.

  Maciej


More information about the Binutils mailing list