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
a2cd2cd3
Commit
a2cd2cd3
authored
Jan 23, 2021
by
David CARLIER
Committed by
Robert Bindar
Jan 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mac M1 build support proposal (minus rocksdb option)
parent
744e9752
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
include/my_global.h
include/my_global.h
+1
-1
mysys/crc32/crc32_arm64.c
mysys/crc32/crc32_arm64.c
+24
-0
No files found.
include/my_global.h
View file @
a2cd2cd3
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
# if defined(__i386__) || defined(__ppc__)
# if defined(__i386__) || defined(__ppc__)
# define SIZEOF_CHARP 4
# define SIZEOF_CHARP 4
# define SIZEOF_LONG 4
# define SIZEOF_LONG 4
# elif defined(__x86_64__) || defined(__ppc64__)
# elif defined(__x86_64__) || defined(__ppc64__)
|| defined(__aarch64__) || defined(__arm64__)
# define SIZEOF_CHARP 8
# define SIZEOF_CHARP 8
# define SIZEOF_LONG 8
# define SIZEOF_LONG 8
# else
# else
...
...
mysys/crc32/crc32_arm64.c
View file @
a2cd2cd3
...
@@ -4,6 +4,29 @@
...
@@ -4,6 +4,29 @@
#if defined(HAVE_ARMV8_CRC)
#if defined(HAVE_ARMV8_CRC)
#if defined(__APPLE__)
#include <sys/sysctl.h>
static
int
pmull_supported
;
int
crc32_aarch64_available
(
void
)
{
int
ret
;
size_t
len
=
sizeof
(
ret
);
if
(
sysctlbyname
(
"hw.optional.armv8_crc32"
,
&
ret
,
&
len
,
NULL
,
0
)
==
-
1
)
return
0
;
return
ret
;
}
const
char
*
crc32c_aarch64_available
(
void
)
{
if
(
crc32_aarch64_available
()
==
0
)
return
NULL
;
pmull_supported
=
1
;
return
"Using ARMv8 crc32 + pmull instructions"
;
}
#else
#include <sys/auxv.h>
#include <sys/auxv.h>
#if defined(__FreeBSD__)
#if defined(__FreeBSD__)
static
unsigned
long
getauxval
(
unsigned
int
key
)
static
unsigned
long
getauxval
(
unsigned
int
key
)
...
@@ -50,6 +73,7 @@ const char *crc32c_aarch64_available(void)
...
@@ -50,6 +73,7 @@ const char *crc32c_aarch64_available(void)
return
"Using ARMv8 crc32 instructions"
;
return
"Using ARMv8 crc32 instructions"
;
}
}
#endif
/* __APPLE__ */
#endif
/* HAVE_ARMV8_CRC */
#endif
/* HAVE_ARMV8_CRC */
#ifndef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
#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