File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -163,10 +163,8 @@ local newstate = jit.prngstate(123456)
163163** syntax:** * ok = jit.crc32()*
164164
165165Returns a boolean value indicating if the current architecture supports a CRC32
166- instruction set.
167-
168- CRC32 support will be checked at runtime if LuaJIT was compiled with ` -msse4.2 `
169- on x64 architectures, or ` -march=armv8-a+crc ` on ARM64.
166+ instruction set. CRC32 support will be checked at runtime on x64 and ARM64
167+ platforms.
170168
171169CRC32 support allows for this branch to use an optimized string hashing
172170algorithm. See the [ String hashing] ( #string-hashing ) section for details on
@@ -285,10 +283,8 @@ but makes hash collision attacks harder for strings up to 127 bytes of size
285283(see ` lj_str_new() ` ).
286284
287285This optimization is only available for x64 and ARM64 architectures, and will
288- be enabled if:
289-
290- 1 . LuaJIT is compiled with ` -msse4.2 ` on x64, or ` -march=armv8-a+crc ` on ARM64.
291- 2 . A CRC32 instruction set is detected at runtime (see [ jit.crc32] ( #jitcrc32 ) ).
286+ be enabled if a CRC32 instruction set is detected at runtime (see
287+ [ jit.crc32] ( #jitcrc32 ) ).
292288
293289** Note:** This optimization can be disabled by compiling LuaJIT with
294290` -DLJ_OR_DISABLE_STRHASHCRC32 ` .
Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ CCOPT= -O2 -fomit-frame-pointer
4747# x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute
4848# the binaries to a different machine you could also use: -march=native
4949#
50- CCOPT_x86 = -march=i686 -msse -msse2 -mfpmath=sse
50+ CCOPT_x86 = -march=i686 -msse -msse2 -msse4.2 - mfpmath=sse
5151CCOPT_x64 =
5252CCOPT_arm =
53- CCOPT_arm64 =
53+ CCOPT_arm64 = -march=armv8-a+crc
5454CCOPT_ppc =
5555CCOPT_mips =
5656#
You can’t perform that action at this time.
0 commit comments