[Webkit-unassigned] [Bug 130638] [Win64] ASM LLINT is not enabled.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 11 15:59:00 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=130638





--- Comment #20 from Mark Lam <mark.lam at apple.com>  2014-04-11 15:59:19 PST ---
(From update of attachment 229169)
View in context: https://bugs.webkit.org/attachment.cgi?id=229169&action=review

> Source/JavaScriptCore/jit/Repatch.cpp:1048
> -    stubJit.store32(MacroAssembler::TrustedImm32(reinterpret_cast<uint32_t>(structure->id())), MacroAssembler::Address(baseGPR, JSCell::structureIDOffset()));
> +#if USE(JSVALUE64)
> +    uint32_t val = structure->id();
> +#else
> +    uint32_t val = reinterpret_cast<uint32_t>(structure->id());
> +#endif
> +    stubJit.store32(MacroAssembler::TrustedImm32(val), MacroAssembler::Address(baseGPR, JSCell::structureIDOffset()));

Did you explain why this is needed?

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:209
> -    cCall2(_llint_throw_stack_overflow_error, vm, protoCallFrame)
> +    cCall2SlowPath(_llint_throw_stack_overflow_error, vm, protoCallFrame)

Not needed.

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:327
>      else
> -        addp 16, sp 
> +        if X86_64_WIN
> +            subp 32, sp
> +        else
> +            addp 16, sp
> +        end
>          call temp
> -        subp 16, sp
> +        if X86_64_WIN
> +            addp 32, sp
> +        else
> +            subp 16, sp
> +        end
>      end

This will be easier to read and understand if you express it as:

    elsif if X86_64_WIN
        subp 32, sp
        call temp
        addp 32, sp
    else
        addp 16, sp
        call temp
        subp 16, sp
    end

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:383
> +# The signature of a slow path call is extern "C" SlowPathReturnType slowpathfunction(ExecState* exec, Instruction* pc).
> +# The size of the SlowPathReturnType is 16 bytes.
> +# On Win64, when the return type is larger than 8 bytes, we need to allocate space on the stack for the return value.
> +# On entry rcx (t2), should contain a pointer to this stack space. The other parameters are shifted to the right,
> +# rdx (t1) should contain the first argument, and r8 (t6) should contain the second argument.
> +# On return, rax contains a pointer to this stack value, and we then need to copy the 16 byte return value into rax (t0) and rdx (t1)
> +# since the return value is expected to be split between the two.
> +# See http://msdn.microsoft.com/en-us/library/7572ztz4.aspx
> +macro callSlowPathWin64(slowPath, arg1, arg2)
> +    move arg1, t1
> +    move arg2, t6
> +    subp 80, sp
> +    move sp, t2
> +    addp 48, t2
> +    call slowPath
> +    addp 80, sp
> +    move 8[t0], t1
> +    move [t0], t0
> +end

You misunderstood me.  I meant for you to move this inside cCall2.  Is there any reason why that cannot be done?

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:391
> +macro cCall2SlowPath(slowPath, arg1, arg2)
> +    if X86_64_WIN
> +        callSlowPathWin64(slowPath, arg1, arg2)
> +    else
> +        cCall2(slowPath, arg1, arg2)
> +    end
> +end

This is not needed.

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:395
> -    cCall2(slowPath, cfr, PC)
> +    cCall2SlowPath(slowPath, cfr, PC)

No need to change this.  Leave as calling cCall2.  Same with all similar cases below.

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:415
> -    cCall2(slowPath, cfr, PC)
> +    cCall2SlowPath(slowPath, cfr, PC)

Ditto.

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:422
> -    cCall2(_llint_slow_path_handle_watchdog_timer, cfr, PC)
> +    cCall2SlowPath(_llint_slow_path_handle_watchdog_timer, cfr, PC)

Ditto.

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:434
> -            cCall2(_llint_loop_osr, cfr, PC)
> +            cCall2SlowPath(_llint_loop_osr, cfr, PC)

Ditto.

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:555
> -    cCall2(slowPath, cfr, PC)   # This slowPath has the protocol: t0 = 0 => no error, t0 != 0 => error
> +    cCall2SlowPath(slowPath, cfr, PC)   # This slowPath has the protocol: t0 = 0 => no error, t0 != 0 => error

Ditto.

> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:520
> -        cCall2(osrSlowPath, cfr, PC)
> +        cCall2SlowPath(osrSlowPath, cfr, PC)

Ditto.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list