Flag hot functions, and disable sanitizing for them

This commit is contained in:
Antoine SOULIER
2022-05-05 16:21:38 +02:00
parent 3568ee1cbf
commit 5a8617eba7
9 changed files with 103 additions and 77 deletions

View File

@@ -35,6 +35,24 @@
#endif
/**
* Hot Function attribute
* Selectively disable sanitizer
*/
#ifdef __clang__
#define LC3_HOT \
__attribute__((no_sanitize("bounds"))) \
__attribute__((no_sanitize("integer")))
#else /* __clang__ */
#define LC3_HOT
#endif /* __clang__ */
/**
* Macros
* MIN/MAX Minimum and maximum between 2 values