Bug 122980 - Fix callOperation for operationThrow to handle Win X86_64 calling convention
Summary: Fix callOperation for operationThrow to handle Win X86_64 calling convention
Status: RESOLVED DUPLICATE of bug 122982
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks: 121756
  Show dependency treegraph
 
Reported: 2013-10-17 11:14 PDT by Michael Saboff
Modified: 2013-10-17 20:12 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2013-10-17 11:14:26 PDT
The callOperation() near line 295 in JITInlines.h needs to be updated for the Win X86_64 calling convention.  When a function returns a POD that doesn't fit in one register, the caller needs to allocate space for the result and pass it as the first argument.  The code and comments added with change set r157581: <http://trac.webkit.org/changeset/157581> are:

    // Need to make space on stack for return value, use that address as first arg (in register),
    // move callFrameRegister to second argument register and push the passed arg1.
    updateTopCallFrame();
    MacroAssembler::Call call = appendCall(operation);
    // These may not be pops:
    // pop(regT0); // Restore arg1 slot
    // pop(regT0); // Get handler's call frame
    // pop(regT1); // Get handler's address
    return call;
Comment 1 Alex Christensen 2013-10-17 16:48:45 PDT
That code is inside of #if USE(JSVALUE64), which I don't use.  I'm not sure what the state of Apple's Win64 build is, but this change will not affect the crashes I was seeing.
Comment 2 Michael Saboff 2013-10-17 18:36:03 PDT
This issue is addressed with the fix for https://bugs.webkit.org/show_bug.cgi?id=122982.

*** This bug has been marked as a duplicate of bug 122982 ***
Comment 3 Geoffrey Garen 2013-10-17 18:37:00 PDT
(In reply to comment #1)
> That code is inside of #if USE(JSVALUE64), which I don't use.  I'm not sure what the state of Apple's Win64 build is, but this change will not affect the crashes I was seeing.

WinCairo on X86_64 doesn't use JSVALUE64? JSVALUE64 is a requirement for 64bit platforms.
Comment 4 Alex Christensen 2013-10-17 20:12:36 PDT
> WinCairo on X86_64 doesn't use JSVALUE64? JSVALUE64 is a requirement for 64bit platforms.

Once again, Geoff is right.  I got JSVALUE64 (which is used) mixed up with JSVALUE32_64 (which is not used).  Ignore my earlier comment.