Changeset 239867 in webkit


Ignore:
Timestamp:
Jan 11, 2019 12:41:42 PM (5 years ago)
Author:
dinfuehr@igalia.com
Message:

Enable DFG on ARM/Linux again
https://bugs.webkit.org/show_bug.cgi?id=192496

Reviewed by Yusuke Suzuki.

JSTests:

Test wasn't really skipped before moving the line with skip
to the top.

  • stress/regress-192717.js:

Source/JavaScriptCore:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux. Do not use register
r11 in compiled DFG mode since it is already used in LLInt as metadataTable
register. Also clean up code since ARM traditional isn't supported anymore.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):

  • jit/GPRInfo.h:

(JSC::GPRInfo::toIndex):

  • llint/LowLevelInterpreter32_64.asm:
  • offlineasm/arm.rb:

Source/WTF:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux.

  • wtf/Platform.h:

Tools:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux. Run again JIT-tests
on ARM by default.

  • Scripts/run-jsc-stress-tests:

LayoutTests:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux. Disable tests that
run out of executable memory with LLInt disabled.

  • js/script-tests/dfg-float32array.js:
  • js/script-tests/dfg-float64array.js:
  • js/script-tests/dfg-int16array.js:
  • js/script-tests/dfg-int32array-overflow-values.js:
  • js/script-tests/dfg-int32array.js:
  • js/script-tests/dfg-int8array.js:
  • js/script-tests/dfg-uint16array.js:
  • js/script-tests/dfg-uint32array.js:
  • js/script-tests/dfg-uint8array.js:
Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r239838 r239867  
     12019-01-11  Dominik Infuehr  <dinfuehr@igalia.com>
     2
     3        Enable DFG on ARM/Linux again
     4        https://bugs.webkit.org/show_bug.cgi?id=192496
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        Test wasn't really skipped before moving the line with skip
     9        to the top.
     10
     11        * stress/regress-192717.js:
     12
    1132019-01-10  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/JSTests/stress/regress-192717.js

    r239838 r239867  
     1//@ skip if $memoryLimited or $buildType == "debug"
    12//@ runDefault("--useLLInt=false", "--forceCodeBlockToJettisonDueToOldAge=true", "--maxPerThreadStackUsage=200000", "--exceptionStackTraceLimit=1", "--defaultErrorStackTraceLimit=1")
    2 //@ skip if $memoryLimited or $buildType == "debug"
    33
    44let foo = 'let a';
  • trunk/LayoutTests/ChangeLog

    r239864 r239867  
     12019-01-11  Dominik Infuehr  <dinfuehr@igalia.com>
     2
     3        Enable DFG on ARM/Linux again
     4        https://bugs.webkit.org/show_bug.cgi?id=192496
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        After changing the bytecode format DFG was disabled on all 32-bit
     9        architectures. Enable DFG now again on ARM/Linux. Disable tests that
     10        run out of executable memory with LLInt disabled.
     11
     12        * js/script-tests/dfg-float32array.js:
     13        * js/script-tests/dfg-float64array.js:
     14        * js/script-tests/dfg-int16array.js:
     15        * js/script-tests/dfg-int32array-overflow-values.js:
     16        * js/script-tests/dfg-int32array.js:
     17        * js/script-tests/dfg-int8array.js:
     18        * js/script-tests/dfg-uint16array.js:
     19        * js/script-tests/dfg-uint32array.js:
     20        * js/script-tests/dfg-uint8array.js:
     21
    1222019-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
    223
  • trunk/LayoutTests/js/script-tests/dfg-float32array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-float64array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-int16array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-int32array-overflow-values.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-int32array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-int8array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-uint16array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-uint32array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/LayoutTests/js/script-tests/dfg-uint8array.js

    r239838 r239867  
    1 //@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin"
     1//@ noNoLLIntRunLayoutTest if $architecture == "arm"
    22
    33description(
  • trunk/Source/JavaScriptCore/ChangeLog

    r239846 r239867  
     12019-01-11  Dominik Infuehr  <dinfuehr@igalia.com>
     2
     3        Enable DFG on ARM/Linux again
     4        https://bugs.webkit.org/show_bug.cgi?id=192496
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        After changing the bytecode format DFG was disabled on all 32-bit
     9        architectures. Enable DFG now again on ARM/Linux. Do not use register
     10        r11 in compiled DFG mode since it is already used in LLInt as metadataTable
     11        register. Also clean up code since ARM traditional isn't supported anymore.
     12
     13        * dfg/DFGOSRExit.cpp:
     14        (JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
     15        (JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):
     16        * jit/CallFrameShuffler.cpp:
     17        (JSC::CallFrameShuffler::CallFrameShuffler):
     18        * jit/GPRInfo.h:
     19        (JSC::GPRInfo::toIndex):
     20        * llint/LowLevelInterpreter32_64.asm:
     21        * offlineasm/arm.rb:
     22
    1232019-01-10  Brian Burg  <bburg@apple.com>
    224
  • trunk/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h

    r239838 r239867  
    750750        }
    751751
    752         bool empty()
     752        bool empty() const
    753753        {
    754754            return !m_jumps.size();
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp

    r239838 r239867  
    7676#if NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
    7777
    78 static_assert(is64Bit(), "we only support callee save registers on 64-bit");
    79 
    8078// Based on AssemblyHelpers::emitRestoreCalleeSavesFor().
    8179static void restoreCalleeSavesFor(Context& context, CodeBlock* codeBlock)
     
    138136        if (entry.reg().isGPR())
    139137            context.gpr(entry.reg().gpr()) = calleeSaveBuffer[uintptrOffset];
    140         else
     138        else {
     139#if USE(JSVALUE64)
    141140            context.fpr(entry.reg().fpr()) = bitwise_cast<double>(calleeSaveBuffer[uintptrOffset]);
     141#else
     142            // FIXME: <https://webkit.org/b/193275> support callee-saved floating point registers on 32-bit architectures
     143            RELEASE_ASSERT_NOT_REACHED();
     144#endif
     145        }
    142146    }
    143147}
     
    162166        if (entry.reg().isGPR())
    163167            stack.set(calleeSaveBuffer, entry.offset(), context.gpr<UCPURegister>(entry.reg().gpr()));
    164         else
     168        else {
     169#if USE(JSVALUE64)
    165170            stack.set(calleeSaveBuffer, entry.offset(), context.fpr<UCPURegister>(entry.reg().fpr()));
     171#else
     172            // FIXME: <https://webkit.org/b/193275> support callee-saved floating point registers on 32-bit architectures
     173            RELEASE_ASSERT_NOT_REACHED();
     174#endif
     175        }
    166176    }
    167177}
  • trunk/Source/JavaScriptCore/jit/CallFrameShuffler.cpp

    r239838 r239867  
    5252    for (unsigned i = FPRInfo::numberOfRegisters; i--; )
    5353        m_lockedRegisters.clear(FPRInfo::toRegister(i));
    54     // ... as well as the runtime registers.
     54
     55#if USE(JSVALUE64)
     56    // ... as well as the runtime registers on 64-bit architectures.
     57    // However do not use these registers on 32-bit architectures since
     58    // saving and restoring callee-saved registers in CallFrameShuffler isn't supported
     59    // on 32-bit architectures yet.
    5560    m_lockedRegisters.exclude(RegisterSet::vmCalleeSaveRegisters());
     61#endif
    5662
    5763    ASSERT(!data.callee.isInJSStack() || data.callee.virtualRegister().isLocal());
  • trunk/Source/JavaScriptCore/jit/GPRInfo.h

    r239838 r239867  
    527527#endif // CPU(X86_64)
    528528
    529 #if CPU(ARM)
     529#if CPU(ARM_THUMB2)
    530530#define NUMBER_OF_ARGUMENT_REGISTERS 4u
    531 #if CPU(ARM_THUMB2)
    532531#define NUMBER_OF_CALLEE_SAVES_REGISTERS 1u
    533 #else
    534 #define NUMBER_OF_CALLEE_SAVES_REGISTERS 0u
    535 #endif
    536532
    537533class GPRInfo {
     
    549545    static const GPRReg regT5 = ARMRegisters::r9;
    550546    static const GPRReg regT6 = ARMRegisters::r10;
    551 #if CPU(ARM_THUMB2)
    552     static const GPRReg regT7 = ARMRegisters::r11;
    553 #else
    554     static const GPRReg regT7 = ARMRegisters::r7;
    555 #endif
     547    static const GPRReg regT7 = ARMRegisters::r5;
    556548    static const GPRReg regT8 = ARMRegisters::r4;
    557549    static const GPRReg regCS0 = ARMRegisters::r11;
     
    588580        ASSERT(static_cast<int>(reg) < 16);
    589581        static const unsigned indexForRegister[16] =
    590 #if CPU(ARM_THUMB2)
    591             { 0, 1, 2, 3, 8, InvalidIndex, InvalidIndex, InvalidIndex, 4, 5, 6, 7, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
    592 #else
    593             { 0, 1, 2, 3, 8, InvalidIndex, InvalidIndex, 7, 4, 5, 6, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
    594 #endif
     582            { 0, 1, 2, 3, 8, 7, InvalidIndex, InvalidIndex, 4, 5, 6, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
    595583        unsigned result = indexForRegister[reg];
    596584        return result;
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r239838 r239867  
    20132013
    20142014op(llint_throw_from_slow_path_trampoline, macro()
     2015    loadp Callee[cfr], t1
     2016    andp MarkedBlockMask, t1
     2017    loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t1], t1
     2018    copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2)
     2019
    20152020    callSlowPath(_llint_slow_path_handle_exception)
    20162021
     
    20212026    andp MarkedBlockMask, t1
    20222027    loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t1], t1
    2023     copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2)
    20242028    jmp VM::targetMachinePCForThrow[t1]
    20252029end)
  • trunk/Source/JavaScriptCore/offlineasm/arm.rb

    r239838 r239867  
    3535#  x3 => t3, a3, r3
    3636#  x6 =>            (callee-save scratch)
    37 #  x7 => cfr        (ARMv7 only)
     37#  x7 => cfr
    3838#  x8 => t4         (callee-save)
    3939#  x9 => t5         (callee-save)
     
    5656# d7 =>              (scratch)
    5757
    58 def isARMv7
    59     case $activeBackend
    60     when "ARMv7"
    61         true
    62     else
    63         raise "bad value for $activeBackend: #{$activeBackend}"
    64     end
    65 end
    66 
    6758class Node
    6859    def armSingle
     
    9283    elsif (~value) >= 0 && (~value) < 256
    9384        $asm.puts "mvn #{register.armOperand}, \##{~value}"
    94     elsif isARMv7
     85    else
    9586        $asm.puts "movw #{register.armOperand}, \##{value & 0xffff}"
    9687        if (value & 0xffff0000) != 0
    9788            $asm.puts "movt #{register.armOperand}, \##{(value >> 16) & 0xffff}"
    9889        end
    99     else
    100         $asm.puts "ldr #{register.armOperand}, =#{value}"
    10190    end
    10291end
     
    120109            "r9"
    121110        when "cfr"
    122             isARMv7 ?  "r7" : "r11"
     111            "r7"
    123112        when "csr0"
    124113            "r11"
     
    610599                $asm.puts "mov pc, #{operands[0].armOperand}"
    611600            end
    612             if not isARMv7 and not isARMv7Traditional
    613                 $asm.puts ".ltorg"
    614             end
    615601        when "call"
    616602            if operands[0].label?
     
    693679            $asm.puts "ldr #{dest.armOperand}, [#{dest.armOperand}, #{temp.armOperand}]"
    694680
    695             offset = $activeBackend == "ARMv7" ? 4 : 8
     681            offset = 4
    696682
    697683            $asm.deferNextLabelAction {
  • trunk/Source/WTF/ChangeLog

    r239838 r239867  
     12019-01-11  Dominik Infuehr  <dinfuehr@igalia.com>
     2
     3        Enable DFG on ARM/Linux again
     4        https://bugs.webkit.org/show_bug.cgi?id=192496
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        After changing the bytecode format DFG was disabled on all 32-bit
     9        architectures. Enable DFG now again on ARM/Linux.
     10
     11        * wtf/Platform.h:
     12
    1132019-01-10  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/Source/WTF/wtf/Platform.h

    r239838 r239867  
    761761#define ENABLE_JIT 1
    762762#endif
    763 /* But still disable DFG for now. */
    764 #undef ENABLE_DFG_JIT
    765 #define ENABLE_DFG_JIT 0
    766763#else
    767764/* Disable JIT and force C_LOOP on all 32bit-architectures but ARMv7-Thumb2/Linux. */
  • trunk/Tools/ChangeLog

    r239866 r239867  
     12019-01-11  Dominik Infuehr  <dinfuehr@igalia.com>
     2
     3        Enable DFG on ARM/Linux again
     4        https://bugs.webkit.org/show_bug.cgi?id=192496
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        After changing the bytecode format DFG was disabled on all 32-bit
     9        architectures. Enable DFG now again on ARM/Linux. Run again JIT-tests
     10        on ARM by default.
     11
     12        * Scripts/run-jsc-stress-tests:
     13
    1142019-01-11  Timothy Hatcher  <timothy@apple.com>
    215
  • trunk/Tools/Scripts/run-jsc-stress-tests

    r239838 r239867  
    450450$isFTLPlatform = !($architecture == "x86" || $architecture == "arm" || $architecture == "mips" || $hostOS == "windows")
    451451
    452 if ["arm", "mips", "x86"].include?($architecture)
     452if ["mips", "x86"].include?($architecture)
    453453    # The JIT is temporarily disabled on these platforms since
    454454    # https://trac.webkit.org/changeset/237547
Note: See TracChangeset for help on using the changeset viewer.