[Webkit-unassigned] [Bug 99706] MIPS LLInt implementation.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 24 11:30:25 PDT 2012


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





--- Comment #18 from Balazs Kilvady <kilvadyb at homejinni.com>  2012-10-24 11:31:31 PST ---
(In reply to comment #14)
> (From update of attachment 169392 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=169392&action=review
> 
> > Source/JavaScriptCore/offlineasm/mips.rb:398
> > +        if scaleShift == 0
> > +            tmp0 = Tmp.new(codeOrigin, :gpr)
> > +            list << Instruction.new(codeOrigin, "addp", [base, index, tmp0])
> > +            Address.new(codeOrigin, tmp0, Immediate.new(codeOrigin, offset.value));
> 
> scaleShift will never be 0.
There is 0 scaleShift so I would like to keep that checking. For example at LowLevelInterpreter.asm:602:
loadp VectorBufferOffset[scratch, dest, 1], dest
The generated armv7 code:
    "\tmovw r9, #4\n"
    "\tadd r9, r1\n"
    "\tldr r0, [r9, r0, lsl #0]\n"
The mips equivalent is (without scaleShift == 0 check):
    "\tsll $t7, $v0, 0\n"
    "\taddu $t7, $t7, $v1\n"
    "\tlw $v0, 4($t7)\n"
And on mips with scaleShift checking:
    "\taddu $t7, $v1, $v0\n"
    "\tlw $v0, 4($t7)\n"
Both (with or without scaleShift checking) passes Tools/Scripts/run-javascriptcore-tests. I guess 2^0 == 1 so scale == 1; scaleShift == 0;
As ast.rb has:
    def scaleShift
        case scale
        when 1
            0
        when 2
            1
        when 4
            2
        when 8
            3
        else
            raise "Bad scale at #{codeOriginString}"
        end
    end

-- 
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