Changeset 96419 in webkit


Ignore:
Timestamp:
Sep 30, 2011 1:36:08 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Fix bug in getHostCallReturnValue of DFG JIT on X86
https://bugs.webkit.org/show_bug.cgi?id=69133

Patch by Yuqiang Xian <yuqiang.xian@intel.com> on 2011-09-30
Reviewed by Gavin Barraclough.

We need to insert the additional argument in the stack slot before
return address instead of simply pushing it afterwards.
Also getHostCallReturnValue* should be attributed as stdcall
to make the stack cleaned up by the callee.

  • dfg/DFGOperations.cpp:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r96418 r96419  
     12011-09-30  Yuqiang Xian  <yuqiang.xian@intel.com>
     2
     3        Fix bug in getHostCallReturnValue of DFG JIT on X86
     4        https://bugs.webkit.org/show_bug.cgi?id=69133
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        We need to insert the additional argument in the stack slot before
     9        return address instead of simply pushing it afterwards.
     10        Also getHostCallReturnValue* should be attributed as stdcall
     11        to make the stack cleaned up by the callee.
     12
     13        * dfg/DFGOperations.cpp:
     14
    1152011-09-30  Pierre Rossi  <pierre.rossi@gmail.com>
    216
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r96286 r96419  
    533533}
    534534
    535 EncodedJSValue getHostCallReturnValue();
    536 EncodedJSValue getHostCallReturnValueWithExecState(ExecState*);
     535EncodedJSValue DFG_OPERATION getHostCallReturnValue();
     536EncodedJSValue DFG_OPERATION getHostCallReturnValueWithExecState(ExecState*);
    537537
    538538#if CPU(X86_64)
     
    549549SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    550550    "mov -40(%edi), %edi\n"
    551     "push %edi\n"
     551    "mov (%esp), %ecx\n"
     552    "mov %edi, (%esp)\n"
     553    "lea -4(%esp), %esp\n"
     554    "mov %ecx, (%esp)\n"
    552555    "jmp " SYMBOL_STRING(getHostCallReturnValueWithExecState) "\n"
    553556);
    554557#endif
    555558
    556 EncodedJSValue getHostCallReturnValueWithExecState(ExecState* exec)
     559EncodedJSValue DFG_OPERATION getHostCallReturnValueWithExecState(ExecState* exec)
    557560{
    558561    return JSValue::encode(exec->globalData().hostCallReturnValue);
Note: See TracChangeset for help on using the changeset viewer.