mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Remove all the special-case code for INT64_IS_BUSTED, per decision that
we're not going to support that anymore. I did keep the 64-bit-CRC-with-32-bit-arithmetic code, since it has a performance excuse to live. It's a bit moot since that's all ifdef'd out, of course.
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/pg_crc.h,v 1.22 2010/01/02 16:58:10 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/pg_crc.h,v 1.23 2010/01/07 04:53:35 tgl Exp $
|
||||
*/
|
||||
#ifndef PG_CRC_H
|
||||
#define PG_CRC_H
|
||||
@ -60,15 +60,14 @@ extern CRCDLLIMPORT const uint32 pg_crc32_table[];
|
||||
#ifdef PROVIDE_64BIT_CRC
|
||||
|
||||
/*
|
||||
* If we have a 64-bit integer type, then a 64-bit CRC looks just like the
|
||||
* usual sort of implementation. If we have no working 64-bit type, then
|
||||
* fake it with two 32-bit registers. (Note: experience has shown that the
|
||||
* two-32-bit-registers code is as fast as, or even much faster than, the
|
||||
* 64-bit code on all but true 64-bit machines. INT64_IS_BUSTED is therefore
|
||||
* probably the wrong control symbol to use to select the implementation.)
|
||||
* If we use a 64-bit integer type, then a 64-bit CRC looks just like the
|
||||
* usual sort of implementation. However, we can also fake it with two
|
||||
* 32-bit registers. Experience has shown that the two-32-bit-registers code
|
||||
* is as fast as, or even much faster than, the 64-bit code on all but true
|
||||
* 64-bit machines. We use SIZEOF_VOID_P to check the native word width.
|
||||
*/
|
||||
|
||||
#ifdef INT64_IS_BUSTED
|
||||
#if SIZEOF_VOID_P < 8
|
||||
|
||||
/*
|
||||
* crc0 represents the LSBs of the 64-bit value, crc1 the MSBs. Note that
|
||||
@ -114,7 +113,8 @@ do { \
|
||||
/* Constant table for CRC calculation */
|
||||
extern CRCDLLIMPORT const uint32 pg_crc64_table0[];
|
||||
extern CRCDLLIMPORT const uint32 pg_crc64_table1[];
|
||||
#else /* int64 works */
|
||||
|
||||
#else /* use int64 implementation */
|
||||
|
||||
typedef struct pg_crc64
|
||||
{
|
||||
@ -147,7 +147,7 @@ do { \
|
||||
|
||||
/* Constant table for CRC calculation */
|
||||
extern CRCDLLIMPORT const uint64 pg_crc64_table[];
|
||||
#endif /* INT64_IS_BUSTED */
|
||||
#endif /* SIZEOF_VOID_P < 8 */
|
||||
#endif /* PROVIDE_64BIT_CRC */
|
||||
|
||||
#endif /* PG_CRC_H */
|
||||
|
Reference in New Issue
Block a user