This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix MIPS jalr(.hb) register checking


Fu, Chao-Ying wrote:
[...]
 		      if (regno == lastregno)
 		        {
-			  insn_error = _("source and destinationations must be different");
+			  insn_error = _("source and destination must be different");
 			  continue;
 		        }

I question why we are doing this check in the first place.


The ISA manual says not to place the destination in the same register as the source because if you trap in the delay slot you want to be able to re-try the instruction.

If the programmer *knows* that there will not be a trap, then they could use the same register. I don't think the assembler should prevent this.

David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]