[webkit-dev] ARM JIT for WinCE

Patrick Roland Gansterer paroga at paroga.com
Thu Jan 7 06:20:48 PST 2010


Hi,

many thanks! It works already when I disable OPTIMIZE_NATIVE_CALL (other 3 
OPTIMIZE are turned on). I think you're right with the ABI problem. Maybe you 
can help me with it too: Here are the instruction dumps with and without the 
OPTIMIZE_NATIVE_CALL:

==============================================================================
====================== #define OPTIMIZE_NATIVE_CALL = 1 ======================
==============================================================================

003E0100  ldr         r8, [r2, #8] 
003E0104  cmp         r8, #0 
003E0108  bgt         003E012C 
003E010C  mov         r7, lr 
003E0110  mov         r0, sp 
003E0114  str         r4, [sp, #0x40] 
003E0118  mov         lr, pc 
003E011C  ldr         pc, [pc, #0x128] 
003E0120  ldr         r1, [sp, #0xC] 
003E0124  mov         lr, r7 
003E0128  ldr         r2, [r0, #0x18] 
003E012C  ldr         r8, [r2, #8] 
003E0130  cmp         r8, r1 
003E0134  beq         003E0160 
003E0138  mov         r7, lr 
003E013C  str         r7, [sp, #8] 
003E0140  mov         r0, sp 
003E0144  str         r4, [sp, #0x40] 
003E0148  mov         lr, pc 
003E014C  ldr         pc, [pc, #0x100] 
003E0150  mov         r4, r1 
003E0154  ldr         r1, [sp, #0xC] 
003E0158  mov         lr, r7 
003E015C  ldr         r2, [r0, #0x18] 
003E0160  str         r1, [r4, #-0xC] 
003E0164  ldr         r1, [r0, #0x1C] 
003E0168  ldr         r8, [pc, #0xE8] 
003E016C  str         r8, [r4, #-4] 
003E0170  str         r0, [r4, #-8] 
003E0174  str         r1, [r4, #-0x1C] 
003E0178  ldr         r0, [r2, #0xC] 
003E017C  mov         pc, r0 
003E0180  mov         r0, lr 
003E0184  str         r0, [r4, #-0x14] 
003E0188  ldr         r1, [r4, #-0x18] 
003E018C  ldr         r1, [r1, #-0x1C] 
003E0190  str         r1, [r4, #-0x1C] 
003E0194  ldr         r0, [r4, #-0xC] 
003E0198  subs        sp, sp, #8 
003E019C  subs        r0, r0, #1 
003E01A0  str         r0, [sp, #4] 
003E01A4  mov         r1, r4 
003E01A8  subs        r1, r1, #0x20 
003E01AC  mov         r3, #4 
003E01B0  muls        r0, r3, r0 
003E01B4  subs        r1, r1, r0 
003E01B8  str         r1, [sp] 
003E01BC  ldr         r2, [r1, #-4] 
003E01C0  ldr         r1, [r4, #-8] 
003E01C4  mov         r0, r4 
003E01C8  mov         r3, sp 
003E01CC  mov         lr, pc 
003E01D0  ldr         pc, [r1, #0x1C] 
    // R0 = 0x003f8080 R1 = 0x00601780 R2 = 0x00601760 R3 = 0x182af984
    // R4 = 0x003f8080 R5 = 0x00000200 R6 = 0x00600000 R7 = 0x003e07b8
    // R8 = 0x00000000 R9 = 0x182afbfc R10 = 0x00000000 R11 = 0x002b0370
    // R12 = 0x182af8f0 Sp = 0x182af984 Lr = 0x003e01d4
    // Pc = 0x00073468 Psr = 0x2000001f
003E01D4  adds        sp, sp, #8 
003E01D8  ldr         r3, [pc, #0x7C] 
003E01DC  ldr         r2, [r3] 
003E01E0  bics        r3, r2, #0 
003E01E4  bne         003E01F8 
003E01E8  ldr         r1, [r4, #-0x14] 
003E01EC  ldr         r4, [r4, #-0x18] 
003E01F0  mov         lr, r1 
003E01F4  mov         pc, lr 
003E01F8  ldr         r1, [r4, #-0x14] 
003E01FC  ldr         r2, [pc, #0x60] 
003E0200  str         r1, [r2] 
003E0204  ldr         r2, [pc, #0x5C] 
003E0208  ldr         r4, [r4, #-0x18] 
003E020C  str         r4, [sp, #0x40] 
003E0210  mov         lr, r2 
003E0214  mov         pc, lr 

==============================================================================

JSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec, 
JSObject*, JSValue thisValue, const ArgList&)
{
00073468  mov         r12, sp 
0007346C  stmdb       sp!, {r0 - r3} 
00073470  stmdb       sp!, {r4, r12, lr} 
00073474  sub         sp, sp, #0x1C 
    if (!thisValue.inherits(&DateInstance::info))
00073478  ldr         r1, [pc, #0x100] 
    // R0 = 0x003f8080 R1 = 0x00601780 R2 = 0x00601760 R3 = 0x182af984
    // R4 = 0x003f8080 R5 = 0x00000200 R6 = 0x00600000 R7 = 0x003e07b8
    // R8 = 0x00000000 R9 = 0x182afbfc R10 = 0x00000000 R11 = 0x002b0370
    // R12 = 0x182af984 Sp = 0x182af94c Lr = 0x003e01d4 
    // Pc = 0x00073478 Psr = 0x2000001f 
0007347C  add         r0, sp, #0x34 
00073480  bl          |JSC::JSValue::inherits ( 6997ch )| 
00073484  strb        r0, [sp, #0xC] 
00073488  ldrb        r3, [sp, #0xC] 
0007348C  cmp         r3, #0 
00073490  bne         |JSC::dateProtoFuncGetTimezoneOffset + 0x54 ( 734bch )| 
        return throwError(exec, TypeError);
00073494  mov         r1, #5 
00073498  ldr         r0, exec 
0007349C  bl          |JSC::throwError ( 5dd78h )| 
000734A0  str         r0, [sp, #0x10] 
000734A4  ldr         r1, [sp, #0x10] 
000734A8  ldr         r0, [sp, #0x28] 
000734AC  bl          |
WTF::OwnArrayPtr<JSC::Register>::OwnArrayPtr<JSC::Register> ( 110e8h )| 
000734B0  ldr         r3, [sp, #0x28] 
000734B4  str         r3, [sp, #8] 
000734B8  b           |JSC::dateProtoFuncGetTimezoneOffset + 0x100 ( 73568h )| 

    DateInstance* thisDateObj = asDateInstance(thisValue); 
000734BC  ldr         r0, thisValue 
000734C0  bl          |JSC::asRegExpConstructor ( 697b8h )| 
000734C4  str         r0, [sp, #0x14] 
000734C8  ldr         r3, [sp, #0x14] 
000734CC  str         r3, thisDateObj 

    const GregorianDateTime* gregorianDateTime = thisDateObj-
>gregorianDateTime(exec);
000734D0  ldr         r1, exec 
000734D4  ldr         r0, thisDateObj 
000734D8  bl          |JSC::DateInstance::gregorianDateTime ( 74e14h )| 
000734DC  str         r0, [sp, #0x18] 
000734E0  ldr         r3, [sp, #0x18] 
000734E4  str         r3, [sp] 
    if (!gregorianDateTime)
000734E8  ldr         r3, [sp] 
000734EC  cmp         r3, #0 
000734F0  bne         |JSC::dateProtoFuncGetTimezoneOffset + 0xa4 ( 7350ch )| 
        return jsNaN(exec);
000734F4  ldr         r1, exec 
000734F8  ldr         r0, [sp, #0x28] 
000734FC  bl          |JSC::jsNaN ( 1be1ch )| 
00073500  ldr         r3, [sp, #0x28] 
00073504  str         r3, [sp, #8] 
00073508  b           |JSC::dateProtoFuncGetTimezoneOffset + 0x100 ( 73568h )| 
    return jsNumber(exec, -gregorianDateTime->utcOffset / minutesPerHour);
0007350C  ldr         r3, [sp] 
00073510  add         r3, r3, #0x24 
00073514  ldr         r3, [r3] 
00073518  rsb         r0, r3, #0 
0007351C  ldr         r3, [pc, #0x58] 
00073520  ldr         r3, [r3] 
00073524  mov         lr, pc 
00073528  mov         pc, r3 
0007352C  ldr         r3, [pc, #0x44] 
00073530  ldr         r2, [r3] 
00073534  ldr         r3, [pc, #0x3C] 
00073538  ldr         r3, thisDateObj 
0007353C  ldr         lr, __formal 
00073540  ldr         r4, [lr] 
00073544  mov         lr, pc 
00073548  mov         pc, r4 
0007354C  mov         r2, r0 
00073550  mov         r3, r1 
00073554  ldr         r1, exec 
00073558  ldr         r0, [sp, #0x28] 
0007355C  bl          |JSC::jsNumber ( 1bb40h )| 
00073560  ldr         r3, [sp, #0x28] 
00073564  str         r3, [sp, #8] 
}
00073568  ldr         r0, [sp, #8] 
0007356C  add         sp, sp, #0x1C 
00073570  ldmia       sp, {r4, sp, pc} 
00073574  andeqs      r9, r8, r4, ror #1 
00073578  andeqs      lr, r4, r8, asr #10 
0007357C  andeqs      r9, r8, r4, asr #32 
00073580  andeqs      r9, r8, r8, lsl r8 

==============================================================================
====================== #define OPTIMIZE_NATIVE_CALL = 0 ======================
==============================================================================

cti_op_call_NotJSFunction:
0014A224  str         lr, [sp, #0x20] 
0014A228  bl          |JITStubThunked_op_call_NotJSFunction ( b1598h )| 
0014A22C  ldr         lr, [sp, #0x20] 
0014A230  bx          lr   

================================================================================

DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_NotJSFunction)
{
000B1598  mov         r12, sp 
000B159C  stmdb       sp!, {r0} 
000B15A0  stmdb       sp!, {r4, r12, lr} 
000B15A4  sub         sp, sp, #0xF4 
    STUB_INIT_STACK_FRAME(stackFrame);
000B15A8  ldr         r3, args 
000B15AC  str         r3, stackFrame 

    JSValue funcVal = stackFrame.args[0].jsValue();
000B15B0  add         r1, sp, #0x20 
000B15B4  ldr         r3, stackFrame 
000B15B8  add         r0, r3, #4 
000B15BC  bl          |JSC::JITStubArg::jsValue ( b87b8h )| 

    CallData callData;
    CallType callType = funcVal.getCallData(callData);
000B15C0  add         r1, sp, #0x28 
000B15C4  add         r0, sp, #0x20 
000B15C8  bl          |JSC::JSValue::getCallData ( 5465ch )| 
000B15CC  str         r0, [sp, #0x84] 
000B15D0  ldr         r3, [sp, #0x84] 
000B15D4  str         r3, callType 

    ASSERT(callType != CallTypeJS);

    if (callType == CallTypeHost) {
000B15D8  ldr         r3, callType 
000B15DC  cmp         r3, #1 
000B15E0  bne         |JITStubThunked_op_call_NotJSFunction + 0x2c4 ( b185ch 
)| 
        int registerOffset = stackFrame.args[1].int32();
000B15E4  ldr         r3, stackFrame 
000B15E8  add         r0, r3, #8 
000B15EC  bl          |WTF::VectorBufferBase<JSC::PropertyMapEntry *>::buffer 
( 5a2c8h )| 
000B15F0  str         r0, [sp, #0x88] 
000B15F4  ldr         r3, [sp, #0x88] 
000B15F8  str         r3, [sp, #0x40] 
        int argCount = stackFrame.args[2].int32();
000B15FC  ldr         r3, stackFrame 
000B1600  add         r0, r3, #0xC 
000B1604  bl          |WTF::VectorBufferBase<JSC::PropertyMapEntry *>::buffer 
( 5a2c8h )| 
000B1608  str         r0, [sp, #0x8C] 
000B160C  ldr         r3, [sp, #0x8C] 
000B1610  str         r3, [sp, #0x38] 
        CallFrame* previousCallFrame = stackFrame.callFrame;
000B1614  ldr         r3, stackFrame 
000B1618  add         r3, r3, #0x40 
000B161C  ldr         r3, [r3] 
000B1620  str         r3, [sp, #0x3C] 
        CallFrame* callFrame = CallFrame::create(previousCallFrame-
>registers() + registerOffset);
000B1624  ldr         r0, [sp, #0x3C] 
000B1628  bl          |JSC::SourceProvider::asID ( 6bd0ch )| 
000B162C  str         r0, [sp, #0x90] 
000B1630  ldr         r1, [sp, #0x40] 
000B1634  mov         r3, #4 
000B1638  mul         r2, r1, r3 
000B163C  ldr         r3, [sp, #0x90] 
000B1640  add         r0, r3, r2 
000B1644  bl          |JSC::SourceProvider::asID ( 6bd0ch )| 
000B1648  str         r0, [sp, #0x94] 
000B164C  ldr         r3, [sp, #0x94] 
000B1650  str         r3, [sp, #0x30] 

        callFrame->init(0, 
static_cast<Instruction*>((STUB_RETURN_ADDRESS).value()), previousCallFrame-
>scopeChain(), previousCallFrame, 0, argCount, 0);
000B1654  ldr         r0, [sp, #0x3C] 
000B1658  bl          |JSC::ExecState::scopeChain ( 115d0h )| 
000B165C  str         r0, [sp, #0x98] 
000B1660  ldr         r0, stackFrame 
000B1664  bl          |JSC::JITStackFrame::returnAddressSlot ( b87ech )| 
000B1668  str         r0, [sp, #0x9C] 
000B166C  ldr         r0, [sp, #0x9C] 
000B1670  bl          |WTF::VectorBufferBase<JSC::PropertyMapEntry *>::buffer 
( 5a2c8h )| 
000B1674  str         r0, [sp, #0xA0] 
000B1678  mov         r3, #0 
000B167C  str         r3, [sp, #0xC] 
000B1680  ldr         r3, [sp, #0x38] 
000B1684  str         r3, [sp, #8] 
000B1688  mov         r3, #0 
000B168C  str         r3, [sp, #4] 
000B1690  ldr         r3, [sp, #0x3C] 
000B1694  str         r3, [sp] 
000B1698  ldr         r3, [sp, #0x98] 
000B169C  ldr         r2, [sp, #0xA0] 
000B16A0  mov         r1, #0 
000B16A4  ldr         r0, [sp, #0x30] 
000B16A8  bl          |JSC::ExecState::init ( 1b4d4h )| 
        stackFrame.callFrame = callFrame;
000B16AC  ldr         r3, stackFrame 
000B16B0  add         r2, r3, #0x40 
000B16B4  ldr         r3, [sp, #0x30] 
000B16B8  str         r3, [r2] 

        Register* argv = stackFrame.callFrame->registers() - 
RegisterFile::CallFrameHeaderSize - argCount;
000B16BC  ldr         r3, stackFrame 
000B16C0  add         r3, r3, #0x40 
000B16C4  ldr         r0, [r3] 
000B16C8  bl          |JSC::SourceProvider::asID ( 6bd0ch )| 
000B16CC  str         r0, [sp, #0xA4] 
000B16D0  ldr         r3, [sp, #0xA4] 
000B16D4  sub         r1, r3, #0x20 
000B16D8  ldr         r2, [sp, #0x38] 
000B16DC  mov         r3, #4 
000B16E0  mul         r3, r2, r3 
000B16E4  sub         r3, r1, r3 
000B16E8  str         r3, [sp, #0x34] 
        ArgList argList(argv + 1, argCount - 1);
000B16EC  ldr         r3, [sp, #0x38] 
000B16F0  sub         r2, r3, #1 
000B16F4  ldr         r3, [sp, #0x34] 
000B16F8  add         r1, r3, #4 
000B16FC  add         r0, sp, #0x44 
000B1700  bl          |
JSC::CallReturnOffsetToBytecodeIndex::CallReturnOffsetToBytecodeIndex ( e56c4h 
)| 

        JSValue returnValue;
000B1704  add         r0, sp, #0x4C 
000B1708  bl          |WTF::GenericHashTraits<WTF::RefPtr<JSC::UStringImpl> 
>::emptyValue ( 15260h )| 
        {
            SamplingTool::HostCallRecord callRecord(CTI_SAMPLER);
000B170C  mov         r1, #0 
000B1710  add         r0, sp, #0x54 
000B1714  bl          |JSC::SamplingTool::HostCallRecord::HostCallRecord ( 
a754ch )| 
000B1718  str         r0, [sp, #0xA8] 

            // FIXME: All host methods should be calling toThisObject, but 
this is not presently the case.
            JSValue thisValue = argv[0].jsValue();
000B171C  add         r1, sp, #0x50 
000B1720  ldr         r0, [sp, #0x34] 
000B1724  bl          |JSC::JITStubArg::jsValue ( b87b8h )| 
            if (thisValue == jsNull())
000B1728  add         r0, sp, #0x58 
000B172C  bl          |JSC::jsNull ( 110d8h )| 
000B1730  str         r0, [sp, #0xAC] 
000B1734  ldr         r1, [sp, #0xAC] 
000B1738  add         r0, sp, #0x50 
000B173C  bl          |JSC::operator== ( 11690h )| 
000B1740  strb        r0, [sp, #0xB0] 
000B1744  ldrb        r3, [sp, #0xB0] 
000B1748  cmp         r3, #0 
000B174C  beq         |JITStubThunked_op_call_NotJSFunction + 0x1e0 ( b1778h 
)| 
                thisValue = callFrame->globalThisValue();
000B1750  ldr         r0, [sp, #0x30] 
000B1754  bl          |JSC::ExecState::globalThisValue ( 22c54h )| 
000B1758  str         r0, [sp, #0xB4] 
000B175C  ldr         r1, [sp, #0xB4] 
000B1760  add         r0, sp, #0x5C 
000B1764  bl          |JSC::JSValue::JSValue ( 151ach )| 
000B1768  add         r0, sp, #0x50 
000B176C  add         r1, sp, #0x5C 
000B1770  mov         r2, #4 
000B1774  bl          001489A8 

            returnValue = callData.native.function(callFrame, 
asObject(funcVal), thisValue, argList);
000B1778  ldr         r0, funcVal 
000B177C  bl          |JSC::asArray ( 84d80h )| 
000B1780  str         r0, [sp, #0xB8] 
000B1784  add         r3, sp, #0x44 
000B1788  str         r3, [sp] 
000B178C  ldr         r3, [sp, #0x50] 
000B1790  ldr         r2, [sp, #0xB8] 
000B1794  ldr         r1, [sp, #0x30] 
000B1798  add         r0, sp, #0x60 
000B179C  ldr         r4, callData 
000B17A0  mov         lr, pc 
000B17A4  mov         pc, r4 
000B17A8  str         r0, [sp, #0xBC] 
000B17AC  ldr         r1, [sp, #0xBC] 
000B17B0  add         r0, sp, #0x4C 
000B17B4  mov         r2, #4 
000B17B8  bl          001489A8 
        }
000B17BC  add         r0, sp, #0x54 
000B17C0  bl          |
WTF::ThreadSafeShared<OpaqueJSString>::~ThreadSafeShared<OpaqueJSString> ( 
c8734h )| 
        stackFrame.callFrame = previousCallFrame;
000B17C4  ldr         r3, stackFrame 
000B17C8  add         r2, r3, #0x40 
000B17CC  ldr         r3, [sp, #0x3C] 
000B17D0  str         r3, [r2] 
        CHECK_FOR_EXCEPTION();
000B17D4  ldr         r3, stackFrame 
000B17D8  add         r3, r3, #0x4C 
000B17DC  ldr         r3, [r3] 
000B17E0  add         r3, r3, #0xB, 24 
000B17E4  add         r0, r3, #0xF8 
000B17E8  bl          |JSC::JSValue::operator bool ( 110f0h )| 
000B17EC  strb        r0, [sp, #0xC0] 
000B17F0  ldrb        r3, [sp, #0xC0] 
000B17F4  cmp         r3, #0 
000B17F8  beq         |JITStubThunked_op_call_NotJSFunction + 0x2ac ( b1844h 
)| 
000B17FC  ldr         r0, stackFrame 
000B1800  bl          |JSC::JITStackFrame::returnAddressSlot ( b87ech )| 
000B1804  str         r0, [sp, #0xC4] 
000B1808  ldr         r0, stackFrame 
000B180C  bl          |JSC::JITStackFrame::returnAddressSlot ( b87ech )| 
000B1810  str         r0, [sp, #0xC8] 
000B1814  ldr         r2, [sp, #0xC4] 
000B1818  ldr         r3, [sp, #0xC8] 
000B181C  str         r3, [sp, #0xCC] 
000B1820  ldr         r3, [sp, #0xCC] 
000B1824  ldr         r1, [r3] 
000B1828  ldr         r3, stackFrame 
000B182C  add         r3, r3, #0x4C 
000B1830  ldr         r0, [r3] 
000B1834  bl          |JSC::returnToThrowTrampoline ( ae4fch )| 
000B1838  mov         r3, #0 
000B183C  str         r3, [sp, #0x7C] 
000B1840  b           |JITStubThunked_op_call_NotJSFunction + 0x3a8 ( b1940h 
)| 

        return JSValue::encode(returnValue);
000B1844  ldr         r0, [sp, #0x4C] 
000B1848  bl          |
WTF::HashTable<WTF::RefPtr<JSC::UStringImpl>,WTF::RefPtr<JSC::UStringImpl>,WTF::Identit 
000B184C  str         r0, [sp, #0xD0] 
000B1850  ldr         r3, [sp, #0xD0] 
000B1854  str         r3, [sp, #0x7C] 
000B1858  b           |JITStubThunked_op_call_NotJSFunction + 0x3a8 ( b1940h 
)| 
    }

    ASSERT(callType == CallTypeNone);

    CallFrame* callFrame = stackFrame.callFrame;
000B185C  ldr         r3, stackFrame 
000B1860  add         r3, r3, #0x40 
000B1864  ldr         r3, [r3] 
000B1868  str         r3, callFrame 
    CodeBlock* codeBlock = callFrame->codeBlock();
000B186C  ldr         r0, callFrame 
000B1870  bl          |JSC::ExecState::codeBlock ( a4bcch )| 
000B1874  str         r0, [sp, #0xD4] 
000B1878  ldr         r3, [sp, #0xD4] 
000B187C  str         r3, codeBlock 
    unsigned vPCIndex = codeBlock->getBytecodeIndex(callFrame, 
STUB_RETURN_ADDRESS);
000B1880  ldr         r0, stackFrame 
000B1884  bl          |JSC::JITStackFrame::returnAddressSlot ( b87ech )| 
000B1888  str         r0, [sp, #0xD8] 
000B188C  ldr         r3, [sp, #0xD8] 
000B1890  str         r3, [sp, #0xDC] 
000B1894  ldr         r3, [sp, #0xDC] 
000B1898  ldr         r2, [r3] 
000B189C  ldr         r1, callFrame 
000B18A0  ldr         r0, codeBlock 
000B18A4  bl          |JSC::CodeBlock::getBytecodeIndex ( a5a48h )| 
000B18A8  str         r0, [sp, #0xE0] 
000B18AC  ldr         r3, [sp, #0xE0] 
000B18B0  str         r3, vPCIndex 
    stackFrame.globalData->exception = 
createNotAFunctionError(stackFrame.callFrame, funcVal, vPCIndex, codeBlock);
000B18B4  ldr         r3, codeBlock 
000B18B8  str         r3, [sp] 
000B18BC  ldr         r3, vPCIndex 
000B18C0  ldr         r2, funcVal 
000B18C4  ldr         r1, stackFrame 
000B18C8  add         r1, r1, #0x40 
000B18CC  ldr         r1, [r1] 
000B18D0  add         r0, sp, #0x64 
000B18D4  bl          |JSC::createNotAFunctionError ( de324h )| 
000B18D8  str         r0, [sp, #0xE4] 
000B18DC  ldr         r1, [sp, #0xE4] 
000B18E0  ldr         r3, stackFrame 
000B18E4  add         r3, r3, #0x4C 
000B18E8  ldr         r3, [r3] 
000B18EC  add         r3, r3, #0xB, 24 
000B18F0  add         r0, r3, #0xF8 
000B18F4  mov         r2, #4 
000B18F8  bl          001489A8 
    VM_THROW_EXCEPTION();
000B18FC  ldr         r0, stackFrame 
000B1900  bl          |JSC::JITStackFrame::returnAddressSlot ( b87ech )| 
000B1904  str         r0, [sp, #0xE8] 
000B1908  ldr         r0, stackFrame 
000B190C  bl          |JSC::JITStackFrame::returnAddressSlot ( b87ech )| 
000B1910  str         r0, [sp, #0xEC] 
000B1914  ldr         r2, [sp, #0xE8] 
000B1918  ldr         r3, [sp, #0xEC] 
000B191C  str         r3, [sp, #0xF0] 
000B1920  ldr         r3, [sp, #0xF0] 
000B1924  ldr         r1, [r3] 
000B1928  ldr         r3, stackFrame 
000B192C  add         r3, r3, #0x4C 
000B1930  ldr         r0, [r3] 
000B1934  bl          |JSC::returnToThrowTrampoline ( ae4fch )| 
000B1938  mov         r3, #0 
000B193C  str         r3, [sp, #0x7C] 
}
000B1940  ldr         r0, [sp, #0x7C] 
000B1944  add         sp, sp, #0xF4 
000B1948  ldmia       sp, {r4, sp, pc} 

================================================================================

JSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec, 
JSObject*, JSValue thisValue, const ArgList&)
{
00071600  mov         r12, sp 
00071604  stmdb       sp!, {r0 - r3} 
00071608  stmdb       sp!, {r4, r12, lr} 
0007160C  sub         sp, sp, #0x1C 
    if (!thisValue.inherits(&DateInstance::info))
00071610  ldr         r1, [pc, #0x100] 
    // R0 = 0x182af8e8 R1 = 0x003f8080 R2 = 0x00601780 R3 = 0x00601760
    // R4 = 0x00071600 R5 = 0x00000200 R6 = 0x00600000 R7 = 0x003e03a8
    // R8 = 0x0014b538 R9 = 0x182afbfc R10 = 0x00000000 R11 = 0x002b0370
    // R12 = 0x182af888 Sp = 0x182af850 Lr = 0x000b17a8 
    // Pc = 0x00071610 Psr = 0x6000001f 
00071614  add         r0, sp, #0x34 
00071618  bl          |JSC::JSValue::inherits ( 67f58h )| 
0007161C  strb        r0, [sp, #0xC] 
00071620  ldrb        r3, [sp, #0xC] 
00071624  cmp         r3, #0 
00071628  bne         |JSC::dateProtoFuncGetTimezoneOffset + 0x54 ( 71654h )| 
        return throwError(exec, TypeError);
0007162C  mov         r1, #5 
00071630  ldr         r0, exec 
00071634  bl          |JSC::throwError ( 5db04h )| 
00071638  str         r0, [sp, #0x10] 
0007163C  ldr         r1, [sp, #0x10] 
00071640  ldr         r0, [sp, #0x28] 
00071644  bl          |JSC::JSValue::JSValue ( 151ach )| 
00071648  ldr         r3, [sp, #0x28] 
0007164C  str         r3, [sp, #8] 
00071650  b           |JSC::dateProtoFuncGetTimezoneOffset + 0x100 ( 71700h )| 

    DateInstance* thisDateObj = asDateInstance(thisValue); 
00071654  ldr         r0, thisValue 
00071658  bl          |JSC::asInternalFunction ( 88934h )| 
0007165C  str         r0, [sp, #0x14] 
00071660  ldr         r3, [sp, #0x14] 
00071664  str         r3, thisDateObj 

    const GregorianDateTime* gregorianDateTime = thisDateObj-
>gregorianDateTime(exec);
00071668  ldr         r1, exec 
0007166C  ldr         r0, thisDateObj 
00071670  bl          |JSC::DateInstance::gregorianDateTime ( 72fach )| 
00071674  str         r0, [sp, #0x18] 
00071678  ldr         r3, [sp, #0x18] 
0007167C  str         r3, [sp] 
    if (!gregorianDateTime)
00071680  ldr         r3, [sp] 
00071684  cmp         r3, #0 
00071688  bne         |JSC::dateProtoFuncGetTimezoneOffset + 0xa4 ( 716a4h )| 
        return jsNaN(exec);
0007168C  ldr         r1, exec 
00071690  ldr         r0, [sp, #0x28] 
00071694  bl          |JSC::jsNaN ( 1bd84h )| 
00071698  ldr         r3, [sp, #0x28] 
0007169C  str         r3, [sp, #8] 
000716A0  b           |JSC::dateProtoFuncGetTimezoneOffset + 0x100 ( 71700h )| 
    return jsNumber(exec, -gregorianDateTime->utcOffset / minutesPerHour);
000716A4  ldr         r3, [sp] 
000716A8  add         r3, r3, #0x24 
000716AC  ldr         r3, [r3] 
000716B0  rsb         r0, r3, #0 
000716B4  ldr         r3, [pc, #0x58] 
000716B8  ldr         r3, [r3] 
000716BC  mov         lr, pc 
000716C0  mov         pc, r3 
000716C4  ldr         r3, [pc, #0x44] 
000716C8  ldr         r2, [r3] 
000716CC  ldr         r3, [pc, #0x3C] 
000716D0  ldr         r3, thisDateObj 
000716D4  ldr         lr, __formal 
000716D8  ldr         r4, [lr] 
000716DC  mov         lr, pc 
000716E0  mov         pc, r4 
000716E4  mov         r2, r0 
000716E8  mov         r3, r1 
000716EC  ldr         r1, exec 
000716F0  ldr         r0, [sp, #0x28] 
000716F4  bl          |JSC::jsNumber ( 1baa8h )| 
000716F8  ldr         r3, [sp, #0x28] 
000716FC  str         r3, [sp, #8] 
}
00071700  ldr         r0, [sp, #8] 
00071704  add         sp, sp, #0x1C 
00071708  ldmia       sp, {r4, sp, pc} 
0007170C  andeqs      r9, r8, r4, ror #1 
00071710  andeqs      lr, r4, r8, ror r4 
00071714  andeqs      r9, r8, r4, asr #32 
00071718  andeqs      r9, r8, r8, lsl r8 

- Patrick


More information about the webkit-dev mailing list