Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7617
-gerrit
commit 6846335b576d3c623b418e4b9d22c61e6632be33 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Mon Dec 1 04:04:49 2014 +1100
arch/x86/include/stdint.h: Introduce BitOp manipulation formalism
Change-Id: Id5dbfd04cb579cf3b496a9fb3b68a47b3d442deb Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/arch/x86/include/stdint.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/src/arch/x86/include/stdint.h b/src/arch/x86/include/stdint.h index c491f4b..f4604ac 100644 --- a/src/arch/x86/include/stdint.h +++ b/src/arch/x86/include/stdint.h @@ -89,6 +89,19 @@ typedef int32_t s32; #define PRIu64 "llu" #endif
+#define S8_C(x) x +#define U8_C(x) x ## U +#define S16_C(x) x +#define U16_C(x) x ## U +#define S32_C(x) x +#define U32_C(x) x ## U +#define S64_C(x) x ## LL +#define U64_C(x) x ## ULL + +#define BIT_8(n) (U8_C(1) << (n)) +#define BIT_16(n) (U16_C(1) << (n)) +#define BIT_32(n) (U32_C(1) << (n)) +#define BIT_64(n) (U64_C(1) << (n))
#undef __HAVE_LONG_LONG__