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

@@ -167,7 +167,7 @@ static inline void ac_put(struct lc3_bits_buffer *buffer, int byte)
* ac Arithmetic coder
* buffer Bitstream buffer
*/
static inline void ac_shift(
LC3_HOT static inline void ac_shift(
struct lc3_bits_ac *ac, struct lc3_bits_buffer *buffer)
{
if (ac->low < 0xff0000 || ac->carry)
@@ -262,7 +262,7 @@ void lc3_flush_bits(struct lc3_bits *bits)
* Write from 1 to 32 bits,
* exceeding the capacity of the accumulator
*/
void lc3_put_bits_generic(struct lc3_bits *bits, unsigned v, int n)
LC3_HOT void lc3_put_bits_generic(struct lc3_bits *bits, unsigned v, int n)
{
struct lc3_bits_accu *accu = &bits->accu;
@@ -285,7 +285,7 @@ void lc3_put_bits_generic(struct lc3_bits *bits, unsigned v, int n)
/**
* Arithmetic coder renormalization
*/
void lc3_ac_write_renorm(struct lc3_bits *bits)
LC3_HOT void lc3_ac_write_renorm(struct lc3_bits *bits)
{
struct lc3_bits_ac *ac = &bits->ac;
@@ -336,7 +336,7 @@ static inline void accu_load(struct lc3_bits_accu *accu,
* Read from 1 to 32 bits,
* exceeding the capacity of the accumulator
*/
unsigned lc3_get_bits_generic(struct lc3_bits *bits, int n)
LC3_HOT unsigned lc3_get_bits_generic(struct lc3_bits *bits, int n)
{
struct lc3_bits_accu *accu = &bits->accu;
struct lc3_bits_buffer *buffer = &bits->buffer;
@@ -366,7 +366,7 @@ unsigned lc3_get_bits_generic(struct lc3_bits *bits, int n)
/**
* Arithmetic coder renormalization
*/
void lc3_ac_read_renorm(struct lc3_bits *bits)
LC3_HOT void lc3_ac_read_renorm(struct lc3_bits *bits)
{
struct lc3_bits_ac *ac = &bits->ac;