Commit Graph

175 Commits

Author SHA1 Message Date
Jeffrey Walton
af7d1050bf
Fix CPU feature detection on older Celerons 2023-10-12 02:28:24 -04:00
Jeffrey Walton
121014baf0
Return 0-values for XGETBV64 and CPUID64 when CRYPTOPP_DISABLE_ASM is in effect (GH #1240)
Some folks were defining CRYPTOPP_DISABLE_ASM and not building the *.asm files on WIndows. That happened to work until we refactored code for XGetBV and CpuId.

These alternate build systems are going to be the death of us...
2023-10-02 05:25:39 -04:00
Jeffrey Walton
e65fa006be
Simplify use of cpuid and xgetbv on Windows
In the past we were pivoting on Visual Studio versions, and trying to use intrinsics when available. The updated code just uses our versions of the calls.
2023-06-25 22:10:22 -04:00
Jeffrey Walton
a89a27b72c
Attempt to keep Clang out of other compiler paths (GH #147) 2023-06-25 18:28:11 -04:00
Jeffrey Walton
0d9cd947a0
Avoid call to CPU_ProbeSSE2 in DetectX86Features (GH #1162)
The call was a workaround for Solaris. Limit it to Solaris.
2023-06-25 17:09:33 -04:00
Jeffrey Walton
bfbf76fd0f
Update g_PowerPcDetectionDone variable name 2022-03-21 07:46:19 -04:00
Jeffrey Walton
1f258c72d2
Fix missing CPU_Probe functions when CRYPTOPP_DISABLE_ASM 2022-02-16 05:37:28 -05:00
Jeffrey Walton
2619dbec0b
Fix FreeBSD compile 2021-04-26 06:52:22 -04:00
Jeffrey Walton
597c81e14e
Update comments 2021-04-25 10:51:17 -04:00
Jeffrey Walton
90abede814
Fix FreeBSD feature tests 2021-04-25 10:48:50 -04:00
pkubaj
91173a287e
Implement SIMD checks for FreeBSD on PPC (PR #1029)
FreeBSD uses elf_aux_info() instead of getauxval().
2021-04-25 10:27:33 -04:00
Jeffrey Walton
cc3c6a2013
Clear VC++ unreachable code warning 2021-03-11 19:28:18 -05:00
Jeffrey Walton
babff262c5
Avoid second call to sysctlbyname on Apple M1 2021-03-11 14:28:01 -05:00
Wyatt OʼDay
575c42b6f4
Add Windows 10 ARM64 CPU features queries (PR #1017)
This is in addition to the existing probing that exists.
2021-03-11 13:30:38 -05:00
Jeffrey Walton
370d4f4176
Clear unused variable warning 2021-03-10 12:46:18 -05:00
Jeffrey Walton
75376f147e
Update comments 2021-03-07 02:07:40 -05:00
Jeffrey Walton
443e3ee836
Update cpu.cpp features for Apple M1 2021-03-05 13:07:24 -05:00
Jeffrey Walton
8b237f5381
Update cpu.cpp features for Apple M1 2021-03-05 09:15:52 -05:00
Jeffrey Walton
bc1b5f7922
Update cpu.cpp for Apple M1
Also see https://groups.google.com/g/cryptopp-users/c/mptNHcTrclk
2021-03-05 00:38:04 -05:00
Jeffrey Walton
f6ff2f0028
Update cpu.cpp features for Apple M1 2021-03-04 22:50:58 -05:00
PassMark
6b4887b6f4
Enable ARMv8 intrinsics on Apple M1 (PR #1007)
Co-authored-by: passmark <passmark@passmarks-Mac-mini.local>
2021-02-12 02:53:05 -05:00
Tanzinul Islam
e539aab454
Build with Oracle Developer Studio 12.6 in 64-bit (PR #990)
- The _mm256_loadu_si256() intrinsic is declared with a pointer to
  non-const input. Apply const_cast accordingly.

- The XGETBV instruction isn't recognized, so apply the same
  workaround as for old GCC versions.
  <https://docs.oracle.com/cd/E53394_01/html/E54851/gnyen.html>

- Only AT&T syntax is supported; there is no directive to switch
  Intel syntax. Therefore, disable mixed-ASM code paths.
2020-12-27 16:18:12 -05:00
Jeffrey Walton
8dd4103fca
Fix spelling 2020-12-22 15:49:34 -05:00
Jeffrey Walton
3a7eeb9f73
Avoid SIGILL with GCC 10 on POWER9 (GH #986) 2020-12-22 10:27:50 -05:00
Jeffrey Walton
b32cb6f9c0
Re-enable CPU_ProbePower9()
It is still SIGILL'ing
2020-12-22 10:17:09 -05:00
Jeffrey Walton
b9e015521e
Avoid SIGILL with GCC on POWER9 2020-12-22 00:12:10 -05:00
Jeffrey Walton
7177df3068
Fix include for MSVC compiler (GH #972)
Thanks @wyattoday
2020-11-20 19:14:35 -05:00
Jeffrey Walton
38e6763249
Fix compile error on Solaris 2020-09-30 14:44:03 -04:00
Jeffrey Walton
ba286e6780
Fix missing include for MSVC compiler (GH #972) 2020-09-30 13:41:40 -04:00
Jeffrey Walton
2c6e4b17d7
Use define CRYPTOPP_CXX11_STATIC_INIT name 2020-08-07 19:11:47 -04:00
Jeffrey Walton
cdc2a4aaf5
Update iOS and Android scripts (GH #936, PR #937)
This commit updates Android and iOS to modern SDKs, NDKs and Xcode.
2020-03-09 21:53:08 -04:00
Jeffrey Walton
5d68850041
Re-enable SSE2 probes for Solaris
Fix VMAC-64 crash on 32-bit Solaris i86pc
2020-02-22 16:18:43 -05:00
Jeffrey Walton
cd16435544
Update comments 2020-02-21 16:05:56 -05:00
Jeffrey Walton
57139faf61
Refactor XGetBV for x86 in cpu.cpp 2020-02-21 15:59:49 -05:00
Jeffrey Walton
6fa3e38e5c
Restore SIGILL handler if sigprocmask fails
We've never encountered this case, but better safe then sorry.
2020-02-17 14:15:02 -05:00
Jeffrey Walton
db97202654
Add Emacs and Vi files to gitignore 2020-02-15 03:50:15 -05:00
Jeffrey Walton
36a97733de
Fix Apple Watch compile
The i386 enum confused the compiler when building under Apple Watch SDK. Also removed IsAppleMachineARMv84(). There's little reason to stub it out yet. Apple still does not support CRC or CLMUL on ARMv8. There's no indication they will support ARMv8.4 anytime soon.
2020-02-15 03:00:54 -05:00
Jeffrey Walton
063b964d52
Fix compile on Apple platforms 2020-02-10 23:23:22 -05:00
Jeffrey Walton
5057974da8
Add index for Intel registers
This should make the code a little more readable
2020-02-10 12:44:55 -05:00
Jeffrey Walton
41b0092393
Update comments 2020-02-10 11:46:41 -05:00
Jeffrey Walton
83c785cf07
Add AppleMachineInfo class 2020-02-09 14:31:52 -05:00
Jeffrey Walton
633bb22db6 Update comments 2020-02-09 05:16:23 -05:00
Jeffrey Walton
3041fca5c3
Add additional Apple ARMv8 devices 2020-02-08 11:04:09 -05:00
Jeffrey Walton
1ccf9d5ab3
Move CPU manufacturer code into unnamed namespace 2020-02-07 16:53:22 -05:00
Jeffrey Walton
dd67e1eee4
Cleanup CpuID function (PR #929) 2020-02-07 16:00:16 -05:00
Jeffrey Walton
18b535fb5a
Add CPUID64 for MSVC missing __cpuidex 2020-02-07 14:19:46 -05:00
Jeffrey Walton
eb67356732
Set g_x86DetectionDone when CRYPTOPP_DISABLE_ASM is in effect
Previously we were re-entering DetectX86Features when CpuId failed or CRYPTOPP_DISABLE_ASM was in effect
2020-01-23 02:46:30 -05:00
Jeffrey Walton
95d8f2abfa
Disable RDRAND and RDSEED on AMD cpu's with family 15h or 16h (GH #924) 2020-01-17 01:05:42 -05:00
Jeffrey Walton
9013cb60fb
Fix semicolons yet again (GH #889)
So it looks like sed added a '\r' between the closing paren and the semi. Grepping for '^;' failed because the '\r' was considered part of the previous line, so it showed no hits. I finally had to write a C program to properly identify and fix those damn stray semicolons.
2019-10-14 12:30:10 -04:00
Jeffrey Walton
589c25264a Don't add semicolon to CRYPTOPP_CONSTANT abd DOCUMENTED_TYPEDEF (GH #889)
This issue is a recurring issue. Let's try fixing it in the #define this time.
2019-10-03 19:40:53 -04:00