Ensure that computed new stack pointer values do not underflow.
authorjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jun 2017 18:12:35 +0000 (18:12 +0000)
committerjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jun 2017 18:12:35 +0000 (18:12 +0000)
commit1fa355b73fb7c8d664238a63b3c29a62cce33184
tree017d03d34675d267cd2a45586b798fb2a7f7832a
parent71fb03b4baa88a24c3333fb16ecf7ec08a8428bf
Ensure that computed new stack pointer values do not underflow.

Re-apply this patch, it originally broke the ARM build because the llint code
generated `subs xzr, x3, sp` which isn't valid ARM64: the third operand cannot
be SP (that encoding would be ZR instead, subtracting zero). Flip the comparison
and operands to emit valid code (because the second operand can be SP).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@218883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/dfg/DFGGraph.cpp
Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/JavaScriptCore/jit/JIT.cpp
Source/JavaScriptCore/jit/SetupVarargsFrame.cpp
Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
Source/JavaScriptCore/llint/LowLevelInterpreter.asm
Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Source/JavaScriptCore/runtime/MinimumReservedZoneSize.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/Options.cpp
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp