https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881

--- Comment #84 from LIU Hao <lh_mouse at 126 dot com> ---
(In reply to Julian Waters from comment #83)
> Liu Hao: The registers it's using seem to be all over the place. Prior it
> was using rdx for the gs:[88] load and rax for everything else, now it's
> either using any register it can find, or using rdx to store the result of
> rdx+rax*8. I have no idea why the resulting assembly is so different, but
> this could mean the resulting program runs less efficiently

For EAX, ECX, EDX, EBX, ESI, EDI there's usually no difference, except that
callee-saved ones (EBX, EBP, ESI and EDI) have to be pushed and popped.
Accessing a 64-bit register, as well as R8D ~ R15D, requires an REX prefix, so
such an instruction is one byte longer.

Reply via email to