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]
Message-Id: <20160327.224308.220596078048860811.davem@davemloft.net>
Date:	Sun, 27 Mar 2016 22:43:08 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	zhaoxiu.zeng@...il.com
Cc:	linux-kernel@...r.kernel.org, sparclinux@...r.kernel.org
Subject: Re: [PATCH 10/31] Add sparc-specific parity functions

From: "zhaoxiu.zeng" <zhaoxiu.zeng@...il.com>
Date: Sun, 27 Mar 2016 14:43:10 +0800

> +
> +/*
> + * parityN: returns the parity of a N-bit word,
> + * i.e. the number of 1-bits in x modulo 2.
> + */
> +
> +#define __arch_parity4(w)	(__arch_hweight8((w) & 0xf) & 1)
> +#define __arch_parity8(w)	(__arch_hweight8(w) & 1)
> +#define __arch_parity16(w)	(__arch_hweight16(w) & 1)
> +#define __arch_parity32(w)	(__arch_hweight32(w) & 1)
> +#define __arch_parity64(w)	((unsigned int)__arch_hweight64(w) & 1)

This looks like asm-generic/ material to me.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ