The BinarySnippetRegisterContext needs to copy the result back from the scratch register.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Nov 2015 07:17:09 +0000 (07:17 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Nov 2015 07:17:09 +0000 (07:17 +0000)
commit1a1ec1a9f63178af65b62fd30aa3a990fcdcd468
treef4bba9dec54c383d9754b2797d7a7255ad9b0349
parent6bd05b01700734d310e5dd09cf9d556e2de043cd
The BinarySnippetRegisterContext needs to copy the result back from the scratch register.
https://bugs.webkit.org/show_bug.cgi?id=150712

Reviewed by Geoffrey Garen.

If the BinarySnippetRegisterContext had re-assigned the result register to a scratch
before emitting the snippet, it needs to copy the result back from the scratch after
the snippet is done.

This fixes the cdjs-tests.yaml/main.js.ftl failure reported in
https://bugs.webkit.org/show_bug.cgi?id=150687.

Also added an optimization to check for the case where any of the left, right,
or result registers are aliased together, and to map them to the corresponding
allocated scratch register for their alias instead of allocating separate ones.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
- Added JITSubGenerator.h to these project files for completeness.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
- Re-enable ArithSub handling of UntypedUse operands.

* ftl/FTLCompile.cpp:

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfArithSub):
- Adjusted IC sizes to account for the snippet changes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/ftl/FTLCapabilities.cpp
Source/JavaScriptCore/ftl/FTLCompile.cpp
Source/JavaScriptCore/ftl/FTLInlineCacheSize.cpp