Add optimized negation to ClampedNumeric

Desktop / Chromium - Justin Schuh [chromium.org] - 14 July 2017 19:16 EDT

Integrates the GCC subtract-carry intrinsics for intel, etc, and the saturated instructions on arm.

Bug: 672489 Change-Id: I5db9d94224ab9c87fb025e0150879558a64f238f Reviewed-on: https://chromium-review.googlesource.com/571404 Commit-Queue: Justin Schuh

a15cf3c Add optimized negation to ClampedNumeric
base/numerics/clamped_math.h | 14 +++++---
base/numerics/safe_math_clang_gcc_impl.h | 55 ++++++++++++++++++++++++++++++++
base/numerics/safe_numerics_unittest.cc | 20 ++++++++++++
3 files changed, 84 insertions(+), 5 deletions(-)

Upstream: git.chromium.org


  • Share