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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Paolo Bonzini from comment #1)
> Note %rbx is used, via %bh, to extract bits 8-15 of %r9:
> 
> movl  %r9d, %ebx
> movzbl        %r9b, %edi
> movzbl        %bh, %ebx
> movl  %ebx, %r9d
> 
> This could be just
> 
> movzbl        %r9b, %edi
> shrl $8, %r9
> movzbl %r9b, %r9d
> 
> But if it's indeed due to stack alignment (didn't check), GCC is not wrong
> in noticing it can use %ebx.

%rbx is calee-saved register (so, preserved accross function calls).

These push/pop instructions are there to implement the above requirement.

Reply via email to