mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-08-03 09:46:04 -04:00
matchfinder: add MATCHFINDER_ALIGNED macro
Avoid some code duplication.
This commit is contained in:
parent
52b61d98d8
commit
41685b0dac
@ -99,11 +99,7 @@ struct bt_matchfinder {
|
||||
* 'child_tab[pos * 2]' and 'child_tab[pos * 2 + 1]', respectively. */
|
||||
mf_pos_t child_tab[2UL * MATCHFINDER_WINDOW_SIZE];
|
||||
|
||||
}
|
||||
#ifdef _aligned_attribute
|
||||
_aligned_attribute(MATCHFINDER_MEM_ALIGNMENT)
|
||||
#endif
|
||||
;
|
||||
} MATCHFINDER_ALIGNED;
|
||||
|
||||
/* Prepare the matchfinder for a new input buffer. */
|
||||
static forceinline void
|
||||
|
@ -129,11 +129,7 @@ struct hc_matchfinder {
|
||||
* the node for the sequence with position 'pos' is 'next_tab[pos]'. */
|
||||
mf_pos_t next_tab[MATCHFINDER_WINDOW_SIZE];
|
||||
|
||||
}
|
||||
#ifdef _aligned_attribute
|
||||
_aligned_attribute(MATCHFINDER_MEM_ALIGNMENT)
|
||||
#endif
|
||||
;
|
||||
} MATCHFINDER_ALIGNED;
|
||||
|
||||
/* Prepare the matchfinder for a new input buffer. */
|
||||
static forceinline void
|
||||
|
@ -28,11 +28,14 @@ typedef s16 mf_pos_t;
|
||||
#undef matchfinder_init
|
||||
#undef matchfinder_rebase
|
||||
#ifdef _aligned_attribute
|
||||
# define MATCHFINDER_ALIGNED _aligned_attribute(MATCHFINDER_MEM_ALIGNMENT)
|
||||
# if defined(__arm__) || defined(__aarch64__)
|
||||
# include "arm/matchfinder_impl.h"
|
||||
# elif defined(__i386__) || defined(__x86_64__)
|
||||
# include "x86/matchfinder_impl.h"
|
||||
# endif
|
||||
#else
|
||||
# define MATCHFINDER_ALIGNED
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user