• Leszek Swirski's avatar
    [arm] Optimize FitsShifter to remove loop · 567f4828
    Leszek Swirski authored
    Operands in Arm can be encoded as (8-bit value, 2*N bit left rotate).
    This encoding is checked for with the FitsShifter function.
    
    Previously, this encoding was exhaustively searched for by checking all
    16 possible rotations. However, we can simply classify the different
    possible rotations as shifting away trailing zeros (without rotation),
    or rotating an 8-bit value split over the beginning and end of the
    32-bit value (which, after one rotation, becomes the first case).
    
    Hence, we can replace the exhaustive search with a couple of trailing
    zeros calculations within these classes.
    
    Change-Id: Id896539c376f695b54bdf31133b2a103b0cf9736
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831479
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#74012}
    567f4828
Name
Last commit
Last update
..
assembler-arm-inl.h Loading commit data...
assembler-arm.cc Loading commit data...
assembler-arm.h Loading commit data...
constants-arm.cc Loading commit data...
constants-arm.h Loading commit data...
cpu-arm.cc Loading commit data...
interface-descriptors-arm-inl.h Loading commit data...
macro-assembler-arm.cc Loading commit data...
macro-assembler-arm.h Loading commit data...
register-arm.h Loading commit data...