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
62ce8ce7
Commit
62ce8ce7
authored
Nov 23, 2017
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed ut_crc32_byte_by_byte: never used
parent
e69466d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
52 deletions
+0
-52
storage/innobase/include/ut0crc32.h
storage/innobase/include/ut0crc32.h
+0
-4
storage/innobase/ut/ut0crc32.cc
storage/innobase/ut/ut0crc32.cc
+0
-48
No files found.
storage/innobase/include/ut0crc32.h
View file @
62ce8ce7
...
...
@@ -51,10 +51,6 @@ extern ut_crc32_func_t ut_crc32;
when converting byte strings to integers internally. */
extern
ut_crc32_func_t
ut_crc32_legacy_big_endian
;
/** Pointer to CRC32-byte-by-byte calculation function (byte order agnostic,
but very slow). */
extern
ut_crc32_func_t
ut_crc32_byte_by_byte
;
extern
const
char
*
ut_crc32_implementation
;
#endif
/* ut0crc32_h */
storage/innobase/ut/ut0crc32.cc
View file @
62ce8ce7
...
...
@@ -93,10 +93,6 @@ ut_crc32_func_t ut_crc32;
when converting byte strings to integers internally. */
ut_crc32_func_t
ut_crc32_legacy_big_endian
;
/** Pointer to CRC32-byte-by-byte calculation function (byte order agnostic,
but very slow). */
ut_crc32_func_t
ut_crc32_byte_by_byte
;
/** Text description of CRC32 implementation */
const
char
*
ut_crc32_implementation
;
...
...
@@ -409,26 +405,6 @@ ut_crc32_legacy_big_endian_hw(
return
(
~
crc
);
}
/** Calculates CRC32 using hardware/CPU instructions.
This function processes one byte at a time (very slow) and thus it does
not depend on the byte order of the machine.
@param[in] buf data over which to calculate CRC32
@param[in] len data length
@return CRC-32C (polynomial 0x11EDC6F41) */
uint32_t
ut_crc32_byte_by_byte_hw
(
const
byte
*
buf
,
ulint
len
)
{
uint32_t
crc
=
0xFFFFFFFFU
;
while
(
len
>
0
)
{
ut_crc32_8_hw
(
&
crc
,
&
buf
,
&
len
);
}
return
(
~
crc
);
}
#endif
/* defined(__GNUC__) && defined(__x86_64__) */
/* CRC32 software implementation. */
...
...
@@ -669,28 +645,6 @@ ut_crc32_legacy_big_endian_sw(
return
(
~
crc
);
}
/** Calculates CRC32 in software, without using CPU instructions.
This function processes one byte at a time (very slow) and thus it does
not depend on the byte order of the machine.
@param[in] buf data over which to calculate CRC32
@param[in] len data length
@return CRC-32C (polynomial 0x11EDC6F41) */
uint32_t
ut_crc32_byte_by_byte_sw
(
const
byte
*
buf
,
ulint
len
)
{
uint32_t
crc
=
0xFFFFFFFFU
;
ut_a
(
ut_crc32_slice8_table_initialized
);
while
(
len
>
0
)
{
ut_crc32_8_sw
(
&
crc
,
&
buf
,
&
len
);
}
return
(
~
crc
);
}
/********************************************************************//**
Initializes the data structures used by ut_crc32*(). Does not do any
allocations, would not hurt if called twice, but would be pointless. */
...
...
@@ -701,7 +655,6 @@ ut_crc32_init()
ut_crc32_slice8_table_init
();
ut_crc32
=
ut_crc32_sw
;
ut_crc32_legacy_big_endian
=
ut_crc32_legacy_big_endian_sw
;
ut_crc32_byte_by_byte
=
ut_crc32_byte_by_byte_sw
;
ut_crc32_implementation
=
"Using generic crc32 instructions"
;
#if defined(__GNUC__) && defined(__x86_64__)
...
...
@@ -735,7 +688,6 @@ ut_crc32_init()
if
(
features_ecx
&
1
<<
20
)
{
ut_crc32
=
ut_crc32_hw
;
ut_crc32_legacy_big_endian
=
ut_crc32_legacy_big_endian_hw
;
ut_crc32_byte_by_byte
=
ut_crc32_byte_by_byte_hw
;
ut_crc32_implementation
=
"Using SSE2 crc32 instructions"
;
}
...
...
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