aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/crcutil
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/libs/crcutil
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'contrib/libs/crcutil')
-rw-r--r--contrib/libs/crcutil/.yandex_meta/devtools.copyrights.report62
-rw-r--r--contrib/libs/crcutil/.yandex_meta/devtools.licenses.report73
-rw-r--r--contrib/libs/crcutil/.yandex_meta/licenses.list.txt219
-rw-r--r--contrib/libs/crcutil/bob_jenkins_rng.h126
-rw-r--r--contrib/libs/crcutil/multiword_64_64_cl_i386_mmx.cc304
-rw-r--r--contrib/libs/crcutil/rdtsc.h59
6 files changed, 0 insertions, 843 deletions
diff --git a/contrib/libs/crcutil/.yandex_meta/devtools.copyrights.report b/contrib/libs/crcutil/.yandex_meta/devtools.copyrights.report
deleted file mode 100644
index 5ac4629e72..0000000000
--- a/contrib/libs/crcutil/.yandex_meta/devtools.copyrights.report
+++ /dev/null
@@ -1,62 +0,0 @@
-# File format ($ symbol means the beginning of a line):
-#
-# $ # this message
-# $ # =======================
-# $ # comments (all commentaries should starts with some number of spaces and # symbol)
-# ${action} {license id} {license text hash}
-# $BELONGS ./ya/make/file/relative/path/1/ya.make ./ya/make/2/ya.make
-# ${all_file_action} filename
-# $ # user commentaries (many lines)
-# $ generated description - files with this license, license text... (some number of lines that starts with some number of spaces, do not modify)
-# ${action} {license spdx} {license text hash}
-# $BELONGS ./ya/make/file/relative/path/3/ya.make
-# ${all_file_action} filename
-# $ # user commentaries
-# $ generated description
-# $ ...
-#
-# You can modify action, all_file_action and add commentaries
-# Available actions:
-# keep - keep license in contrib and use in credits
-# skip - skip license
-# remove - remove all files with this license
-# rename - save license text/links into licenses texts file, but not store SPDX into LINCENSE macro. You should store correct license id into devtools.license.spdx.txt file
-#
-# {all file action} records will be generated when license text contains filename that exists on filesystem (in contrib directory)
-# We suppose that that files can contain some license info
-# Available all file actions:
-# FILE_IGNORE - ignore file (do nothing)
-# FILE_INCLUDE - include all file data into licenses text file
-# =======================
-
-KEEP COPYRIGHT_SERVICE_LABEL ef839a7f29c4727d9902b9efada72a47
-BELONGS ya.make
- License text:
- // Copyright 2010 Google Inc. All rights reserved.
- Scancode info:
- Original SPDX id: COPYRIGHT_SERVICE_LABEL
- Score : 100.00
- Match type : COPYRIGHT
- Files with this license:
- aligned_alloc.h [1:1]
- base_types.h [1:1]
- bob_jenkins_rng.h [1:1]
- crc32c_sse4.cc [1:1]
- crc32c_sse4.h [1:1]
- crc32c_sse4_intrin.h [1:1]
- crc_casts.h [1:1]
- generic_crc.h [1:1]
- gf_util.h [1:1]
- interface.cc [1:1]
- interface.h [1:1]
- multiword_128_64_gcc_amd64_sse2.cc [1:1]
- multiword_64_64_cl_i386_mmx.cc [1:1]
- multiword_64_64_gcc_amd64_asm.cc [1:1]
- multiword_64_64_gcc_i386_mmx.cc [1:1]
- multiword_64_64_intrinsic_i386_mmx.cc [1:1]
- platform.h [1:1]
- protected_crc.h [1:1]
- rdtsc.h [1:1]
- rolling_crc.h [1:1]
- std_headers.h [1:1]
- uint128_sse2.h [1:1]
diff --git a/contrib/libs/crcutil/.yandex_meta/devtools.licenses.report b/contrib/libs/crcutil/.yandex_meta/devtools.licenses.report
deleted file mode 100644
index 7a0eb04bb4..0000000000
--- a/contrib/libs/crcutil/.yandex_meta/devtools.licenses.report
+++ /dev/null
@@ -1,73 +0,0 @@
-# File format ($ symbol means the beginning of a line):
-#
-# $ # this message
-# $ # =======================
-# $ # comments (all commentaries should starts with some number of spaces and # symbol)
-# ${action} {license spdx} {license text hash}
-# $BELONGS ./ya/make/file/relative/path/1/ya.make ./ya/make/2/ya.make
-# ${all_file_action} filename
-# $ # user commentaries (many lines)
-# $ generated description - files with this license, license text... (some number of lines that starts with some number of spaces, do not modify)
-# ${action} {license spdx} {license text hash}
-# $BELONGS ./ya/make/file/relative/path/3/ya.make
-# ${all_file_action} filename
-# $ # user commentaries
-# $ generated description
-# $ ...
-#
-# You can modify action, all_file_action and add commentaries
-# Available actions:
-# keep - keep license in contrib and use in credits
-# skip - skip license
-# remove - remove all files with this license
-# rename - save license text/links into licenses texts file, but not store SPDX into LINCENSE macro. You should store correct license id into devtools.license.spdx.txt file
-#
-# {all file action} records will be generated when license text contains filename that exists on filesystem (in contrib directory)
-# We suppose that that files can contain some license info
-# Available all file actions:
-# FILE_IGNORE - ignore file (do nothing)
-# FILE_INCLUDE - include all file data into licenses text file
-# =======================
-
-KEEP Apache-2.0 2695f523f6550abd8506fe00ecd5fd73
-BELONGS ya.make
- Note: matched license text is too long. Read it in the source files.
- Scancode info:
- Original SPDX id: Apache-2.0
- Score : 100.00
- Match type : NOTICE
- Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
- Files with this license:
- aligned_alloc.h [3:13]
- base_types.h [3:13]
- bob_jenkins_rng.h [3:13]
- crc32c_sse4.cc [3:13]
- crc32c_sse4.h [3:13]
- crc32c_sse4_intrin.h [3:13]
- crc_casts.h [3:13]
- generic_crc.h [3:13]
- gf_util.h [3:13]
- interface.cc [3:13]
- interface.h [3:13]
- multiword_128_64_gcc_amd64_sse2.cc [3:13]
- multiword_64_64_cl_i386_mmx.cc [3:13]
- multiword_64_64_gcc_amd64_asm.cc [3:13]
- multiword_64_64_gcc_i386_mmx.cc [3:13]
- multiword_64_64_intrinsic_i386_mmx.cc [3:13]
- platform.h [3:13]
- protected_crc.h [3:13]
- rdtsc.h [3:13]
- rolling_crc.h [3:13]
- std_headers.h [3:13]
- uint128_sse2.h [3:13]
-
-KEEP Apache-2.0 2b42edef8fa55315f34f2370b4715ca9
-BELONGS ya.make
- Note: matched license text is too long. Read it in the source files.
- Scancode info:
- Original SPDX id: Apache-2.0
- Score : 100.00
- Match type : TEXT
- Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
- Files with this license:
- LICENSE [2:202]
diff --git a/contrib/libs/crcutil/.yandex_meta/licenses.list.txt b/contrib/libs/crcutil/.yandex_meta/licenses.list.txt
deleted file mode 100644
index 598cfe3595..0000000000
--- a/contrib/libs/crcutil/.yandex_meta/licenses.list.txt
+++ /dev/null
@@ -1,219 +0,0 @@
-====================Apache-2.0====================
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-====================Apache-2.0====================
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-====================COPYRIGHT====================
-// Copyright 2010 Google Inc. All rights reserved.
diff --git a/contrib/libs/crcutil/bob_jenkins_rng.h b/contrib/libs/crcutil/bob_jenkins_rng.h
deleted file mode 100644
index aed178c2a7..0000000000
--- a/contrib/libs/crcutil/bob_jenkins_rng.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2010 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Glorified C++ version of Bob Jenkins' random number generator.
-// See http://burtleburtle.net/bob/rand/smallprng.html for more details.
-
-#ifndef CRCUTIL_BOB_JENKINS_RNG_H_
-#define CRCUTIL_BOB_JENKINS_RNG_H_
-
-#include "base_types.h"
-
-#if !defined(_MSC_VER)
-#define _rotl(value, bits) \
- static_cast<uint32>(((value) << (bits)) + ((value) >> (32 - (bits))))
-#define _rotl64(value, bits) \
- static_cast<uint64>(((value) << (bits)) + ((value) >> (64 - (bits))))
-#endif // !defined(_MSC_VER)
-
-namespace crcutil {
-
-#pragma pack(push, 8)
-
-template<typename T> class BobJenkinsRng;
-
-template<> class BobJenkinsRng<uint32> {
- public:
- typedef uint32 value;
-
- value Get() {
- value e = a_ - _rotl(b_, 23);
- a_ = b_ ^ _rotl(c_, 16);
- b_ = c_ + _rotl(d_, 11);
- c_ = d_ + e;
- d_ = e + a_;
- return (d_);
- }
-
- void Init(value seed) {
- a_ = 0xf1ea5eed;
- b_ = seed;
- c_ = seed;
- d_ = seed;
- for (size_t i = 0; i < 20; ++i) {
- (void) Get();
- }
- }
-
- explicit BobJenkinsRng(value seed) {
- Init(seed);
- }
-
- BobJenkinsRng() {
- Init(0x1234567);
- }
-
- private:
- value a_;
- value b_;
- value c_;
- value d_;
-};
-
-
-#if HAVE_UINT64
-
-template<> class BobJenkinsRng<uint64> {
- public:
- typedef uint64 value;
-
- value Get() {
- value e = a_ - _rotl64(b_, 7);
- a_ = b_ ^ _rotl64(c_, 13);
- b_ = c_ + _rotl64(d_, 37);
- c_ = d_ + e;
- d_ = e + a_;
- return d_;
- }
-
- void Init(value seed) {
- a_ = 0xf1ea5eed;
- b_ = seed;
- c_ = seed;
- d_ = seed;
- for (size_t i = 0; i < 20; ++i) {
- (void) Get();
- }
- }
-
- explicit BobJenkinsRng(value seed) {
- Init(seed);
- }
-
- BobJenkinsRng() {
- Init(0x1234567);
- }
-
- private:
- value a_;
- value b_;
- value c_;
- value d_;
-};
-
-#endif // HAVE_UINT64
-
-#if !defined(_MSC_VER)
-#undef _rotl
-#undef _rotl64
-#endif // !defined(_MSC_VER)
-
-#pragma pack(pop)
-
-} // namespace crcutil
-
-#endif // CRCUTIL_BOB_JENKINS_RNG_H_
diff --git a/contrib/libs/crcutil/multiword_64_64_cl_i386_mmx.cc b/contrib/libs/crcutil/multiword_64_64_cl_i386_mmx.cc
deleted file mode 100644
index af7352aa46..0000000000
--- a/contrib/libs/crcutil/multiword_64_64_cl_i386_mmx.cc
+++ /dev/null
@@ -1,304 +0,0 @@
-// Copyright 2010 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Implements 64-bit multiword CRC for Microsoft and Intel compilers
-// using MMX instructions (i386).
-
-#include "generic_crc.h"
-
-#if CRCUTIL_USE_ASM && HAVE_I386 && HAVE_MMX && defined(_MSC_VER)
-
-namespace crcutil {
-
-#define CRC_WORD_MMX() \
- __asm pxor BUF0, CRC0 \
- __asm movd TMP0, BUF0 \
- __asm psrlq BUF0, 32 \
- __asm movzx TEMP, TMP0L \
- __asm shr TMP0, 8 \
- __asm movq CRC0, [TABLE + TEMP * 8] \
- __asm movzx TEMP, TMP0L \
- __asm shr TMP0, 8 \
- __asm pxor CRC0, [TABLE + TEMP * 8 + 1 * 256 * 8] \
- __asm movzx TEMP, TMP0L \
- __asm shr TMP0, 8 \
- __asm pxor CRC0, [TABLE + TEMP * 8 + 2 * 256 * 8] \
- __asm pxor CRC0, [TABLE + TMP0 * 8 + 3 * 256 * 8] \
- __asm movd TMP0, BUF0 \
- __asm movzx TEMP, TMP0L \
- __asm shr TMP0, 8 \
- __asm pxor CRC0, [TABLE + TEMP * 8 + 4 * 256 * 8] \
- __asm movzx TEMP, TMP0L \
- __asm shr TMP0, 8 \
- __asm pxor CRC0, [TABLE + TEMP * 8 + 5 * 256 * 8] \
- __asm movzx TEMP, TMP0L \
- __asm shr TMP0, 8 \
- __asm pxor CRC0, [TABLE + TEMP * 8 + 6 * 256 * 8] \
- __asm pxor CRC0, [TABLE + TMP0 * 8 + 7 * 256 * 8]
-
-// frame pointer register 'ebp' modified by inline assembly code
-#pragma warning(disable: 4731)
-
-template<> uint64 GenericCrc<uint64, uint64, uint64, 4>::CrcMultiwordI386Mmx(
- const void *data,
- size_t bytes,
- const uint64 &start) const {
- const uint8 *src = static_cast<const uint8 *>(data);
- const uint8 *end = src + bytes;
- uint64 crc0 = start ^ this->Base().Canonize();
-
- ALIGN_ON_WORD_BOUNDARY_IF_NEEDED(bytes, this, src, end, crc0, uint64);
- if (src >= end) {
- return (crc0 ^ this->Base().Canonize());
- }
-
-#define CRC0 mm0
-#define CRC1 mm1
-#define CRC2 mm2
-#define CRC3 mm3
-#define BUF0 mm4
-#define BUF1 mm5
-#define BUF2 mm6
-#define BUF3 mm7
-#define TMP0 eax
-#define TMP0L al
-#define TMP0H ah
-#define TMP1 ebx
-#define TMP1L bl
-#define TMP1H bh
-#define TMP2 ecx
-#define TMP2L cl
-#define TMP2H ch
-#define TMP3 edx
-#define TMP3L dl
-#define TMP3H dh
-#define TEMP edi
-#define SRC esi
-#define END [esp]
-#define TABLE ebp
-
-
- const uint64 *interleaved_table_address =
- &this->crc_word_interleaved_[0][0];
- const uint64 *word_table_address = &this->crc_word_[0][0];
-
- __asm {
- push ebp
-
- mov TMP0, interleaved_table_address
-
- movq CRC0, crc0
- mov SRC, src
- mov TMP1, end
- sub TMP1, 2*4*8 - 1
- cmp SRC, TMP1
- mov TABLE, word_table_address
- jae end_main_loop
-
- push TABLE
- mov TABLE, TMP0
- push TMP1
-
- pxor CRC1, CRC1
- pxor CRC2, CRC2
- pxor CRC3, CRC3
-
- movq BUF0, [SRC]
- movq BUF1, [SRC + 1 * 8]
- movq BUF2, [SRC + 2 * 8]
- movq BUF3, [SRC + 3 * 8]
-
- main_loop:
-#if HAVE_SSE && CRCUTIL_PREFETCH_WIDTH > 0
- prefetcht0 [SRC + CRCUTIL_PREFETCH_WIDTH]
-#endif
- add SRC, 32
- pxor BUF0, CRC0
- pxor BUF1, CRC1
- pxor BUF2, CRC2
- pxor BUF3, CRC3
-
- movd TMP0, BUF0
- psrlq BUF0, 32
- movd TMP1, BUF1
- psrlq BUF1, 32
- movd TMP2, BUF2
- psrlq BUF2, 32
- movd TMP3, BUF3
- psrlq BUF3, 32
-
- movzx TEMP, TMP0L
- movq CRC0, [TABLE + TEMP * 8]
- movzx TEMP, TMP1L
- movq CRC1, [TABLE + TEMP * 8]
- movzx TEMP, TMP2L
- movq CRC2, [TABLE + TEMP * 8]
- movzx TEMP, TMP3L
- movq CRC3, [TABLE + TEMP * 8]
-
- movzx TEMP, TMP0H
- shr TMP0, 16
- pxor CRC0, [TABLE + TEMP * 8 + 1 * 256 * 8]
- movzx TEMP, TMP1H
- shr TMP1, 16
- pxor CRC1, [TABLE + TEMP * 8 + 1 * 256 * 8]
- movzx TEMP, TMP2H
- shr TMP2, 16
- pxor CRC2, [TABLE + TEMP * 8 + 1 * 256 * 8]
- movzx TEMP, TMP3H
- shr TMP3, 16
- pxor CRC3, [TABLE + TEMP * 8 + 1 * 256 * 8]
-
- movzx TEMP, TMP0L
- shr TMP0, 8
- pxor CRC0, [TABLE + TEMP * 8 + 2 * 256 * 8]
- movzx TEMP, TMP1L
- shr TMP1, 8
- pxor CRC1, [TABLE + TEMP * 8 + 2 * 256 * 8]
- movzx TEMP, TMP2L
- shr TMP2, 8
- pxor CRC2, [TABLE + TEMP * 8 + 2 * 256 * 8]
- movzx TEMP, TMP3L
- shr TMP3, 8
- pxor CRC3, [TABLE + TEMP * 8 + 2 * 256 * 8]
-
- pxor CRC0, [TABLE + TMP0 * 8 + 3 * 256 * 8]
- movd TMP0, BUF0
- pxor CRC1, [TABLE + TMP1 * 8 + 3 * 256 * 8]
- movd TMP1, BUF1
- pxor CRC2, [TABLE + TMP2 * 8 + 3 * 256 * 8]
- movd TMP2, BUF2
- pxor CRC3, [TABLE + TMP3 * 8 + 3 * 256 * 8]
- movd TMP3, BUF3
-
- movzx TEMP, TMP0L
- pxor CRC0, [TABLE + TEMP * 8 + 4 * 256 * 8]
- movzx TEMP, TMP1L
- pxor CRC1, [TABLE + TEMP * 8 + 4 * 256 * 8]
- movzx TEMP, TMP2L
- pxor CRC2, [TABLE + TEMP * 8 + 4 * 256 * 8]
- movzx TEMP, TMP3L
- pxor CRC3, [TABLE + TEMP * 8 + 4 * 256 * 8]
-
- movzx TEMP, TMP0H
- shr TMP0, 16
- pxor CRC0, [TABLE + TEMP * 8 + 5 * 256 * 8]
- movzx TEMP, TMP1H
- shr TMP1, 16
- pxor CRC1, [TABLE + TEMP * 8 + 5 * 256 * 8]
- movzx TEMP, TMP2H
- shr TMP2, 16
- pxor CRC2, [TABLE + TEMP * 8 + 5 * 256 * 8]
- movzx TEMP, TMP3H
- shr TMP3, 16
- pxor CRC3, [TABLE + TEMP * 8 + 5 * 256 * 8]
-
- movzx TEMP, TMP0L
- shr TMP0, 8
- pxor CRC0, [TABLE + TEMP * 8 + 6 * 256 * 8]
- movzx TEMP, TMP1L
- shr TMP1, 8
- pxor CRC1, [TABLE + TEMP * 8 + 6 * 256 * 8]
- movzx TEMP, TMP2L
- shr TMP2, 8
- pxor CRC2, [TABLE + TEMP * 8 + 6 * 256 * 8]
- movzx TEMP, TMP3L
- shr TMP3, 8
- pxor CRC3, [TABLE + TEMP * 8 + 6 * 256 * 8]
-
- pxor CRC0, [TABLE + TMP0 * 8 + 7 * 256 * 8]
- movq BUF0, [SRC]
- pxor CRC1, [TABLE + TMP1 * 8 + 7 * 256 * 8]
- movq BUF1, [SRC + 1 * 8]
- pxor CRC2, [TABLE + TMP2 * 8 + 7 * 256 * 8]
- movq BUF2, [SRC + 2 * 8]
- pxor CRC3, [TABLE + TMP3 * 8 + 7 * 256 * 8]
- movq BUF3, [SRC + 3 * 8]
-
- cmp END, SRC
- ja main_loop
-
-#undef END
-#define END TMP1
- pop END
- pop TABLE
- add SRC, 32
-
- CRC_WORD_MMX()
-
- pxor BUF1, CRC1
- movq BUF0, BUF1
- CRC_WORD_MMX()
-
- pxor BUF2, CRC2
- movq BUF0, BUF2
- CRC_WORD_MMX()
-
- pxor BUF3, CRC3
- movq BUF0, BUF3
- CRC_WORD_MMX()
-
- end_main_loop:
- add END, 2*4*8 - 8
- cmp SRC, END
- jae end_word_loop
-
- word_loop:
- movq BUF0, [SRC]
- add SRC, 8
- CRC_WORD_MMX()
- cmp END, SRC
- ja word_loop
- end_word_loop:
-
-#if 0 // Plain C version is faster?
- add END, 7
- cmp SRC, END
- jae end_byte_loop
-
- byte_loop:
- movd TMP0, CRC0
- movzx TEMP, byte ptr [SRC]
- movzx TMP0, TMP0L
- psrlq CRC0, 8
- xor TEMP, TMP0
- add SRC, 1
- pxor CRC0, [TABLE + TEMP*8 + 7*256*8]
- cmp END, SRC
- ja byte_loop
- end_byte_loop:
-#endif
-
- pop ebp
-
- mov src, SRC
- movq crc0, CRC0
-
- emms
- }
-
-#if 1
- // Compute CRC of remaining bytes.
- for (;src < end; ++src) {
- CRC_BYTE(this, crc0, *src);
- }
-#endif
-
- return (crc0 ^ this->Base().Canonize());
-}
-
-
-} // namespace crcutil
-
-#endif // CRCUTIL_USE_ASM && HAVE_I386 && HAVE_MMX && defined(_MSC_VER)
diff --git a/contrib/libs/crcutil/rdtsc.h b/contrib/libs/crcutil/rdtsc.h
deleted file mode 100644
index 57aea1f1fb..0000000000
--- a/contrib/libs/crcutil/rdtsc.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2010 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Reads CPU cycle counter on AMD64 and I386 (for performance measurements).
-// Thanks to __rdtsc() intrinsic, it's easy with Microsoft and Intel
-// compilers, but real pain with GCC.
-
-#ifndef CRCUTIL_RDTSC_H_
-#define CRCUTIL_RDTSC_H_
-
-#include "platform.h"
-
-namespace crcutil {
-
-struct Rdtsc {
- static inline uint64 Get() {
-#if defined(_MSC_VER) && (HAVE_AMD64 || HAVE_I386)
- return __rdtsc();
-#elif defined(__GNUC__) && HAVE_AMD64
- int64 result;
- __asm__ volatile(
- "rdtsc\n"
- : "=a" (result));
- return result;
-#elif defined(__GNUC__) && HAVE_I386
- // If "low" and "high" are defined as "uint64" to
- // avoid explicit cast to uint64, GCC 4.5.0 in "-m32" mode
- // fails with "impossible register constraint" error
- // (no, it is not because one cannot use 64-bit value as argument
- // for 32-bit register, but because its register allocator
- // could not resolve a conflict under high register pressure).
- uint32 low;
- uint32 high;
- __asm__ volatile(
- "rdtsc\n"
- : "=a" (low), "=d" (high));
- return ((static_cast<uint64>(high) << 32) | low);
-#else
- // It is hard to find low overhead timer with
- // sub-millisecond resolution and granularity.
- return 0;
-#endif
- }
-};
-
-} // namespace crcutil
-
-#endif // CRCUTIL_RDTSC_H_