The code to support the case when the register allocator has assigned
the same register to the src and the dst register operand isn't actually
needed:
- LDWRdPtr and LDDWRdPtrQ have an @earlyclobber on the output register, so the register allocator will make sure to allocate a different register for the output register.
- LDDWRdYQ does not have an @earlyclobber, but the pointer register is the fixed Y register which is reserved. The register allocator won't use reserved registers for the output value.
This removes a special case in the code that makes the pseudo
instruction expansion pass more complicated than it needs to be.
I tested this locally with TinyGo and all test cases still pass, so that gives some confidence that this doesn't break anything.