Linus Torvalds writes: (Summary)
Afaik there have also been issues with decoding instructions that have
both an immediate and a memory offset.
both an immediate and a memory offset.
I suspect none of this is an issue on modern cores, but there really at least historically were cases where
at least historically were cases where
mov %reg,mem
mov %reg,mem
was better than
was better than
mov $imm,mem
mov $imm,mem
if %reg already had the right value, so it's not at all 100% obvious that the micro-optimization really _optimizes_ anything.
both an immediate and a memory offset.
I suspect none of this is an issue on modern cores, but there really at least historically were cases where
at least historically were cases where
mov %reg,mem
mov %reg,mem
was better than
was better than
mov $imm,mem
mov $imm,mem
if %reg already had the right value, so it's not at all 100% obvious that the micro-optimization really _optimizes_ anything.