Crypto++  8.8
Free C++ class library of cryptographic schemes
Macros
config_cpu.h File Reference

Library configuration file. More...

Go to the source code of this file.

Macros

#define CRYPTOPP_BOOL_X32   ...
 32-bit x32 platform More...
 
#define CRYPTOPP_BOOL_X64   ...
 32-bit x86 platform More...
 
#define CRYPTOPP_BOOL_X86   ...
 32-bit x86 platform More...
 
#define CRYPTOPP_BOOL_ARMV8   ...
 ARMv8 platform. More...
 
#define CRYPTOPP_BOOL_ARM64   ...
 64-bit ARM platform More...
 
#define CRYPTOPP_BOOL_ARM32   ...
 32-bit ARM platform More...
 
#define CRYPTOPP_BOOL_PPC64   ...
 64-bit PowerPC platform More...
 
#define CRYPTOPP_BOOL_PPC32   ...
 32-bit PowerPC platform More...
 
#define CRYPTOPP_BOOL_MIPS64   ...
 64-bit MIPS platform More...
 
#define CRYPTOPP_BOOL_MIPS32   ...
 64-bit MIPS platform More...
 
#define CRYPTOPP_BOOL_SPARC64   ...
 64-bit SPARC platform More...
 
#define CRYPTOPP_BOOL_SPARC32   ...
 32-bit SPARC platform More...
 
#define CRYPTOPP_L1_CACHE_LINE_SIZE   ...
 L1 data cache line size. More...
 
#define CRYPTOPP_SECTION_INIT   ...
 Initialized data section. More...
 
#define CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY   ...
 Microsoft style inline assembly. More...
 
#define CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY   ...
 GNU style inline assembly. More...
 

Detailed Description

Library configuration file.

config_cpu.h provides defines for the cpu and machine architecture.

config.h was split into components in May 2019 to better integrate with Autoconf and its feature tests. The splitting occurred so users could continue to include config.h while allowing Autoconf to write new config_asm.h and new config_cxx.h using its feature tests.

Note
You should include config.h rather than config_cpu.h directly.
See also
Issue 835, Make config.h more autoconf friendly, Configure.sh script on the Crypto++ wiki, Sourceforge Pre-defined Compiler Macros
Since
Crypto++ 8.3

Definition in file config_cpu.h.

Macro Definition Documentation

◆ CRYPTOPP_BOOL_X32

#define CRYPTOPP_BOOL_X32   ...

32-bit x32 platform

CRYPTOPP_BOOL_X32 is defined to 1 when building the library for a 32-bit x32 platform. Otherwise, the macro is not defined.

x32 is sometimes referred to as x86_32. x32 is the ILP32 data model on a 64-bit cpu. Integers, longs and pointers are 32-bit but the program runs on a 64-bit cpu.

The significance of x32 is, inline assembly must operate on 64-bit registers, not 32-bit registers. That means, for example, function prologues and epilogues must push and pop RSP, not ESP.

Note
: Clang defines __ILP32__ on any 32-bit platform. Therefore, CRYPTOPP_BOOL_X32 depends upon both __ILP32__ and __x86_64__.
See also
Debian X32 Port, Gentoo Multilib Concepts

Definition at line 44 of file config_cpu.h.

◆ CRYPTOPP_BOOL_X64

#define CRYPTOPP_BOOL_X64   ...

32-bit x86 platform

CRYPTOPP_BOOL_X64 is defined to 1 when building the library for a 64-bit x64 platform. Otherwise, the macro is not defined.

Definition at line 48 of file config_cpu.h.

◆ CRYPTOPP_BOOL_X86

#define CRYPTOPP_BOOL_X86   ...

32-bit x86 platform

CRYPTOPP_BOOL_X86 is defined to 1 when building the library for a 32-bit x86 platform. Otherwise, the macro is not defined.

Definition at line 52 of file config_cpu.h.

◆ CRYPTOPP_BOOL_ARMV8

#define CRYPTOPP_BOOL_ARMV8   ...

ARMv8 platform.

CRYPTOPP_BOOL_ARMV8 is defined to 1 when building the library for an ARMv8 platform. Otherwise, the macro is not defined.

ARMv8 includes both Aarch32 and Aarch64. Aarch32 is a 32-bit execution environment on Aarch64.

Definition at line 67 of file config_cpu.h.

◆ CRYPTOPP_BOOL_ARM64

#define CRYPTOPP_BOOL_ARM64   ...

64-bit ARM platform

CRYPTOPP_BOOL_ARM64 is defined to 1 when building the library for a 64-bit x64 platform. Otherwise, the macro is not defined.

Currently the macro indicates an ARM 64-bit architecture.

Definition at line 72 of file config_cpu.h.

◆ CRYPTOPP_BOOL_ARM32

#define CRYPTOPP_BOOL_ARM32   ...

32-bit ARM platform

CRYPTOPP_BOOL_ARM32 is defined to 1 when building the library for a 32-bit ARM platform. Otherwise, the macro is not defined.

Currently the macro indicates an ARM A-32 architecture.

Definition at line 77 of file config_cpu.h.

◆ CRYPTOPP_BOOL_PPC64

#define CRYPTOPP_BOOL_PPC64   ...

64-bit PowerPC platform

CRYPTOPP_BOOL_PPC64 is defined to 1 when building the library for a 64-bit PowerPC platform. Otherwise, the macro is not defined.

Definition at line 92 of file config_cpu.h.

◆ CRYPTOPP_BOOL_PPC32

#define CRYPTOPP_BOOL_PPC32   ...

32-bit PowerPC platform

CRYPTOPP_BOOL_PPC32 is defined to 1 when building the library for a 32-bit PowerPC platform. Otherwise, the macro is not defined.

Definition at line 96 of file config_cpu.h.

◆ CRYPTOPP_BOOL_MIPS64

#define CRYPTOPP_BOOL_MIPS64   ...

64-bit MIPS platform

CRYPTOPP_BOOL_MIPS64 is defined to 1 when building the library for a 64-bit MIPS platform. Otherwise, the macro is not defined.

Definition at line 107 of file config_cpu.h.

◆ CRYPTOPP_BOOL_MIPS32

#define CRYPTOPP_BOOL_MIPS32   ...

64-bit MIPS platform

CRYPTOPP_BOOL_MIPS32 is defined to 1 when building the library for a 32-bit MIPS platform. Otherwise, the macro is not defined.

Definition at line 111 of file config_cpu.h.

◆ CRYPTOPP_BOOL_SPARC64

#define CRYPTOPP_BOOL_SPARC64   ...

64-bit SPARC platform

CRYPTOPP_BOOL_SPARC64 is defined to 1 when building the library for a 64-bit SPARC platform. Otherwise, the macro is not defined.

Definition at line 122 of file config_cpu.h.

◆ CRYPTOPP_BOOL_SPARC32

#define CRYPTOPP_BOOL_SPARC32   ...

32-bit SPARC platform

CRYPTOPP_BOOL_SPARC32 is defined to 1 when building the library for a 32-bit SPARC platform. Otherwise, the macro is not defined.

Definition at line 126 of file config_cpu.h.

◆ CRYPTOPP_L1_CACHE_LINE_SIZE

#define CRYPTOPP_L1_CACHE_LINE_SIZE   ...

L1 data cache line size.

CRYPTOPP_L1_CACHE_LINE_SIZE should be a lower bound on the L1 data cache line size. It is used for defense against some timing attacks.

CRYPTOPP_L1_CACHE_LINE_SIZE default value on 32-bit platforms is 32, and the default value on 64-bit platforms is 64. On PowerPC the default value is 128 since all PowerPC cpu's starting at PPC 970 provide it.

Note
The runtime library on some PowerPC platforms misreport the size of the cache line size. The runtime library reports 64, while the cpu has a cache line size of 128.
See also
CentOS Issue 14599: sysconf(_SC_LEVEL1_DCACHE_LINESIZE) returns 0 instead of 128
Since
Crypto++ 5.3

Definition at line 147 of file config_cpu.h.

◆ CRYPTOPP_SECTION_INIT

#define CRYPTOPP_SECTION_INIT   ...

Initialized data section.

CRYPTOPP_SECTION_INIT is added to variables to place them in the initialized data section (sometimes denoted .data). The placement helps avoid "uninitialized variable" warnings from Valgrind and other tools.

Definition at line 168 of file config_cpu.h.

◆ CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY

#define CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY   ...

Microsoft style inline assembly.

CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY is defined when either _MSC_VER or __BORLANDC__ are defined.

Definition at line 200 of file config_cpu.h.

◆ CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY

#define CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY   ...

GNU style inline assembly.

CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY is defined when neither _MSC_VER nor __BORLANDC__ are defined.

Definition at line 204 of file config_cpu.h.