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
e76183f0
Commit
e76183f0
authored
Dec 12, 2016
by
Daniel Black
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-11075: Power - runtime detection of optimized instructions
Signed-off-by:
Daniel Black
<
daniel.black@au.ibm.com
>
parent
9320d8ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
storage/innobase/ut/ut0crc32.cc
storage/innobase/ut/ut0crc32.cc
+14
-2
storage/xtradb/ut/ut0crc32.cc
storage/xtradb/ut/ut0crc32.cc
+8
-2
No files found.
storage/innobase/ut/ut0crc32.cc
View file @
e76183f0
...
@@ -83,6 +83,12 @@ mysys/my_perf.c, contributed by Facebook under the following license.
...
@@ -83,6 +83,12 @@ mysys/my_perf.c, contributed by Facebook under the following license.
#include "my_config.h"
#include "my_config.h"
#include <string.h>
#include <string.h>
#if defined(__linux__) && defined(HAVE_CRC32_VPMSUM)
/* Used to detect at runtime if we have vpmsum instructions (PowerISA 2.07) */
#include <sys/auxv.h>
#include <bits/hwcap.h>
#endif
#include "univ.i"
#include "univ.i"
#include "ut0crc32.h"
#include "ut0crc32.h"
...
@@ -740,8 +746,14 @@ ut_crc32_init()
...
@@ -740,8 +746,14 @@ ut_crc32_init()
}
}
#elif defined(HAVE_CRC32_VPMSUM)
#elif defined(HAVE_CRC32_VPMSUM)
ut_crc32
=
ut_crc32_power8
;
#if defined(__linux__)
ut_crc32_implementation
=
"Using POWER8 crc32 instructions"
;
if
(
getauxval
(
AT_HWCAP2
)
&
PPC_FEATURE2_ARCH_2_07
)
{
#endif
ut_crc32
=
ut_crc32_power8
;
ut_crc32_implementation
=
"Using POWER8 crc32 instructions"
;
#if defined(__linux__)
}
#endif
#endif
#endif
}
}
storage/xtradb/ut/ut0crc32.cc
View file @
e76183f0
...
@@ -336,7 +336,13 @@ ut_crc32_init()
...
@@ -336,7 +336,13 @@ ut_crc32_init()
}
}
#elif defined(HAVE_CRC32_VPMSUM)
#elif defined(HAVE_CRC32_VPMSUM)
ut_crc32
=
ut_crc32_power8
;
#if defined(__linux__)
ut_crc32_implementation
=
"Using POWER8 crc32 instructions"
;
if
(
getauxval
(
AT_HWCAP2
)
&
PPC_FEATURE2_ARCH_2_07
)
{
#endif
ut_crc32
=
ut_crc32_power8
;
ut_crc32_implementation
=
"Using POWER8 crc32 instructions"
;
#if defined(__linux__)
}
#endif
#endif
#endif
}
}
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