Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Don't define __BIT/__BITS if __ASSEMBLER__ is defined.



details:   https://anonhg.NetBSD.org/src/rev/5ce4e503a299
branches:  trunk
changeset: 783649:5ce4e503a299
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jan 02 17:02:13 2013 +0000

description:
Don't define __BIT/__BITS if __ASSEMBLER__ is defined.
(since they use C syntax they won't work anyways).

diffstat:

 sys/sys/cdefs.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 06bad2d3460c -r 5ce4e503a299 sys/sys/cdefs.h
--- a/sys/sys/cdefs.h   Wed Jan 02 16:31:24 2013 +0000
+++ b/sys/sys/cdefs.h   Wed Jan 02 17:02:13 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdefs.h,v 1.103 2012/10/28 17:06:40 joerg Exp $        */
+/*     $NetBSD: cdefs.h,v 1.104 2013/01/02 17:02:13 matt Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -512,6 +512,7 @@
  */
 #define        __arraycount(__x)       (sizeof(__x) / sizeof(__x[0]))
 
+#ifndef __ASSEMBLER__
 /* __BIT(n): nth bit, where __BIT(0) == 0x1. */
 #define        __BIT(__n)      \
     (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1 << (uintmax_t)(__n)))
@@ -519,6 +520,7 @@
 /* __BITS(m, n): bits m through n, m < n. */
 #define        __BITS(__m, __n)        \
        ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1))
+#endif /* !__ASSEMBLER__ */
 
 /* find least significant bit that is set */
 #define        __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))



Home | Main Index | Thread Index | Old Index