From de7c5711c5d67e7e69386d6e35e42c8ce15de69b Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Sat, 6 Jun 2009 00:00:58 +0000 Subject: 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 --- firmware/export/system.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/system.h b/firmware/export/system.h index b44600d2c2..489ed8dc12 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -266,6 +266,10 @@ static inline uint32_t swap_odd_even32(uint32_t value) #endif /* !SIMULATOR */ +#ifndef TEST_BIT_N +#define TEST_BIT_N(n, mask) ((1UL << (n)) & (mask)) +#endif + /* Declare this as HIGHEST_IRQ_LEVEL if they don't differ */ #ifndef DISABLE_INTERRUPTS #define DISABLE_INTERRUPTS HIGHEST_IRQ_LEVEL -- cgit v1.2.3