WebKit Bugzilla
Attachment 370019 Details for
Bug 197797
: Tail calls are broken on ARM_THUMB2 and MIPS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP - Patch
armv7_tail_calls.diff (text/plain), 2.88 KB, created by
Caio Lima
on 2019-05-15 19:19:41 PDT
(
hide
)
Description:
WIP - Patch
Filename:
MIME Type:
Creator:
Caio Lima
Created:
2019-05-15 19:19:41 PDT
Size:
2.88 KB
patch
obsolete
>diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index 2c83cfcdff0..252889c15b9 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,12 @@ >+2019-05-10 Caio Lima <ticaiolima@gmail.com> >+ >+ [ARMv7] Tail calls are broken on THUMB2 >+ https://bugs.webkit.org/show_bug.cgi?id=197797 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * stress/tail-call-with-spilled-registers.js: Added. >+ > 2019-05-10 Saam barati <sbarati@apple.com> > > Call to JSToWasmICCallee::createStructure passes in wrong prototype value >diff --git a/JSTests/stress/tail-call-with-spilled-registers.js b/JSTests/stress/tail-call-with-spilled-registers.js >new file mode 100644 >index 00000000000..03fb71cabab >--- /dev/null >+++ b/JSTests/stress/tail-call-with-spilled-registers.js >@@ -0,0 +1,51 @@ >+//@ run("--useConcurrentJIT=false") >+ >+"use strict"; >+ >+function assert(a, e) { >+ if (a !== e) >+ throw new Error('Expected: ' + e + ' but got: ' + a); >+} >+noInline(assert); >+ >+function c3(v, b, c, d, e) { >+ return v + b + c + d + e; >+} >+noInline(c3); >+ >+function c1(o) { >+ let ret = o.c2; >+ if (o.a) >+ assert(o.a, 126); >+ return o; >+} >+noInline(c1); >+ >+function getter() { >+ let b = Math.random(); >+ let c = Math.random(); >+ let d = Math.random(); >+ let e = Math.random(); >+ return c3('test', b, c, d, e); >+} >+noInline(getter); >+ >+let c = []; >+ >+c[0] = {a: 126}; >+c[0].foo = 0; >+c[0].c2 = 15; >+ >+c[1] = {}; >+c[1].bar = 99; >+ >+c[2] = {}; >+Object.defineProperty(c[2], 'c2', { get: getter }); >+ >+for (let i = 0; i < 10000; i++) { >+ if (numberOfDFGCompiles(c1) > 0) >+ c1(c[2]); >+ else >+ c1(c[i % 2]); >+} >+ >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index eeb5b5c5aba..a47db7f29e4 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-14 Caio Lima <ticaiolima@gmail.com> >+ >+ [ARMv7] Tail calls are broken on THUMB2 >+ https://bugs.webkit.org/show_bug.cgi?id=197797 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * jit/CallFrameShuffler.cpp: >+ (JSC::CallFrameShuffler::prepareForTailCall): >+ * llint/LowLevelInterpreter.asm: >+ > 2019-05-12 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Compress Watchpoint size by using enum type and Packed<> data structure >diff --git a/Source/JavaScriptCore/runtime/StackAlignment.h b/Source/JavaScriptCore/runtime/StackAlignment.h >index 51025c01735..51fccf2fca3 100644 >--- a/Source/JavaScriptCore/runtime/StackAlignment.h >+++ b/Source/JavaScriptCore/runtime/StackAlignment.h >@@ -32,7 +32,13 @@ > namespace JSC { > > // NB. Different platforms may have different requirements here. But 16 bytes is very common. >-constexpr unsigned stackAlignmentBytes() { return 16; } >+constexpr unsigned stackAlignmentBytes() { >+#if CPU(ARM_THUMB2) >+ return 8; >+#else >+ return 16; >+#end >+} > > constexpr unsigned stackAlignmentRegisters() > {
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 197797
:
369606
|
369650
|
369895
|
369981
|
370019
|
370021
|
370650
|
370651
|
370661
|
370784
|
370785
|
371567
|
371580
|
392300
|
393034