[sh4] Refactor jumps in baseline JIT to return label after the jump.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2013 18:21:37 +0000 (18:21 +0000)
committerJulien Brianceau <jbriance@cisco.com>
Wed, 13 Nov 2013 14:59:39 +0000 (15:59 +0100)
commit663df3d50bec5fde524cc4563e58ecf69355033f
treea1ce41ebec1135bc6483e9eb06707c2a3a899fce
parent7896dcc3baffb8f00b9458858e5cd1c92d29f525
[sh4] Refactor jumps in baseline JIT to return label after the jump.
https://bugs.webkit.org/show_bug.cgi?id=123734

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-04
Reviewed by Michael Saboff.

Current implementation of jumps in sh4 baseline JIT returns a label on the jump itself
and not after it. This is not correct and leads to issues like infinite loop the DFG
(https://bugs.webkit.org/show_bug.cgi?id=122597 for instance). This refactor fixes this
and also simplifies the link and relink procedures for sh4 jumps.

* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::branchDouble):
(JSC::MacroAssemblerSH4::branchTrue):
(JSC::MacroAssemblerSH4::branchFalse):
* assembler/SH4Assembler.h:
(JSC::SH4Assembler::jmp):
(JSC::SH4Assembler::extraInstrForBranch):
(JSC::SH4Assembler::jne):
(JSC::SH4Assembler::je):
(JSC::SH4Assembler::bra):
(JSC::SH4Assembler::linkJump):
(JSC::SH4Assembler::relinkJump):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/assembler/MacroAssemblerSH4.h
Source/JavaScriptCore/assembler/SH4Assembler.h