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
84ee7a10
Commit
84ee7a10
authored
Nov 23, 2017
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Less code to depend on ut_crc32_init()
parent
aaf5ee85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
storage/innobase/include/ut0crc32.h
storage/innobase/include/ut0crc32.h
+1
-0
storage/innobase/ut/ut0crc32.cc
storage/innobase/ut/ut0crc32.cc
+7
-13
No files found.
storage/innobase/include/ut0crc32.h
View file @
84ee7a10
...
@@ -51,6 +51,7 @@ extern ut_crc32_func_t ut_crc32;
...
@@ -51,6 +51,7 @@ extern ut_crc32_func_t ut_crc32;
when converting byte strings to integers internally. */
when converting byte strings to integers internally. */
extern
uint32_t
ut_crc32_legacy_big_endian
(
const
byte
*
buf
,
ulint
len
);
extern
uint32_t
ut_crc32_legacy_big_endian
(
const
byte
*
buf
,
ulint
len
);
/** Text description of CRC32 implementation */
extern
const
char
*
ut_crc32_implementation
;
extern
const
char
*
ut_crc32_implementation
;
#endif
/* ut0crc32_h */
#endif
/* ut0crc32_h */
storage/innobase/ut/ut0crc32.cc
View file @
84ee7a10
...
@@ -86,12 +86,6 @@ mysys/my_perf.c, contributed by Facebook under the following license.
...
@@ -86,12 +86,6 @@ mysys/my_perf.c, contributed by Facebook under the following license.
#include "univ.i"
#include "univ.i"
#include "ut0crc32.h"
#include "ut0crc32.h"
/** Pointer to CRC32 calculation function. */
ut_crc32_func_t
ut_crc32
;
/** Text description of CRC32 implementation */
const
char
*
ut_crc32_implementation
;
/** Swap the byte order of an 8 byte integer.
/** Swap the byte order of an 8 byte integer.
@param[in] i 8-byte integer
@param[in] i 8-byte integer
@return 8-byte integer */
@return 8-byte integer */
...
@@ -125,6 +119,13 @@ ut_crc32_power8(
...
@@ -125,6 +119,13 @@ ut_crc32_power8(
{
{
return
crc32c_vpmsum
(
0
,
buf
,
len
);
return
crc32c_vpmsum
(
0
,
buf
,
len
);
}
}
ut_crc32_func_t
ut_crc32
=
ut_crc32_power8
;
const
char
*
ut_crc32_implementation
=
"Using POWER8 crc32 instructions"
;
#else
uint32_t
ut_crc32_sw
(
const
byte
*
buf
,
ulint
len
);
ut_crc32_func_t
ut_crc32
=
ut_crc32_sw
;
const
char
*
ut_crc32_implementation
=
"Using generic crc32 instructions"
;
#endif
#endif
#if defined(__GNUC__) && defined(__x86_64__)
#if defined(__GNUC__) && defined(__x86_64__)
...
@@ -568,8 +569,6 @@ ut_crc32_init()
...
@@ -568,8 +569,6 @@ ut_crc32_init()
/*===========*/
/*===========*/
{
{
ut_crc32_slice8_table_init
();
ut_crc32_slice8_table_init
();
ut_crc32
=
ut_crc32_sw
;
ut_crc32_implementation
=
"Using generic crc32 instructions"
;
#if defined(__GNUC__) && defined(__x86_64__)
#if defined(__GNUC__) && defined(__x86_64__)
uint32_t
vend
[
3
];
uint32_t
vend
[
3
];
...
@@ -603,10 +602,5 @@ ut_crc32_init()
...
@@ -603,10 +602,5 @@ ut_crc32_init()
ut_crc32
=
ut_crc32_hw
;
ut_crc32
=
ut_crc32_hw
;
ut_crc32_implementation
=
"Using SSE2 crc32 instructions"
;
ut_crc32_implementation
=
"Using SSE2 crc32 instructions"
;
}
}
#elif defined(HAVE_CRC32_VPMSUM)
ut_crc32
=
ut_crc32_power8
;
ut_crc32_implementation
=
"Using POWER8 crc32 instructions"
;
#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