forked from len0rd/rockbox
Add a system-wide BIT_N macro, implemented via an LUT on SH, and use it in the TAGCACHE_IS_* macros in place of per-set LUTs, removing duplication of data between those LUTs and the mask values used on other targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21195 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fe72c890a7
commit
de7c5711c5
5 changed files with 29 additions and 31 deletions
|
|
@ -126,4 +126,11 @@ static inline uint32_t swap_odd_even32(uint32_t value)
|
|||
return value;
|
||||
}
|
||||
|
||||
extern const unsigned bit_n_table[32];
|
||||
#define BIT_N(n) ( \
|
||||
__builtin_constant_p(n) \
|
||||
? (1LU << (n)) \
|
||||
: bit_n_table[n] \
|
||||
)
|
||||
|
||||
#endif /* SYSTEM_TARGET_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue