[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)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 20 Nov 2013 14:02:27 +0000 (15:02 +0100)
commitb16a154901c1efbdf877b4fb28daa939ec04c5f5
treef8a444bed5046d0fb753db1134e2c264ddca91e0
parentd7af109d619e3a6d88631598aaab7275a084da7f
[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.

Change-Id: I9c0e78cade4d20d0d83d683ffe6a499cee63bdbb
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Source/JavaScriptCore/assembler/SH4Assembler.h