-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Check for buildtime support of cpu features
Signed-off-by: Cory Fields <[email protected]>
- Loading branch information
1 parent
bf912e8
commit a43d481
Showing
5 changed files
with
53 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <immintrin.h> | ||
#include <stdint.h> | ||
|
||
int main() { | ||
__m256i l = _mm256_set1_epi32(0); | ||
return _mm256_extract_epi32(l, 7); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <immintrin.h> | ||
#include <stdint.h> | ||
int main() { | ||
__m128i i = _mm_set1_epi32(0); | ||
__m128i j = _mm_set1_epi32(1); | ||
__m128i k = _mm_set1_epi32(2); | ||
return _mm_extract_epi32(_mm_sha256rnds2_epu32(i, i, k), 0); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <immintrin.h> | ||
#include <stdint.h> | ||
int main() { | ||
__m128i l = _mm_set1_epi32(0); | ||
return _mm_extract_epi32(l, 3); | ||
} |