forked from LuaJIT/LuaJIT
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup CPU detection and tuning for old CPUs.
(cherry picked from commit 0eddcbe) This patch does the following refactoring: 1) Drops optimizations for the Intel Atom CPU [1]: removes the `JIT_F_LEA_AGU` flag and related optimizations. The considerations for the use of LEA are complex and very CPU-specific, mostly dependent on the number of operands. Mostly, it isn't worth it due to the extra register pressure and/or extra instructions. Be aware that it applies to the original and obsolete Atom architecture. Today "Intel Atom" is just a trade name for reduced-performance implementations of the current Intel architecture. 2) Drops optimizations for the AMD K8, K10 CPU [2][3]: removes the `JIT_F_PREFER_IMUL` flag and related optimizations. 3) Refactors JIT flags defined in the <lj_jit.h>. Now all CPU-specific JIT flags are defined as the left shift of `JIT_F_CPU` instead of hardcoded constants, similar for the optimization flags. 4) Adds detection of the ARM8 CPU. 5) Drops the check for SSE2 since the VM already presumes CPU supports it. 6) Adds checks for `__ARM_ARCH`[4] macro in <lj_arch.h>. 7) Drops outdated comment in the amalgamation file about memory requirements. Sergey Kaplun: * added the description for the patch [1]: https://en.wikipedia.org/wiki/Intel_Atom [2]: https://en.wikipedia.org/wiki/AMD_K8 [3]: https://en.wikipedia.org/wiki/AMD_K10 [4]: https://developer.arm.com/documentation/dui0774/l/Other-Compiler-specific-Features/Predefined-macros Part of tarantool/tarantool#10709 Reviewed-by: Sergey Bronnikov <[email protected]> Signed-off-by: Sergey Kaplun <[email protected]>
- Loading branch information
Showing
9 changed files
with
87 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.