lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Feb 2011 18:02:09 -0500
From:	Jidong Xiao <jidong.xiao@...il.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Can anyone explain "movl %eax %eax"?

Oh, I see. Thank you. So similarly, the operation "xorl %eax,%eax" is
used for the same reason, right? I see that appears in more files.

Regards
Jidong

On Wed, Feb 9, 2011 at 5:32 PM, H. Peter Anvin <hpa@...or.com> wrote:
> 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
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ