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:	Fri, 07 Aug 2009 21:09:36 -0600
From:	Robert Hancock <hancockrwd@...il.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Make shr to divide by power of 2

On 08/07/2009 12:50 AM, Andi Kleen wrote:
> Sergey Senozhatsky<sergey.senozhatsky@...il.com>  writes:
>> Of course, compiler supposed to do something like
>> 	add    $0x7,%eax
>> 	shr    $0x3,%eax
>> instead of div. Should we rely on this?
>
> Yes. We should rely on this.

It may depend on the selected CPU type that gcc is optimizing for - I 
believe that on some P4s the shift may actually be slower than the divide..
--
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