Skip to content
Snippets Groups Projects
  • Boris Sazonov's avatar
    Revert "Using ARMv8 CRC32 specific instruction" · 0f473a1d
    Boris Sazonov authored
    This reverts commit 35988c821c051a57e30c76f9fcd87b7b677bd9bd.
    
    Reason for revert: broke build ('cpu-features.h' not found)
    https://uberchromegw.corp.google.com/i/internal.client.clank/builders/x64-builder/builds/13697
    
    Original change's description:
    > Using ARMv8 CRC32 specific instruction
    > 
    > CRC32 affects performance for both image decompression (PNG)
    > as also in general browsing while accessing websites that serve
    > content using compression (i.e. Content-Encoding: gzip).
    > 
    > This patch implements an optimized CRC32 function using the
    > dedicated instruction available in ARMv8. This instruction is available
    > in new Android devices featuring an ARMv8 SoC, like Nexus 5x and
    > Google Pixel.
    > 
    > It should be between 6x (A53: 116ms X 22ms for a 4Kx4Kx4 buffer) to
    > 10x faster (A72: 91ms x 9ms) than the C implementation currently used
    > by zlib.
    > 
    > PNG decoding performance gains should be around 5-9%.
    > 
    > Finally it also introduces code to perform the ARM CPU features detection
    > using getauxval()@Linux/CrOS or android_getCpuFeatures(). We pre-built
    > and link the CRC32 instruction dependent code but will decide if to
    > use it at run time.
    > 
    > If the feature is not supported, we fallback to the C implementation.
    > 
    > This approach allows to use the instruction in both 32bits and 64bits
    > builds and works fine either in ARMv7 or ARMv8 processor. I tested the
    > generated Chromium apk in both a ARMv7 (Nexus 4 and 6) and ARMv8 (Nexus 5x and
    > Google Pixel).
    > 
    > Change-Id: I069408ebc06c49a3c2be4ba3253319e025ee09d7
    > Bug: 709716
    > Reviewed-on: https://chromium-review.googlesource.com/612629
    
    
    > Reviewed-by: default avatarChris Blume <cblume@chromium.org>
    > Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#520377}
    
    TBR=agl@chromium.org,noel@chromium.org,cavalcantii@chromium.org,cblume@chromium.org,mtklein@chromium.org,adenilson.cavalcanti@arm.com
    
    Change-Id: Ief2c32df5c8a37635f937cd6a671f5574f5a53a3
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 709716
    Reviewed-on: https://chromium-review.googlesource.com/799930
    
    
    Reviewed-by: default avatarChris Blume <cblume@chromium.org>
    Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
    Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#520497}
    Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
    Cr-Mirrored-Commit: e7d9a4649bde6f047105d29f0026dd8c3d54143a
    0f473a1d