[sh4] Protect repatchCompact from flushConstantPool.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Nov 2013 17:39:43 +0000 (17:39 +0000)
committerJulien Brianceau <jbriance@cisco.com>
Wed, 13 Nov 2013 17:39:57 +0000 (18:39 +0100)
commit18950bce334bff7c89238489f884e637fb6d642e
treef78ee5901b4aca0f3328f723b425be34d09821d5
parent8e1ed530876fd31662b8ae31779861fb22470085
[sh4] Protect repatchCompact from flushConstantPool.
https://bugs.webkit.org/show_bug.cgi?id=124278

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

Random crashes may occur with sh4 architecture, when a flushConstantPool occurs in
movlMemRegCompact. As in this case a branch opcode and the constant pool are put
before the movlMemRegCompact, the branch itself is patched when calling repatchCompact
instead of the mov instruction, which is really bad.

* assembler/SH4Assembler.h:
(JSC::SH4Assembler::repatchCompact): Handle this specific case and add an ASSERT.

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