• Jaroslav Sevcik's avatar
    [turbofan] IA32 port of branch load poisoning. · 383ec7b5
    Jaroslav Sevcik authored
    The tricky part here is to take away one register from register
    allocation for the mask. The only problem is with calls that need
    an input operand to be passed in the poison register. For such calls,
    we change the register constraint in the instruction selector
    to pass the value in whatever place the register allocator sees fit.
    During code generation, we then copy the value from that place
    to the poison register. By that time, the mask is not necessary
    (once we bake the mask into the target, it should be done before
    this move).
    
    For the branches, the mask update does not use cmov (unlike x64)
    because cmov does not take an immediate and we do not have
    a scratch register. Instead we use bit-twiddling tricks
    (suggested by @tebbi). For example, here is the code for masking
    register update after a bailout on non-zero:
    
      jnz deopt_bailout    ;; Bailout branch
      setnz bl             ;; These three instructions update the mask
      add  ebx, 255
      sar  ebx, 31
    
    (On x64, the sequence is:
    
      jnz deopt_bailout
      mov r10, 0      ;; We have a scratch register for zero
      cmovnz r9, r10  ;; Set to zero if we execute this branch
                      ;; in branch mis-speculation
    )
    
    
    This CL also fixes a bug in register configuration, where we used
    to wrongly restrict the array of register name.
    
    Change-Id: I5fceff2faf8bdc527d9934afc284b749574ab69e
    Bug: chromium:798964
    Reviewed-on: https://chromium-review.googlesource.com/946251
    Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#51798}
    383ec7b5
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
base Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
parser Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
allocation-unittest.cc Loading commit data...
bigint-unittest.cc Loading commit data...
cancelable-tasks-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
code-stub-assembler-unittest.cc Loading commit data...
code-stub-assembler-unittest.h Loading commit data...
counters-unittest.cc Loading commit data...
detachable-vector-unittest.cc Loading commit data...
eh-frame-iterator-unittest.cc Loading commit data...
eh-frame-writer-unittest.cc Loading commit data...
locked-queue-unittest.cc Loading commit data...
object-unittest.cc Loading commit data...
register-configuration-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
source-position-table-unittest.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
testcfg.py Loading commit data...
unicode-unittest.cc Loading commit data...
unittests.isolate Loading commit data...
unittests.status Loading commit data...
utils-unittest.cc Loading commit data...
value-serializer-unittest.cc Loading commit data...