• jgruber's avatar
    Fix stack check pattern matching for CSA code · 9ff644ae
    jgruber authored
    The stack check instruction sequence is pattern-matched in
    instruction-selector-{ia32,x64}.cc and replaced with its own specialized
    opcode, for which we later generate an efficient stack check in a single
    instruction.
    
    But this pattern matching has never worked for CSA-generated code. The
    matcher expected LoadStackPointer in the right operand and the external
    reference load in the left operand. CSA generated exactly vice-versa.
    
    This CL does a few things; it
    1. reverts the recent change to load the
    limit from smi roots:
    
    Revert "[csa] Load the stack limit from smi roots"
    This reverts commit 507c29c9.
    
    2. tweaks the CSA instruction sequence to output what the matcher
    expects.
    3. refactors stack check matching into a new StackCheckMatcher class.
    4. typifies CSA::PerformStackCheck as a drive-by.
    
    Bug: v8:6666,v8:7844
    Change-Id: I9bb879ac10bfe7187750c5f9e7834dc4accf28b5
    Reviewed-on: https://chromium-review.googlesource.com/1099068Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53737}
    9ff644ae
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...