Bug 146484

Summary: jsc-tailcall: Add new opcodes for tail calls
Product: WebKit Reporter: Basile Clement <basile_clement>
Component: JavaScriptCoreAssignee: Basile Clement <basile_clement>
Status: RESOLVED FIXED    
Severity: Enhancement CC: fpizlo, ggaren, mark.lam, msaboff, saam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 146481, 146846, 146847, 146967    
Bug Blocks: 146477, 146850, 147195    
Attachments:
Description Flags
Patch
msaboff: review+
ARM64 test output with failures
none
ARM32 test output with failures none

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