I was looking how to encode the mov instruction when both operands are registers. Looking at the manual, the encoding uses the, 1-bit, 'D' field. It changes whether the source or the destination is specified by the 'REG' field. But, as both operands are registers, I can just change the order in the encoding between the 'R/M' field and 'REG' field according to the value of the 'D' field, making:
mov ax, ax= 1000100111000000 = 1000101111000000
mov ax, bx= 1000100111001000 = 1000101111000001
I confirmed the equivalence using an online x86-16 disassembler. I did not, though, execute both on my computer to test if they are indeed equivalent.
So. Is there any actual difference between the two ways of encoding? Is it just a matter of preference/style? And, if within scope and possible, is there a preferred way?