Changeset 205566 in webkit


Ignore:
Timestamp:
Sep 7, 2016 1:21:46 PM (8 years ago)
Author:
fpizlo@apple.com
Message:

Make emitAllocateWithNonNullAllocator's sub32() disallow-scratch-friendly
https://bugs.webkit.org/show_bug.cgi?id=161706

Reviewed by Geoffrey Garen.

You can't sub32(Addr, Reg) on not-x86 without using a scratch register. So, on those CPUs, we
have to do something different.

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r205558 r205566  
     12016-09-07  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Make emitAllocateWithNonNullAllocator's sub32() disallow-scratch-friendly
     4        https://bugs.webkit.org/show_bug.cgi?id=161706
     5
     6        Reviewed by Geoffrey Garen.
     7       
     8        You can't sub32(Addr, Reg) on not-x86 without using a scratch register. So, on those CPUs, we
     9        have to do something different.
     10
     11        * jit/AssemblyHelpers.h:
     12        (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):
     13
    1142016-09-07  Michael Catanzaro  <mcatanzaro@igalia.com>
    215
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r205520 r205566  
    14281428            add32(TrustedImm32(-allocator->cellSize()), resultGPR, scratchGPR);
    14291429        else {
    1430             move(resultGPR, scratchGPR);
    1431             sub32(Address(allocatorGPR, MarkedAllocator::offsetOfCellSize()), scratchGPR);
     1430            if (isX86()) {
     1431                move(resultGPR, scratchGPR);
     1432                sub32(Address(allocatorGPR, MarkedAllocator::offsetOfCellSize()), scratchGPR);
     1433            } else {
     1434                // FIXME: We need a 3-operand sub, and ARM totally has it!
     1435                load32(Address(allocatorGPR, MarkedAllocator::offsetOfCellSize()), scratchGPR);
     1436                neg32(scratchGPR);
     1437                add32(resultGPR, scratchGPR);
     1438            }
    14321439        }
    14331440        negPtr(resultGPR);
Note: See TracChangeset for help on using the changeset viewer.