WebKit Bugzilla
Attachment 357221 Details for
Bug 192496
: Enable DFG on ARM/Linux again
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192496-20181213121820.patch (text/plain), 17.21 KB, created by
Dominik Inführ
on 2018-12-13 03:18:21 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dominik Inführ
Created:
2018-12-13 03:18:21 PST
Size:
17.21 KB
patch
obsolete
>Subversion Revision: 239154 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 768a9b529d233873720e9c658a6e8cd1cef479f1..adcf666f747d3a44c0459e201721a4ef2797f787 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,25 @@ >+2018-12-13 Dominik Infuehr <dinfuehr@igalia.com> >+ >+ Enable DFG on ARM/Linux again >+ https://bugs.webkit.org/show_bug.cgi?id=192496 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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: >+ > 2018-12-13 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Unreviewed, build fix after r239153 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 10a64b64d26de530bd9aa3e219c945e10f90f697..ddad9eabba0c72570db3bb91cdb5d7fb1928ff00 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,15 @@ >+2018-12-13 Dominik Infuehr <dinfuehr@igalia.com> >+ >+ Enable DFG on ARM/Linux again >+ https://bugs.webkit.org/show_bug.cgi?id=192496 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ After changing the bytecode format DFG was disabled on all 32-bit >+ architectures. Enable DFG now again on ARM/Linux. >+ >+ * wtf/Platform.h: >+ > 2018-12-12 Alex Christensen <achristensen@webkit.org> > > Implement safe browsing in WebKit on WatchOS >diff --git a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp >index 6ea97769c09d32b936e04c87e84c8c8deed4a0a4..aa33af280a3b358dc7e2c2b2bdfd58c3e4c2892e 100644 >--- a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp >+++ b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp >@@ -75,8 +75,6 @@ static JSValue jsValueFor(CPUState& cpu, JSValueSource source) > > #if NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 > >-static_assert(is64Bit(), "we only support callee save registers on 64-bit"); >- > // Based on AssemblyHelpers::emitRestoreCalleeSavesFor(). > static void restoreCalleeSavesFor(Context& context, CodeBlock* codeBlock) > { >@@ -137,8 +135,14 @@ static void restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer(Context& context > size_t uintptrOffset = entry.offset() / sizeof(UCPURegister); > if (entry.reg().isGPR()) > context.gpr(entry.reg().gpr()) = calleeSaveBuffer[uintptrOffset]; >- else >+ else { >+#if USE(JSVALUE64) > context.fpr(entry.reg().fpr()) = bitwise_cast<double>(calleeSaveBuffer[uintptrOffset]); >+#else >+ // FIXME: support callee-saved floating point registers on 32-bit architectures >+ RELEASE_ASSERT_NOT_REACHED(); >+#endif >+ } > } > } > >@@ -161,8 +165,14 @@ static void copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(Context& context) > continue; > if (entry.reg().isGPR()) > stack.set(calleeSaveBuffer, entry.offset(), context.gpr<UCPURegister>(entry.reg().gpr())); >- else >+ else { >+#if USE(JSVALUE64) > stack.set(calleeSaveBuffer, entry.offset(), context.fpr<UCPURegister>(entry.reg().fpr())); >+#else >+ // FIXME: support callee-saved floating point registers on 32-bit architectures >+ RELEASE_ASSERT_NOT_REACHED(); >+#endif >+ } > } > } > >diff --git a/Source/JavaScriptCore/jit/CallFrameShuffler.cpp b/Source/JavaScriptCore/jit/CallFrameShuffler.cpp >index 6df81e1a9cb89d66569f57cc90b78d4660235782..81c3e2d4b8a7bec0a062dbf21be20c5266a898ae 100644 >--- a/Source/JavaScriptCore/jit/CallFrameShuffler.cpp >+++ b/Source/JavaScriptCore/jit/CallFrameShuffler.cpp >@@ -51,8 +51,14 @@ CallFrameShuffler::CallFrameShuffler(CCallHelpers& jit, const CallFrameShuffleDa > m_lockedRegisters.clear(GPRInfo::toRegister(i)); > for (unsigned i = FPRInfo::numberOfRegisters; i--; ) > m_lockedRegisters.clear(FPRInfo::toRegister(i)); >- // ... as well as the runtime registers. >+ >+#if USE(JSVALUE64) >+ // ... as well as the runtime registers on 64-bit architectures. >+ // However do not use these registers on 32-bit architectures since >+ // saving and restoring callee-saved registers in CallFrameShuffler isn't supported >+ // on 32-bit architectures yet. > m_lockedRegisters.exclude(RegisterSet::vmCalleeSaveRegisters()); >+#endif > > ASSERT(!data.callee.isInJSStack() || data.callee.virtualRegister().isLocal()); > addNew(VirtualRegister(CallFrameSlot::callee), data.callee); >diff --git a/Source/JavaScriptCore/jit/GPRInfo.h b/Source/JavaScriptCore/jit/GPRInfo.h >index 1a0a5c9742b4db7cdea8c8965536c30e9b9fa765..2ca478cac78b677bd95559c922251b39cbcd44cd 100644 >--- a/Source/JavaScriptCore/jit/GPRInfo.h >+++ b/Source/JavaScriptCore/jit/GPRInfo.h >@@ -528,11 +528,7 @@ public: > > #if CPU(ARM) > #define NUMBER_OF_ARGUMENT_REGISTERS 4u >-#if CPU(ARM_THUMB2) > #define NUMBER_OF_CALLEE_SAVES_REGISTERS 1u >-#else >-#define NUMBER_OF_CALLEE_SAVES_REGISTERS 0u >-#endif > > class GPRInfo { > public: >@@ -548,11 +544,7 @@ public: > static const GPRReg regT4 = ARMRegisters::r8; > static const GPRReg regT5 = ARMRegisters::r9; > static const GPRReg regT6 = ARMRegisters::r10; >-#if CPU(ARM_THUMB2) >- static const GPRReg regT7 = ARMRegisters::r11; >-#else >- static const GPRReg regT7 = ARMRegisters::r7; >-#endif >+ static const GPRReg regT7 = ARMRegisters::r5; > static const GPRReg regT8 = ARMRegisters::r4; > static const GPRReg regCS0 = ARMRegisters::r11; > // These registers match the baseline JIT. >@@ -587,11 +579,7 @@ public: > ASSERT(reg != InvalidGPRReg); > ASSERT(static_cast<int>(reg) < 16); > static const unsigned indexForRegister[16] = >-#if CPU(ARM_THUMB2) >- { 0, 1, 2, 3, 8, InvalidIndex, InvalidIndex, InvalidIndex, 4, 5, 6, 7, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex }; >-#else >- { 0, 1, 2, 3, 8, InvalidIndex, InvalidIndex, 7, 4, 5, 6, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex }; >-#endif >+ { 0, 1, 2, 3, 8, 7, InvalidIndex, InvalidIndex, 4, 5, 6, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex }; > unsigned result = indexForRegister[reg]; > return result; > } >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm >index bb22057deaddb2c865e26965a3750a535c3549c3..e80a3842b74d05fe43ec0f4182287dbed772531f 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm >@@ -2002,6 +2002,11 @@ end) > > > op(llint_throw_from_slow_path_trampoline, macro() >+ loadp Callee[cfr], t1 >+ andp MarkedBlockMask, t1 >+ loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t1], t1 >+ copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2) >+ > callSlowPath(_llint_slow_path_handle_exception) > > # When throwing from the interpreter (i.e. throwing from LLIntSlowPaths), so >@@ -2010,7 +2015,6 @@ op(llint_throw_from_slow_path_trampoline, macro() > loadp Callee[cfr], t1 > andp MarkedBlockMask, t1 > loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t1], t1 >- copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2) > jmp VM::targetMachinePCForThrow[t1] > end) > >diff --git a/Source/JavaScriptCore/offlineasm/arm.rb b/Source/JavaScriptCore/offlineasm/arm.rb >index b0c33627d10872279e0811c4f4a7ecad41e5fc67..0fc41851b1454ecd69b9b00b9b94d48dbf626e44 100644 >--- a/Source/JavaScriptCore/offlineasm/arm.rb >+++ b/Source/JavaScriptCore/offlineasm/arm.rb >@@ -34,7 +34,7 @@ require "risc" > # x2 => t2, a2, r2 > # x3 => t3, a3, r3 > # x6 => (callee-save scratch) >-# x7 => cfr (ARMv7 only) >+# x7 => cfr > # x8 => t4 (callee-save) > # x9 => t5 (callee-save) > # x10 => (callee-save scratch) >@@ -55,15 +55,6 @@ require "risc" > # d6 => (scratch) > # d7 => (scratch) > >-def isARMv7 >- case $activeBackend >- when "ARMv7" >- true >- else >- raise "bad value for $activeBackend: #{$activeBackend}" >- end >-end >- > class Node > def armSingle > doubleOperand = armOperand >@@ -91,13 +82,11 @@ def armMoveImmediate(value, register) > $asm.puts "mov #{register.armOperand}, \##{value}" > elsif (~value) >= 0 && (~value) < 256 > $asm.puts "mvn #{register.armOperand}, \##{~value}" >- elsif isARMv7 >+ else > $asm.puts "movw #{register.armOperand}, \##{value & 0xffff}" > if (value & 0xffff0000) != 0 > $asm.puts "movt #{register.armOperand}, \##{(value >> 16) & 0xffff}" > end >- else >- $asm.puts "ldr #{register.armOperand}, =#{value}" > end > end > >@@ -119,7 +108,7 @@ class RegisterID > when "t5" > "r9" > when "cfr" >- isARMv7 ? "r7" : "r11" >+ "r7" > when "csr0" > "r11" > when "lr" >@@ -609,9 +598,6 @@ class Instruction > else > $asm.puts "mov pc, #{operands[0].armOperand}" > end >- if not isARMv7 and not isARMv7Traditional >- $asm.puts ".ltorg" >- end > when "call" > if operands[0].label? > if OS_DARWIN >@@ -692,7 +678,7 @@ class Instruction > $asm.puts "add #{dest.armOperand}, pc, #{dest.armOperand}" > $asm.puts "ldr #{dest.armOperand}, [#{dest.armOperand}, #{temp.armOperand}]" > >- offset = $activeBackend == "ARMv7" ? 4 : 8 >+ offset = 4 > > $asm.deferNextLabelAction { > $asm.puts "#{gotLabel}:" >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index 2753d1ad6db8e38d7f589281edffbe6f93a38dba..da8d387a795efa7f922dffe77cebabcd8104639a 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -760,9 +760,6 @@ > #if !defined(ENABLE_JIT) > #define ENABLE_JIT 1 > #endif >-/* But still disable DFG for now. */ >-#undef ENABLE_DFG_JIT >-#define ENABLE_DFG_JIT 0 > #else > /* Disable JIT and force C_LOOP on all 32bit-architectures but ARMv7-Thumb2/Linux. */ > #undef ENABLE_JIT >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index d3d8194cf5ba7218925eb5cb8830d3b7846b4df4..7fceafd823a12dc036ae8efcc7dd4272268994b8 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-13 Dominik Infuehr <dinfuehr@igalia.com> >+ >+ Enable DFG on ARM/Linux again >+ https://bugs.webkit.org/show_bug.cgi?id=192496 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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: >+ > 2018-12-12 Fujii Hironori <Hironori.Fujii@sony.com> > > [Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] >diff --git a/Tools/Scripts/run-jsc-stress-tests b/Tools/Scripts/run-jsc-stress-tests >index 35a9eb1c55e102b52dd4557023d92d1603e0c5a1..62fa70fc78088ccea9295c29d46401f975fca18c 100755 >--- a/Tools/Scripts/run-jsc-stress-tests >+++ b/Tools/Scripts/run-jsc-stress-tests >@@ -449,7 +449,7 @@ $hostOS = determineOS unless $hostOS > $architecture = determineArchitecture unless $architecture > $isFTLPlatform = !($architecture == "x86" || $architecture == "arm" || $architecture == "mips" || $hostOS == "windows") > >-if ["arm", "mips", "x86"].include?($architecture) >+if ["mips", "x86"].include?($architecture) > # The JIT is temporarily disabled on these platforms since > # https://trac.webkit.org/changeset/237547 > $jitTests = false >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 881cbfbf0fe49ac3ef6f7888a9508b7d3756e2ab..7c3c7bfe8e1d1313f1ac06a049b7ab030bd2c7ad 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,23 @@ >+2018-12-13 Dominik Infuehr <dinfuehr@igalia.com> >+ >+ Enable DFG on ARM/Linux again >+ https://bugs.webkit.org/show_bug.cgi?id=192496 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-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: >+ > 2018-12-12 Simon Fraser <simon.fraser@apple.com> > > REGRESSION (r238090): CAPCHA UI jumps to the wrong location >diff --git a/LayoutTests/js/script-tests/dfg-float32array.js b/LayoutTests/js/script-tests/dfg-float32array.js >index 4211465d6de2322a67750abb0e5540c570dfafe3..1fef87726cce52b8579ba199ed01feaf7e8b66fa 100644 >--- a/LayoutTests/js/script-tests/dfg-float32array.js >+++ b/LayoutTests/js/script-tests/dfg-float32array.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that float32 arrays work in the DFG." >diff --git a/LayoutTests/js/script-tests/dfg-int16array.js b/LayoutTests/js/script-tests/dfg-int16array.js >index 3e1efc3a0b918df1eb1fb48304a8d514e11d1793..19ad96fc0d62a017ce2604450c1fdb0e03901f2d 100644 >--- a/LayoutTests/js/script-tests/dfg-int16array.js >+++ b/LayoutTests/js/script-tests/dfg-int16array.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that int16 arrays work in the DFG." >diff --git a/LayoutTests/js/script-tests/dfg-int32array-overflow-values.js b/LayoutTests/js/script-tests/dfg-int32array-overflow-values.js >index 2edd518a8811d53fa1e147f8d2c11569987fabf3..bf551c3e912196aa3d8acee2728ea71f23a2ce2e 100644 >--- a/LayoutTests/js/script-tests/dfg-int32array-overflow-values.js >+++ b/LayoutTests/js/script-tests/dfg-int32array-overflow-values.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that int32 arrays work in the DFG." >diff --git a/LayoutTests/js/script-tests/dfg-int32array.js b/LayoutTests/js/script-tests/dfg-int32array.js >index 490c6a3da86fa86dcada83a3ca157759b450b3af..66271290e1aa1df9b764cd4a48b74e9b622ee69d 100644 >--- a/LayoutTests/js/script-tests/dfg-int32array.js >+++ b/LayoutTests/js/script-tests/dfg-int32array.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that int32 arrays work in the DFG." >diff --git a/LayoutTests/js/script-tests/dfg-int8array.js b/LayoutTests/js/script-tests/dfg-int8array.js >index feb83e3f0fde205d61582e3b183cc0728daaebcf..05f69e36e8867e4bcc3b1b8c09ba44b06ae31049 100644 >--- a/LayoutTests/js/script-tests/dfg-int8array.js >+++ b/LayoutTests/js/script-tests/dfg-int8array.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that int8 arrays work in the DFG." >diff --git a/LayoutTests/js/script-tests/dfg-uint16array.js b/LayoutTests/js/script-tests/dfg-uint16array.js >index ba53b7b0bbf36ffac0239f3279ae6c15a3cceed6..234e897affc63f273c95baa3ef6ef5fe5524daac 100644 >--- a/LayoutTests/js/script-tests/dfg-uint16array.js >+++ b/LayoutTests/js/script-tests/dfg-uint16array.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that uint16 arrays work in the DFG." >diff --git a/LayoutTests/js/script-tests/dfg-uint32array.js b/LayoutTests/js/script-tests/dfg-uint32array.js >index f1c48ab5db3175d6c35bcc41ee0e9e491d703b9c..bea38e00e2cf6671683978485a2f1be370dbd50e 100644 >--- a/LayoutTests/js/script-tests/dfg-uint32array.js >+++ b/LayoutTests/js/script-tests/dfg-uint32array.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that uint32 arrays work in the DFG." >diff --git a/LayoutTests/js/script-tests/dfg-uint8array.js b/LayoutTests/js/script-tests/dfg-uint8array.js >index 95e8bcbc89339801243dc22b0c45ccc38f873041..339d85554e75b820cc2a3c1a9eedae3d9b99b9e1 100644 >--- a/LayoutTests/js/script-tests/dfg-uint8array.js >+++ b/LayoutTests/js/script-tests/dfg-uint8array.js >@@ -1,4 +1,4 @@ >-//@ noNoLLIntRunLayoutTest if $architecture == "arm" and $hostOS == "darwin" >+//@ noNoLLIntRunLayoutTest if $architecture == "arm" > > description( > "This tests that uint8 arrays work in the DFG."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192496
:
356799
|
356800
|
357221
|
358603
|
358683