JITMathIC was misusing maxJumpReplacementSize
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 08:22:21 +0000 (08:22 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 08:22:21 +0000 (08:22 +0000)
commitefa7cf60d09680fe4dfa72bce8386a8233ebb815
tree890d2d6a7e3928455c061210627ff06c2e7f31de
parent13d9ddd5a0cdb7ffeeb0ea7502498b8e0d8cd18b
JITMathIC was misusing maxJumpReplacementSize
https://bugs.webkit.org/show_bug.cgi?id=161356
<rdar://problem/28065560>

Reviewed by Benjamin Poulain.

JITMathIC was assuming that maxJumpReplacementSize is the size
you'd get if you emitted a patchableJump() using the macro assembler.
This is not true, however. It happens to be true on arm64, x86 and x86-64,
however, it is not true on armv7. This patch introduces an alternative to
maxJumpReplacementSize called patchableJumpSize, and switches JITMathIC
to use that number instead.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::patchableJumpSize):
(JSC::ARM64Assembler::maxJumpReplacementSize): Deleted.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::patchableJumpSize):
(JSC::ARMv7Assembler::maxJumpReplacementSize): Deleted.
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::patchableJumpSize):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::patchableJumpSize):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::patchableJumpSize):
* assembler/X86Assembler.h:
(JSC::X86Assembler::patchableJumpSize):
(JSC::X86Assembler::maxJumpReplacementSize): Deleted.
* jit/JITMathIC.h:
(JSC::JITMathIC::generateInline):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/ARM64Assembler.h
Source/JavaScriptCore/assembler/ARMv7Assembler.h
Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
Source/JavaScriptCore/assembler/X86Assembler.h
Source/JavaScriptCore/jit/JITMathIC.h