summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-07-25 01:32:26 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-07-25 01:32:26 -0700
commitd7bcbcdc0ffbaed1f57a7e960934c6736d1f92ad (patch)
tree05b445393cf7ee057edf36d5113281ef5e340221 /include
parentae6eb6dc6bc58f62263511ed8a103d49bb43a6c9 (diff)
[SPARC]: __builtin_trap() is bug-free in 3.3.1 and later.
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc/bug.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h
index a098c483d0c7..8f04d610643c 100644
--- a/include/asm-sparc/bug.h
+++ b/include/asm-sparc/bug.h
@@ -1,11 +1,19 @@
-/* $Id$ */
#ifndef _SPARC_BUG_H
#define _SPARC_BUG_H
/* Only use the inline asm until a gcc release that can handle __builtin_trap
- * -rob 2003-06-25 */
+ * -rob 2003-06-25
+ *
+ * gcc-3.3.1 and later will be OK -DaveM
+ */
+#if (__GNUC__ > 3) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 1)
+#define __bug_trap() __builtin_trap()
+#else
#define __bug_trap() \
__asm__ __volatile__ ("t 0x5\n\t" : : )
+#endif
#ifdef CONFIG_DEBUG_BUGVERBOSE
extern void do_BUG(const char *file, int line);