lkml.org 
[lkml]   [2011]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Can anyone explain "movl %eax %eax"?
On 02/09/2011 02:24 PM, Jidong Xiao wrote:
> Hi,
>
> In the kernel source, I see in a couple of places, there is "movl %eax
> %eax". Is this used for alignment purpose?
>
> For example, in the following piece of code we can see "movl %eax,%eax".
>

In x86-64, a dword (long) operation clears the upper 32 bits of the
target register, so "movl %eax,%eax" clears the upper 32 bits of %rax.

-hpa



\
 
 \ /
  Last update: 2011-02-09 23:35    [W:0.030 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site