what would be the benefit of moving a register to itself in x86-64

Refresh

1 weeks ago

Views

16 time

3

I'm doing a project in x86-64 NASM and came across the instruction:

mov rdi, rdi

I have searched all over but can't find mention of why this would be needed. Does it affect the flags or is it something clever that I don't understand? To give some context its present in a loop right before the same register is decremented with sub.

Thanks

0 answers