New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620779 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Use compiler builtins for byte swapping

Project Member Reported by robert.b...@intel.com, Jun 16 2016

Issue description

The use of compiler builtins for byte swapping, for endian conversion, should reduce code size (as the base::ByteSwap) is inlined and also improve performance by the use of specialised instructions.

Blink already uses compiler builtins for this so the change only needs to be made in base/ 
 
Summary: Use compiler builtins for byte swapping (was: Use compiler builtins for bytes wapping)
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bf0dd8041242ffcc13fd0a3ea840c255f25237f

commit 0bf0dd8041242ffcc13fd0a3ea840c255f25237f
Author: robert.bradford <robert.bradford@intel.com>
Date: Fri Jun 17 20:11:04 2016

base: In SHA-1 implementation use base::ByteSwap for endian conversion

With crrev.com/2077563002 enabling the use of builtins for byte swapping
switch the SHA-1 implementation in base over to using the function in
base/sys_byteorder.h

BUG= 620779 
TEST=base_unittests:SHA1Test.* pass

Review-Url: https://codereview.chromium.org/2076593002
Cr-Commit-Position: refs/heads/master@{#400480}

[modify] https://crrev.com/0bf0dd8041242ffcc13fd0a3ea840c255f25237f/base/sha1.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a09b177d4641f50d96c82218c0fd0155d27ae4f

commit 1a09b177d4641f50d96c82218c0fd0155d27ae4f
Author: robert.bradford <robert.bradford@intel.com>
Date: Fri Jun 17 23:26:11 2016

base: Use compiler builtins for byte swapping

Blink/WTF already makes use of compiler builtins for endian byte
swapping so do the same in Chromium base itself.

BUG= 620779 
TEST=base_unittests:ByteOrderTest.*

Review-Url: https://codereview.chromium.org/2077563002
Cr-Commit-Position: refs/heads/master@{#400540}

[modify] https://crrev.com/1a09b177d4641f50d96c82218c0fd0155d27ae4f/base/BUILD.gn
[modify] https://crrev.com/1a09b177d4641f50d96c82218c0fd0155d27ae4f/base/base.gyp
[modify] https://crrev.com/1a09b177d4641f50d96c82218c0fd0155d27ae4f/base/sys_byteorder.h
[add] https://crrev.com/1a09b177d4641f50d96c82218c0fd0155d27ae4f/base/sys_byteorder_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment