File tree 2 files changed +6
-10
lines changed
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)
163
163
** syntax:** * ok = jit.crc32()*
164
164
165
165
Returns 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.
170
168
171
169
CRC32 support allows for this branch to use an optimized string hashing
172
170
algorithm. 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
285
283
(see ` lj_str_new() ` ).
286
284
287
285
This 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 ) ).
292
288
293
289
** Note:** This optimization can be disabled by compiling LuaJIT with
294
290
` -DLJ_OR_DISABLE_STRHASHCRC32 ` .
Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ CCOPT= -O2 -fomit-frame-pointer
47
47
# x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute
48
48
# the binaries to a different machine you could also use: -march=native
49
49
#
50
- CCOPT_x86 = -march=i686 -msse -msse2 -mfpmath=sse
50
+ CCOPT_x86 = -march=i686 -msse -msse2 -msse4.2 - mfpmath=sse
51
51
CCOPT_x64 =
52
52
CCOPT_arm =
53
- CCOPT_arm64 =
53
+ CCOPT_arm64 = -march=armv8-a+crc
54
54
CCOPT_ppc =
55
55
CCOPT_mips =
56
56
#
You can’t perform that action at this time.
0 commit comments