Changeset 164397 in webkit
- Timestamp:
- Feb 19, 2014 3:41:21 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r164396 r164397 1 2014-02-19 Mark Lam <mark.lam@apple.com> 2 3 Need to align sp before calling operationLoadVarargs on 32-bit platforms. 4 <https://webkit.org/b/129056> 5 6 Reviewed by Michael Saboff. 7 8 In JIT::compileLoadVarargs(), we'll call operationSizeFrameForVarargs() 9 to compute the amount of stack space we need for the varargs, adjust the 10 stack pointer to make room for those varargs, and then call 11 operationLoadVarargs() to fill in the varargs. Currently, the stack 12 pointer adjustment takes care of allocating space for the varargs, but 13 does not align the stack pointer for the call to operationLoadVarargs(). 14 The fix is to align the stack pointer there. 15 16 Note: The stack pointer adjustment is based on the new CallFrame pointer 17 value returned by operationSizeFrameForVarargs(). On 64-bit platforms, 18 both the stack pointer and call frame pointer are similarly aligned 19 (i.e. low nibbles are 0). Hence, no additional adjustment is needed. 20 Only the 32-bit code needs the fix. 21 22 Note: The LLINT also works this way i.e. aligns the stack pointer before 23 calling llint_slow_path_call_varargs(). 24 25 * jit/JITCall32_64.cpp: 26 (JSC::JIT::compileLoadVarargs): 27 1 28 2014-02-19 Sam Weinig <sam@webkit.org> 2 29 -
trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp
r163844 r164397 187 187 emitLoad(arguments, regT1, regT0); 188 188 callOperation(operationSizeFrameForVarargs, regT1, regT0, firstFreeRegister); 189 move(returnValueGPR, stackPointerRegister);189 addPtr(TrustedImm32(-sizeof(CallerFrameAndPC)), returnValueGPR, stackPointerRegister); 190 190 emitLoad(thisValue, regT1, regT4); 191 191 emitLoad(arguments, regT3, regT2);
Note: See TracChangeset
for help on using the changeset viewer.