[PATCH] Fix MIPS jalr(.hb) register checking
David Daney
ddaney@caviumnetworks.com
Mon Dec 22 19:41:00 GMT 2008
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
More information about the Binutils
mailing list