Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d79141d6
Commit
d79141d6
authored
Jan 10, 2021
by
David Carlier
Committed by
Daniel Black
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msys: detects crc/cryptosupport on FreeBSD/arm
closes #1737 Reviewers: Marko Mäkelä, Krunal Bauskar
parent
dc3681e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
mysys/CMakeLists.txt
mysys/CMakeLists.txt
+16
-2
mysys/crc32/crc32_arm64.c
mysys/crc32/crc32_arm64.c
+13
-3
No files found.
mysys/CMakeLists.txt
View file @
d79141d6
...
...
@@ -86,7 +86,14 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
return ret;
}
#include <sys/auxv.h>
int main() { foo(0); getauxval(AT_HWCAP); }"
HAVE_ARMV8_CRC
)
int main() { foo(0);
#ifdef __linux__
getauxval(AT_HWCAP);
#else
unsigned long v;
elf_aux_info(AT_HWCAP, &v, sizeof(v));
#endif
}"
HAVE_ARMV8_CRC
)
CHECK_CXX_SOURCE_COMPILES
(
"
asm(
\"
.arch_extension crypto
\"
);
...
...
@@ -95,7 +102,14 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
return ret;
}
#include <sys/auxv.h>
int main() { foo(0); getauxval(AT_HWCAP); }"
HAVE_ARMV8_CRYPTO
)
int main() { foo(0);
#ifdef __linux__
getauxval(AT_HWCAP);
#else
unsigned long v;
elf_aux_info(AT_HWCAP, &v, sizeof(v));
#endif
}"
HAVE_ARMV8_CRYPTO
)
CHECK_C_COMPILER_FLAG
(
-march=armv8-a+crc+crypto HAVE_ARMV8_CRC_CRYPTO_MARCH
)
...
...
mysys/crc32/crc32_arm64.c
View file @
d79141d6
...
...
@@ -2,10 +2,20 @@
#include <string.h>
#include <stdint.h>
#if defined(
__GNUC__) && defined(
HAVE_ARMV8_CRC)
#if defined(HAVE_ARMV8_CRC)
#include <sys/auxv.h>
#include <asm/hwcap.h>
#if defined(__FreeBSD__)
static
unsigned
long
getauxval
(
unsigned
int
key
)
{
unsigned
long
val
;
if
(
elf_aux_info
(
key
,
(
void
*
)
&
val
,
(
int
)
sizeof
(
val
)
!=
0
)
return
0ul
;
return
val
;
}
#else
# include <asm/hwcap.h>
#endif
#ifndef HWCAP_CRC32
# define HWCAP_CRC32 (1 << 7)
...
...
@@ -40,7 +50,7 @@ const char *crc32c_aarch64_available(void)
return
"Using ARMv8 crc32 instructions"
;
}
#endif
/*
__GNUC__ &&
HAVE_ARMV8_CRC */
#endif
/* HAVE_ARMV8_CRC */
#ifndef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment