linux-mips
[Top] [All Lists]

[PATCH 0/2] arch_hweight implementation for MIPS

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 0/2] arch_hweight implementation for MIPS
From: David Daney <ddaney@caviumnetworks.com>
Date: Fri, 25 Jun 2010 16:46:06 -0700
Cc: David Daney <ddaney@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
Recently the core hweight implementation was reworked to make it
easier for an architecture to implement optimized hweight()
operations.

For MIPS, I get lazy and fall back to letting GCC emit the optimized
code if it can.  If ARCH_HAS_USABLE_BUILTIN_POPCOUNT is defined, we
let GCC do it, otherwise, the fallback library call is used.

The second patch turns this on for OCTEON as it has POP and DPOP
instructions that GCC knows about.

David Daney (2):
  MIPS: Create and use asm/arch_hweight.h
  MIPS: Octeon: Define ARCH_HAS_USABLE_BUILTIN_POPCOUNT for OCTEON.

 arch/mips/include/asm/arch_hweight.h               |   38 ++++++++++++++++++++
 arch/mips/include/asm/bitops.h                     |    5 ++-
 .../asm/mach-cavium-octeon/cpu-feature-overrides.h |    8 ++++
 3 files changed, 50 insertions(+), 1 deletions(-)
 create mode 100644 arch/mips/include/asm/arch_hweight.h


<Prev in Thread] Current Thread [Next in Thread>