linux/lib/lzo/lzodefs.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 *  lzodefs.h -- architecture, OS and compiler specific defines
 *
 *  Copyright (C) 1996-2012 Markus F.X.J. Oberhumer <[email protected]>
 *
 *  The full LZO package can be found at:
 *  http://www.oberhumer.com/opensource/lzo/
 *
 *  Changed for Linux kernel use by:
 *  Nitin Gupta <[email protected]>
 *  Richard Purdie <[email protected]>
 */


/* Version
 * 0: original lzo version
 * 1: lzo with support for RLE
 */
#define LZO_VERSION

#define COPY4(dst, src)
#if defined(CONFIG_X86_64) || defined(CONFIG_ARM64)
#define COPY8(dst, src)
#else
#define COPY8
#endif

#if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
#error "conflicting endian definitions"
#elif defined(CONFIG_X86_64) || defined(CONFIG_ARM64)
#define LZO_USE_CTZ64
#define LZO_USE_CTZ32
#define LZO_FAST_64BIT_MEMORY_ACCESS
#elif defined(CONFIG_X86) || defined(CONFIG_PPC)
#define LZO_USE_CTZ32
#elif defined(CONFIG_ARM) && (__LINUX_ARM_ARCH__ >= 5)
#define LZO_USE_CTZ32
#endif

#define M1_MAX_OFFSET
#define M2_MAX_OFFSET
#define M3_MAX_OFFSET
#define M4_MAX_OFFSET_V0
#define M4_MAX_OFFSET_V1

#define M1_MIN_LEN
#define M1_MAX_LEN
#define M2_MIN_LEN
#define M2_MAX_LEN
#define M3_MIN_LEN
#define M3_MAX_LEN
#define M4_MIN_LEN
#define M4_MAX_LEN

#define M1_MARKER
#define M2_MARKER
#define M3_MARKER
#define M4_MARKER

#define MIN_ZERO_RUN_LENGTH
#define MAX_ZERO_RUN_LENGTH

#define lzo_dict_t
#define D_BITS
#define D_SIZE
#define D_MASK
#define D_HIGH