DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/ This Source Code Form is subject to the terms of the Mozilla Public
/ License, v. 2.0. If a copy of the MPL was not distributed with this
/ file, You can obtain one at http://mozilla.org/MPL/2.0/.

.text

/ JSBool JaegerTrampoline(JSContext *cx, StackFrame *fp, void *code,
/                         Value *stackLimit)
.global JaegerTrampoline
.type   JaegerTrampoline, @function
JaegerTrampoline:
    /* Prologue. */
    pushl %ebp
    movl %esp, %ebp
    /* Save non-volatile registers. */
    pushl %esi
    pushl %edi
    pushl %ebx

    /* Build the JIT frame. Push fields in order, */
    /* then align the stack to form esp == VMFrame. */
    movl  12(%ebp), %ebx                       /* load fp */
    pushl %ebx                                 /* unused1 */
    pushl %ebx                                 /* unused0 */
    pushl $0x0                                 /* stubRejoin */
    pushl %ebx                                 /* entryncode */
    pushl %ebx                                 /* entryfp */
    pushl 20(%ebp)                             /* stackLimit */
    pushl 8(%ebp)                              /* cx */
    pushl %ebx                                 /* fp */
    subl $0x1C, %esp

    /* Jump into the JIT'd code. */
    /* No fastcall for sunstudio. */
    pushl %esp
    call PushActiveVMFrame
    popl  %edx

    movl 28(%esp), %ebp                       /* load fp for JIT code */
    jmp  *88(%esp)
.size   JaegerTrampoline, . - JaegerTrampoline

/ void JaegerTrampolineReturn()
.global JaegerTrampolineReturn
.type   JaegerTrampolineReturn, @function
JaegerTrampolineReturn:
    movl  %esi, 0x18(%ebp)
    movl  %edi, 0x1C(%ebp)
    movl  %esp, %ebp
    addl  $0x48, %ebp
    pushl %esp
    call PopActiveVMFrame

    addl $0x40, %esp
    popl %ebx
    popl %edi
    popl %esi
    popl %ebp
    movl $1, %eax
    ret
.size   JaegerTrampolineReturn, . - JaegerTrampolineReturn


/ void *JaegerThrowpoline(js::VMFrame *vmFrame)
.global JaegerThrowpoline
.type   JaegerThrowpoline, @function
JaegerThrowpoline:
    /* For Sun Studio there is no fast call. */
    /* We add the stack by 16 before. */
    addl $0x10, %esp
    /* Align the stack to 16 bytes. */
    pushl %esp
    pushl (%esp)
    pushl (%esp)
    pushl (%esp)
    call js_InternalThrow
    /* Bump the stack by 0x2c, as in the basic trampoline, but */
    /* also one more word to clean up the stack for jsl_InternalThrow,*/
    /* and another to balance the alignment above. */
    addl $0x10, %esp
    testl %eax, %eax
    je   throwpoline_exit
    jmp  *%eax
throwpoline_exit:
    pushl %esp
    call PopActiveVMFrame
    addl $0x40, %esp
    popl %ebx
    popl %edi
    popl %esi
    popl %ebp
    xorl %eax, %eax
    ret
.size   JaegerThrowpoline, . - JaegerThrowpoline

/ void JaegerInterpoline()
.global JaegerInterpoline
.type   JaegerInterpoline, @function
JaegerInterpoline:
    /* For Sun Studio there is no fast call. */
    /* We add the stack by 16 before. */
    addl $0x10, %esp
    /* Align the stack to 16 bytes. */
    pushl %esp
    pushl %eax
    pushl %edi
    pushl %esi
    call js_InternalInterpret
    addl $0x10, %esp
    movl 0x1C(%esp), %ebp    /* Load frame */
    movl 0x18(%ebp), %esi    /* Load rval payload */
    movl 0x1C(%ebp), %edi    /* Load rval type */
    movl 0xC(%esp), %ecx     /* Load scratch -> argc, for any scripted call */
    testl %eax, %eax
    je   interpoline_exit
    jmp  *%eax
interpoline_exit:
    pushl %esp
    call PopActiveVMFrame
    addl $0x40, %esp
    popl %ebx
    popl %edi
    popl %esi
    popl %ebp
    xorl %eax, %eax
    ret
.size   JaegerInterpoline, . - JaegerInterpoline

/ void JaegerInterpolineScripted()
.global JaegerInterpolineScripted
.type   JaegerInterpolineScripted, @function
JaegerInterpolineScripted:
    movl 0x10(%ebp), %ebp
    movl %ebp, 0x1C(%esp)
    subl $0x10, %esp
    jmp JaegerInterpoline
.size   JaegerInterpolineScripted, . - JaegerInterpolineScripted

/ void JaegerInterpolinePatched()
.global JaegerInterpolinePatched
.type   JaegerInterpolinePatched, @function
JaegerInterpolinePatched:
    subl $0x10, %esp
    jmp JaegerInterpoline
.size   JaegerInterpolinePatched, . - JaegerInterpolinePatched