Bug 146484 - jsc-tailcall: Add new opcodes for tail calls
Summary: jsc-tailcall: Add new opcodes for tail calls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Basile Clement
URL:
Keywords:
Depends on: 146481 146846 146847 146967
Blocks: 146477 146850 147195
  Show dependency treegraph
 
Reported: 2015-06-30 17:43 PDT by Basile Clement
Modified: 2015-07-22 15:56 PDT (History)
5 users (show)

See Also:


Attachments
Patch (117.19 KB, patch)
2015-07-21 15:49 PDT, Basile Clement
msaboff: review+
Details | Formatted Diff | Diff
ARM64 test output with failures (deleted)
2015-07-22 13:21 PDT, Michael Saboff
no flags Details
ARM32 test output with failures (16.93 MB, application/octet-stream)
2015-07-22 15:56 PDT, Michael Saboff
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Basile Clement 2015-06-30 17:43:44 PDT
For now, this opcode should be treated as a regular call in all backends.
Comment 1 Basile Clement 2015-07-10 12:35:46 PDT
(In reply to comment #0)
> For now, this opcode should be treated as a regular call in all backends.
Comment 2 Basile Clement 2015-07-10 12:36:13 PDT
(In reply to comment #1)
> (In reply to comment #0)
> > For now, this opcode should be treated as a regular call in all backends.

(Oops, messed this up)

We should not do this, since it is a semantics change. Instead, we should implement this in the LLint and baseline JIT first, then progressively implement it in the DFG and FTL.
Comment 3 Basile Clement 2015-07-21 15:49:06 PDT
Created attachment 257212 [details]
Patch
Comment 4 Michael Saboff 2015-07-22 10:18:05 PDT
Comment on attachment 257212 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=257212&action=review

r=me with minor fix

> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:609
> +    addp CallerFrameAndPCSize, sp

I don't think ARMv7 will allow you to do math with sp register.  You'll probably need to use a temp and then move result to sp.
Comment 5 Mark Lam 2015-07-22 10:19:36 PDT
(In reply to comment #4)
> > Source/JavaScriptCore/llint/LowLevelInterpreter.asm:609
> > +    addp CallerFrameAndPCSize, sp
> 
> I don't think ARMv7 will allow you to do math with sp register.  You'll
> probably need to use a temp and then move result to sp.

Are you sure?  I thought ARMv7 does allow it (hardware-wise).  Should just try a build and see what gets generated.
Comment 6 Basile Clement 2015-07-22 10:46:07 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > > Source/JavaScriptCore/llint/LowLevelInterpreter.asm:609
> > > +    addp CallerFrameAndPCSize, sp
> > 
> > I don't think ARMv7 will allow you to do math with sp register.  You'll
> > probably need to use a temp and then move result to sp.
> 
> Are you sure?  I thought ARMv7 does allow it (hardware-wise).  Should just
> try a build and see what gets generated.

We established it was fine since we are using the two-argument version. Old version was  trying to use the three-mode operand by adding to calleeFrame, which wouldn't work. Landing this soon.
Comment 7 Basile Clement 2015-07-22 10:58:06 PDT
Landed in r187166 <http://trac.webkit.org/changeset/187166>.
Comment 8 Michael Saboff 2015-07-22 13:21:28 PDT
Created attachment 257287 [details]
ARM64 test output with failures
Comment 9 Michael Saboff 2015-07-22 15:56:56 PDT
Created attachment 257306 [details]
ARM32 test output with failures