Fix implementation of bit count functions.
authorbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 20 Aug 2014 12:10:41 +0000 (12:10 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 20 Aug 2014 12:10:41 +0000 (12:10 +0000)
commitb15a082d56fb9fa8832109970f40312761566c0d
treede84c38b8858209324c479584bc6e2b455909713
parentf7947b8ec4b1f86559de83ee5be848b4d4811a75
Fix implementation of bit count functions.

The bit counting functions provided by CompilerIntrinsics were undefined
for zero, which was easily overlooked and unsafe in general. Also their
implementation was kinda hacky and mostly untested. Fixed the
implementation and moved the functions to base/bits.h.

TEST=base-unittests,cctest,compiler-unittests,mjsunit
R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/494633002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
13 files changed:
include/v8config.h
src/base/bits.h
src/compiler-intrinsics.h [deleted file]
src/compiler/arm/instruction-selector-arm.cc
src/data-flow.cc
src/data-flow.h
src/frames.cc
src/heap/mark-compact.cc
src/heap/mark-compact.h
src/hydrogen-instructions.cc
src/mips/simulator-mips.cc
src/mips64/simulator-mips64.cc
test/base-unittests/bits-unittest.cc