Project Alice
Loading...
Searching...
No Matches
portability_macros.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __has_attribute(x)   0
 
#define __has_builtin(x)   0
 
#define __has_feature(x)   0
 
#define ZSTD_MEMORY_SANITIZER   0
 
#define ZSTD_ADDRESS_SANITIZER   0
 
#define ZSTD_DATAFLOW_SANITIZER   0
 
#define ZSTD_HIDE_ASM_FUNCTION(func)
 
#define DYNAMIC_BMI2   0
 
#define ZSTD_ASM_SUPPORTED   0
 
#define ZSTD_ENABLE_ASM_X86_64_BMI2   0
 
#define ZSTD_CET_ENDBRANCH
 

Macro Definition Documentation

◆ __has_attribute

#define __has_attribute (   x)    0

This header file contains macro definitions to support portability. This header is shared between C and ASM code, so it MUST only contain macro definitions. It MUST not contain any C code.

This header ONLY defines macros to detect platforms/feature support.

Definition at line 26 of file portability_macros.h.

◆ __has_builtin

#define __has_builtin (   x)    0

Definition at line 31 of file portability_macros.h.

◆ __has_feature

#define __has_feature (   x)    0

Definition at line 36 of file portability_macros.h.

◆ DYNAMIC_BMI2

#define DYNAMIC_BMI2   0

Definition at line 88 of file portability_macros.h.

◆ ZSTD_ADDRESS_SANITIZER

#define ZSTD_ADDRESS_SANITIZER   0

Definition at line 55 of file portability_macros.h.

◆ ZSTD_ASM_SUPPORTED

#define ZSTD_ASM_SUPPORTED   0

Only enable assembly for GNUC compatible compilers, because other platforms may not support GAS assembly syntax.

Only enable assembly for Linux / MacOS, other platforms may work, but they haven't been tested. This could likely be extended to BSD systems.

Disable assembly when MSAN is enabled, because MSAN requires 100% of code to be instrumented to work.

Definition at line 116 of file portability_macros.h.

◆ ZSTD_CET_ENDBRANCH

#define ZSTD_CET_ENDBRANCH

Definition at line 155 of file portability_macros.h.

◆ ZSTD_DATAFLOW_SANITIZER

#define ZSTD_DATAFLOW_SANITIZER   0

Definition at line 64 of file portability_macros.h.

◆ ZSTD_ENABLE_ASM_X86_64_BMI2

#define ZSTD_ENABLE_ASM_X86_64_BMI2   0

Determines whether we should enable assembly for x86-64 with BMI2.

Enable if all of the following conditions hold:

  • ASM hasn't been explicitly disabled by defining ZSTD_DISABLE_ASM
  • Assembly is supported
  • We are compiling for x86-64 and either:
    • DYNAMIC_BMI2 is enabled
    • BMI2 is supported at compile time

Definition at line 136 of file portability_macros.h.

◆ ZSTD_HIDE_ASM_FUNCTION

#define ZSTD_HIDE_ASM_FUNCTION (   func)

Definition at line 74 of file portability_macros.h.

◆ ZSTD_MEMORY_SANITIZER

#define ZSTD_MEMORY_SANITIZER   0

Definition at line 44 of file portability_macros.h.