lowerStackArgs should lower Lea32/64 on ARM64 to Add
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 06:37:50 +0000 (06:37 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 06:37:50 +0000 (06:37 +0000)
commit05f1987e5e4f2053e853b448fad354d0664f2910
tree0bf6da9667c8ac75b57be0dffe785aecdd9cdcde
parent56e4df8ea1cf4fbd65d1fbbf2cd1b97b59e1726d
lowerStackArgs should lower Lea32/64 on ARM64 to Add
https://bugs.webkit.org/show_bug.cgi?id=194656

Reviewed by Yusuke Suzuki.

On arm64, Lea is just implemented as an add. However, Air treats it as an
address with a given width. Because of this width, we were incorrectly
computing whether or not this immediate could fit into the instruction itself
or it needed to be explicitly put into a register. This patch makes
AirLowerStackArgs lower Lea to Add on arm64.

* b3/air/AirLowerStackArgs.cpp:
(JSC::B3::Air::lowerStackArgs):
* b3/air/AirOpcode.opcodes:
* b3/air/testair.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/b3/air/AirLowerStackArgs.cpp
Source/JavaScriptCore/b3/air/AirOpcode.opcodes
Source/JavaScriptCore/b3/air/testair.cpp